view scripts/search/tests/edit-dataset-finch1 @ 14:be7787c36e58 default tip

new: nofity LGSercies for deleted files
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 02 Nov 2015 16:41:23 +0100
parents a50cf11e5178
children
line wrap: on
line source

#!/bin/bash
. scripts/search/export-keys
FIRST_FINCH_ID=126
GET_VERSION_OUTPUT=`curl -s GET http://localhost:8080/api/datasets/$FIRST_FINCH_ID/versions/:draft?key=$FINCHKEY`
echo $GET_VERSION_OUTPUT | jq .data > /tmp/old
cp /tmp/old /tmp/new
sed -i -e "s/Darwin's Finches/Darwins Galápagos Finches/" /tmp/new
EDIT_OUTPUT=`curl -s -H "Content-type:application/json" -X PUT -d @/tmp/new http://localhost:8080/api/datasets/$FIRST_FINCH_ID/versions/:draft?key=$FINCHKEY`
echo $EDIT_OUTPUT
echo $EDIT_OUTPUT | jq .