forked from aeolusproject/conductor
-
Notifications
You must be signed in to change notification settings - Fork 0
Realms_ _Front_End
Matt Wagner edited this page Oct 25, 2012
·
1 revision
{{toc}}
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><name>pool1name</name><description>some text</description></frontend_realm>"
Response
<frontend_realm id="1" href="https://localhost/conductor/api/frontend_realms/1">
<name>pool1name</name>
<description>some text</description>
<realm_mappings></realm_mappings>
</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='http://localhost:3000/api/frontend_realms/1' id='1'></frontend_realm>
<frontend_realm href='http://localhost:3000/api/frontend_realms/3' id='3'></frontend_realm>
<frontend_realm href='http://localhost:3000/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>pool1name</name>
<description>some text</description>
<realm_mappings>
<realm_mapping id="1" href='"https://localhost/conductor/api/realm_mappings/1">
<realm_mapping id="2" href='"https://localhost/conductor/api/realm_mappings/2">
</realm_mappings>
<frontend_realm>
Request
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></frontend_realm>"
Response
<frontend_realm id="1" href="https://localhost/conductor/api/frontend_realms/1">
<name>updated-name</name>
<description>modified text</description>
<realm_mappings></realm_mappings>
</frontend_realm>
Request
curl -X DELETE --user admin:password --header "Accept: application/xml" -k https://localhost/conductor/api/frontend_realms/1
Response
If success,
<frontend_realm id="1">
<status>DELETED</status>
</frontend_realm>
If failure,
<code>
<error>
<code>RecordNotFound</code>
<message>Couldn't find front end realm with ID=1</message>
</error>
</code>