-
Notifications
You must be signed in to change notification settings - Fork 27
Realms (Front End)
danmacpherson edited this page Feb 7, 2013
·
1 revision
DRAFT
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>
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>
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>
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>
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>