This section explains the following REST operations regarding the property of resources which have been secured with OAuth 2.0.
The following terms explain the meaning of the parameters passed with the following REST URIs
Parameter | Explanation |
---|---|
path | Path of the resource |
OAuth access token | Authorized access token per user for an hour by default |
name | name of the property on the given resource |
array of values | Array of values for the property eg: ["val1","val2","val3",......] |
start | start page number |
size | number of tags to be fetched |
user | username of the user |
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 properties are retrieved.
Get all the Properties of a Resource
Attributes | Values |
---|---|
HTTP Method | GET |
Request URI | /properties?path={ resource path }&start={ start page }&size={ number of records }&user={ user name } |
HTTP Request Header | Authorization: Bearer { OAuth access token } |
Description | This retrieves all the properties posted on the specific resource with a specified start page and size. |
Response Type | JSON |
Get a Property of a Given Resource
Attributes | Values |
---|---|
HTTP Method | GET |
Request URI | /property?path={ resource path }&name={ property name }&user={ user name } |
HTTP Request Header | Authorization: Bearer { OAuth access token } |
Description | This retrieves the specific property associated with the given property name. |
Response Type | JSON |
Add Properties to a Resource
Attributes | Values |
---|---|
HTTP Method | POST |
Request URI | /property?path={ resource path }&user={ user name } |
HTTP Request Header | Authorization: Bearer { OAuth access token } Content-Type: application/json |
Payload | [ {"name":"<property name>","value":[<array of values>] } ] |
Description | Add the array of properties for the given resource |
Response Type | JSON |
Update Properties of a Given Resource
Attributes | Values |
---|---|
HTTP Method | PUT |
Request URI | /property?path={ resource path }&user={ user name } |
HTTP Request Header | Authorization: Bearer { OAuth access token } Content-Type: application/json |
Payload | [ {"name":"<property name>","value":[<array of updated values>] }] |
Description | Update the respective properties with the newly passed array of properties |
Response Type | JSON |
Delete a Property of a Given Resource
Attributes | Values |
---|---|
HTTP Method | DELETE |
Request URI | /property?path={ resource path }&name={property name}&user={ user name } |
HTTP Request Header | Authorization: Bearer { OAuth access token } |
Description | Deletes the specified property from the given resource |
Response Type | JSON |