Skip to content
movitto edited this page Jan 14, 2013 · 2 revisions

Catalogs

Create a new catalog

Request

curl -X POST --user admin:password--header “Content-Type: application/xml” --header “Accept: application/xml” -k https://localhost/conductor/api/catalogs --data “catalog1name”

Response

<catalog id="1" href="https://localhost/conductor/api/catalogs/1">
 <name>catalog1name</name>
 <pool id="1" href="https://localhost/conductor/api/pools/1"></pool>
 <deployables></deployables>
</catalog>

List all catalogs

Request

curl -X GET --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/catalogs

Response

<catalogs>
  <catalog href='http://localhost:3000/api/catalogs/1' id='1'></catalog>
  <catalog href='http://localhost:3000/api/catalogs/3' id='3'></catalog>
  <catalog href='http://localhost:3000/api/catalogs/2' id='2'></catalog>
</catalogs>

Show a single catalog’s details

Request

curl -X GET --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/catalogs/1

Response

<catalog id="1" href="https://localhost/conductor/api/catalogs/1">
 <name>catalog1name</name>
 <pool id="1" href="https://localhost/conductor/api/pools/1"></pool>
 <deployables>
   <deployable id="1" href="https://localhost/conductor/api/deployables/1"></deployable>
   <deployable id="2" href="https://localhost/conductor/api/deployables/2"></deployable>
   <deployable id="3" href="https://localhost/conductor/api/deployables/3"></deployable>
 </deployables>
</catalog>

Update a catalog

Request

curl -X PUT --user admin:password--header “Content-Type: application/xml” --header “Accept: application/xml” -k https://localhost/conductor/api/catalogs/1 --data “updated-name”

Response

<catalog id="1" href="https://localhost/conductor/api/catalogs/1">
 <name>updated-name</name>
 <pool id="2" href="https://localhost/conductor/api/pools/2"></pool>
 <deployables></deployables>
</catalog>

Delete a catalog

Request

curl -X DELETE --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/catalogs/1

Response

If success, return 204 No Content.

If failure,

<error>
  <codee>RecordNotFound</codee>
  <message>Couldn't find Catalog with ID=1</message>
</error>
Clone this wiki locally