Skip to content

Instantly share code, notes, and snippets.

@bryder
Created April 16, 2015 05:37
Show Gist options
  • Save bryder/894eca376a8c27677ce8 to your computer and use it in GitHub Desktop.
Save bryder/894eca376a8c27677ce8 to your computer and use it in GitHub Desktop.
Posting json from a file to python-eve. Uses jq as well to strip metadata
curl -Ss 'thing:5001/facts?max_results=10000' | tee facts_response.json | jq '[._items[] | del(._created) | del(._links) | del(._updated) | del(._id) | del(._etag) ]' > facts_to_post.json
curl -H 'Content-Type: application/json' -X POST -d@facts_to_post.json http://localhost:5001/facts > post_facts.results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment