Skip to content

Instantly share code, notes, and snippets.

@MerlinDMC
Created January 27, 2015 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MerlinDMC/82bda750b210f2ab5a58 to your computer and use it in GitHub Desktop.
Save MerlinDMC/82bda750b210f2ab5a58 to your computer and use it in GitHub Desktop.
dsapid create first user and upload datasets
# create admin user
# needs to be run via 127.0.0.1 to be accepted as an authenticated administrative command
curl -v -X PUT http://127.0.0.1/api/users -d '{ "name": "admin", "token": "admintoken", "type": "user", "roles": [ "s_dataset.upload", "s_dataset.manage", "s_dataset.admin" ] }'
# upload a dataset
curl -v -u admintoken: http://dsapid.example.com/api/upload -F manifest=@image.dsmanifest -F file=@image.zfs.gz
# make an upload public
curl -v -X POST -u admintoken: http://dsapid.example.com/api/datasets/b1f1827e-88f6-11e4-9392-770a880c2693?action=enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment