This section explains the following REST operations regarding the associations / association of the resource which have been secured with OAuth 2.0.
...
Note | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The following terms explain the meaning of the query parameters passed with the following REST URIs.
|
Note |
---|
The { start page } and { number of records } parameters can take any value greater than or equal to 0. The { start page } and { number of records } begins with 1. If both of them are 0, then all the associations are retrieved. |
...
Attributes | Values |
---|---|
HTTP Method | GET |
Request URI | /associations?path={ resource path }&start={ start page }&size={ number of records }&user={ user name } |
HTTP Request Header | Authorization: Bearer { OAuth access token } |
Response | It retrieves all the associations posted on the specific resource. |
Response | HTTP 200 OK |
Response TypeJSON | application/json |
Get Associations of Specific Type on a Given Resource
Attributes | Values |
---|---|
HTTP Method | GET |
Request URI | /associations?path={ resource path }&type={ association type }&user={ user name } |
HTTP Request Header | Authorization: Bearer {OAuth access token} |
ResponseDescription | It retrieves all the associations for the specific type on of the given resource |
Response | HTTP 200 OK |
Response TypeJSON | application/json |
Add Associations to a Resource
Attributes | Values |
---|---|
HTTP Method | POST |
Request URI | /associationassociations?path={resource path}&user={ user name } |
HTTP Request Header | Authorization: Bearer {OAuth access token} Content-Type: application/json |
Payload | [{ "targettype":"<target resource path><type of the association>","typetarget":"<association type><valid resource path>"}] |
Description | It adds the array of associations passed as the payload for the source resource |
Response | HTTP 204 No Content. |
Response Type | JSON |
...
application/json |
Add Association to a Resource
Attributes | Values |
---|---|
HTTP Method | DELETEPOST |
Request URI | /associationassociations?path={resource path}&type={association type}&targettargetPath={target resource path}&usertype={ user name assocation type} |
HTTP Request Header | Authorization: Bearer {OAuth access token} Content-Type: application/json |
Response | HTTP 204 No Content. |
Response Type | application/json |
Delete Associations on a Given Resource
Attributes | Values |
---|---|
HTTP Method | DELETE |
Request URI | /association?path={resource path}&targetPath={target path}&type={association type} |
Description | It deletes the association between the source and target resources for the given association type. |
Response | HTTP 204 No Content. |
Response TypeJSON | application/json |