Div |
---|
style | font-weight:bold;font-size:1.2em; |
---|
|
Authorization Service Home |
REST-based API for AccountRole
The Account and Authorization Services offer a REST-based Application Programming Interface (API) to CRUD (create, read, update and delete) operations on individual account and role instances. These follow the Common model for CollectionSpace REST services. However, on the AccountRole relationship service, only CRD (create, read and delete) operations are supported.
Note that the AccountRole service does not support extensible schema. That means, the request or response contains the payload only from a single schema, the Content-type header of application/xml is used.
...
Create should use the following schema.
Code Block |
---|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:account_role xmlns:ns2="http://collectionspace.org/services/authorization">
<account>
<accountId>311e3301-9789-45d8-9422-e209eb83dd3d</accountId>
<screenName>acc-role-user1</screenName>
<userId>acc-role-user1</userId>
</account>
<role>
<roleId>69343d54-a8b9-4617-8c79-921cad0ddd64</roleId>
<roleName>ROLE_CO2</roleName>
</role>
<role>
<roleId>3534661b-4f06-4750-97a5-bab161e0db3a</roleId>
<roleName>ROLE_CO1</roleName>
</role>
</ns2:account_role>
|
Read will return the above.
Code Block |
---|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:account_role xmlns:ns2="http://collectionspace.org/services/authorization">
<account>
<accountId>311e3301-9789-45d8-9422-e209eb83dd3d</accountId>
<screenName>acc-role-user1</screenName>
<userId>acc-role-user1</userId>
</account>
<role>
<roleId>3534661b-4f06-4750-97a5-bab161e0db3a</roleId>
<roleName>ROLE_CO1</roleName>
</role>
<role>
<roleId>69343d54-a8b9-4617-8c79-921cad0ddd64</roleId>
<roleName>ROLE_CO2</roleName>
</role>
</ns2:account_role>
|
...