The ApplicationPreference API is intended to support the COmanage Registry user interface, and does not follow many of the usual patterns of the REST API. This API is considered experimental, and may change across minor releases without notice.
The ApplicationPreference API uses the web browser's session for authentication and to determine the subject CO Person for each request. It is not possible to store or retrieve preferences for other CO People via this API.
Retrieve
Retrieve an Application Preference.
Request Format
Method |
|
---|---|
URL |
|
Request Body |
Response Format
HTTP Status | Response Body | Description |
---|---|---|
| A JSON document with three members:
| ApplicationPreference obtained for the current user and tag |
| A tag was not provided in the request | |
| Authentication required |
Store
Store an Application Preference.
Request Format
Method |
|
---|---|
URL |
|
Request Body | A JSON document with one member:
|
Response Format
HTTP Status | Response Body | Description |
---|---|---|
| Application Preference stored | |
| A tag was not provided in the request | |
| Authentication required | |
| Unknown error |
The tag's value may be a JSON null
, to indicate the value should be unset. There is no separate delete request.
Notes
- The tag's value may be a JSON
null
if the tag has no value or if the tag has not previously defined. In other words, there is no functional difference between an empty tag and an undefined tag. - A tag with a dot (
.
) in it (eg:User.setting
) may be misparsed by the framework into a file extension (of type.setting
). To avoid this, simply append an extra slash (/
) to the request URL. eg:/application_preferences/User.setting/
See Also
- cm_application_preferences data model definition