-
Notifications
You must be signed in to change notification settings - Fork 27
Deployables
movitto edited this page Jan 15, 2013
·
3 revisions
DRAFT
This version doesn’t take TIM into account.
Request
curl -X POST --user admin:password--header “Content-Type: application/xml” --header “Accept: application/xml” -k https://localhost/conductor/api/deployable
--data "<deployable>
<name>deplname</name>
<description>some text</description>
<xml>\<]\></xml>
<xml_filename> fname </xml_filename>
<owner id="2"></owner>
<pool_family id="1" href="https://localhost/conductor/api/pool_families/1"></pool_family>
</deployable>
This follows current option in UI.
curl -X POST --user admin:password--header “Content-Type: application/xml” --header “Accept: application/xml” -k https://localhost/conductor/api/deployable
--data “<deployable>
<name>deplname</name>
<description>some text</description>
<image id='313373' \>
<hwp id='3000' \>
<catalog id='1337' \>
</deployable>”
Request
curl -X GET --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/deployables
Response
<deployables>
<deployable href='http://localhost:3000/api/deployables/1' id='1' />
<deployable href='http://localhost:3000/api/deployables/3' id='3' />
<deployable href='http://localhost:3000/api/deployables/2' id='2' />
</deployables>
Request
curl -X GET --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/deployables/1
Response
<deployable id="1" href="https://localhost/conductor/api/deployables/1">
<name>delpname</name>
<description>some text</description>
<pool_family id="1" href="https://localhost/conductor/api/pool_family/1" />
<catalogs>
<catalog id="1" href="https://localhost/conductor/api/catalogs/1" />
</catalogs>
</deployable>
Request
curl -X PUT --user admin:password--header “Content-Type: application/xml”
--header “Accept: application/xml”-k https://localhost/conductor/api/deployables/1
--data "<deployable>
<name>deplname</name>
<description>some text</description>
<xml>\<]\></xml>
<xml_filename> fname </xml_filename>
<owner id="2"></owner>
</deployable>
Request
curl -X DELETE --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/deployable/1
Response
If success,
<deplyable id="1">
<status>DELETED</status>
</deployable>
If failure,
<code>
<error>
<code>RecordNotFound</code>
<message>Couldn't find deployable with ID=1</message>
</error>
</code>