Skip to content
danmacpherson edited this page Feb 7, 2013 · 1 revision

Front End Realms

DRAFT

Create a new frontend realm

Request

curl -X POST--user admin:password--header “Content-Type: application/xml” --header “Accept: application/xml” -k https://localhost/conductor/api/frontend_realms --data “<frontend_realm>public-realmpublic providers</frontend_realm>”

Response

<frontend_realm id='1' href='https://localhost/conductor/api/frontend_realms/1'>
 <name>public-realm</name>
 <description>public providers</description>
 <provider_realms></provider_realms>
 <providers></providers>
</frontend_realm>

List all frontend realms

Request

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

Response

<frontend_realms>
<frontend_realm href='https://localhost/conductor/api/frontend_realms/1' id='1'></frontend_realm>
<frontend_realm href='https://localhost/conductor/api/frontend_realms/3' id='3'></frontend_realm>
<frontend_realm href='https://localhost/conductor/api/frontend_realms/2' id='2'></frontend_realm>
</frontend_realms>

Show a single frontend realm’s details

Request

curl -X GET --user admin:password --header "Accept: application/xml" -k  https://localhost/conductor/api/frontend_realms/1

Response

<frontend_realm id='1' href='https://localhost/conductor/api/frontend_realms/1'>
  <name>public-realm</name>
  <description>public providers</description>
  <provider_realms>
    <provider_realm id='1' href='https://localhost/conductor/api/provider_realms/1' />
    <provider_realm id='2' href='https://localhost/conductor/api/provider_realms/2' />
  </provider_realms>
  <providers>
    <provider id='1' href='https://localhost/conductor/api/providers/1' />
  </providers>
<frontend_realm>

Update a frontend realm

Request

Updates name, description, removes provider realm 2 and replaces provider 1 with provider 2.

curl -X PUT --user admin:password --header "Content-Type: application/xml"  --header "Accept: application/xml" -k  https://localhost/conductor/api/frontend_realms/1  --data
    "<frontend_realm>
       <name>updated-name</name>
       <description>modified text</description>
       <provider_realms>
         <provider_realm id='1' href='https://localhost/conductor/api/provider_realms/1' />
       </provider_realms>
       <providers>
         <provider id='2' href='https://localhost/conductor/api/providers/2' />
       </providers>
     </frontend_realm>"

Response

<frontend_realm id='1' href='https://localhost/conductor/api/frontend_realms/1'>
  <name>updated-name</name>
  <description>modified text</description>
  <provider_realms>
    <provider_realm id='1' href='https://localhost/conductor/api/provider_realms/1' />
  </provider_realms>
  <providers>
    <provider id='2' href='https://localhost/conductor/api/providers/2' />
  </providers>
</frontend_realm>

Delete a frontend realm

Request

curl -X DELETE --user admin:password --header "Accept: application/xml" -k  https://localhost/conductor/api/frontend_realms/1

Response

If success, return 204 No Content.

If failure,

<error>
  <code>RecordNotFound</code>
  <message>Couldn't find front end realm with ID=1</message>
</error>
Clone this wiki locally