Created
April 16, 2015 05:37
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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