Skip to content

Instantly share code, notes, and snippets.

@ri0day
Forked from gschueler/project api resty example.md
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ri0day/aba05f6d4408d3e3d021 to your computer and use it in GitHub Desktop.
Save ri0day/aba05f6d4408d3e3d021 to your computer and use it in GitHub Desktop.

resty example, copy project config to a new project:

resty http://localhost:4440/api/11 -H 'x-rundeck-auth-token: ...'

json:

GET /project/NAME.json | jq '{ "name": ("NEWNAME"), config:.config }' | POST /projects -H 'content-type:application/json'

xml:

GET /project/NAME | xmlstarlet ed -u //project/name -v 'NEWNAME' -m //project / -d /result | POST /projects -H 'Content-Type:application/xml'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment