Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

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

ParameterExplanation
pathPath of the resource
OAuth access tokenAuthorized access token per user for an hour by default
nameName of the property on the given resource

array of values

Array of values for the property eg: [ {"name":"Name","value":["Ajith","Eranda"]} ]
startStart page number
sizeNumber of tags to be fetched
userUsername 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

AttributesValues

HTTP Method                

GET
Request URI/properties?path={ resource path }&start={ start page }&size={ number of records }
HTTP Request HeaderAuthorization: Bearer { OAuth access token }
DescriptionThis retrieves all the properties posted on the specific resource with a specified start page and size.
ResponseHTTP 200 OK
Response TypeJSON

Get a Property of a Given Resource

AttributesValues

HTTP Method                

GET
Request URI/property?path={ resource path }&name={ property name }&user={ user name }
HTTP Request HeaderAuthorization: Bearer { OAuth access token }
DescriptionThis retrieves the specific property associated with the given property name.
ResponseHTTP 200 OK
Response TypeJSON

Add Properties to a Resource

AttributesValues

HTTP Method                

PUT
Request URI/property?path={ resource path }&user={ user name }
HTTP Request Headers

Authorization: Bearer { OAuth access token }

Content-Type: application/json

Payload[ {"name":"propperty1","value":["value1","value2"]} ]     
DescriptionAdd the array of properties for the given resource
Response204 No Content
Response TypeJSON

Update Properties of a Given Resource

AttributesValues

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 
DescriptionUpdate the respective properties with the newly passed array of properties
Response TypeJSON

Delete a Property of a Given Resource

AttributesValues

HTTP Method                

DELETE
Request URI/property?path={ resource path }&name={property name}&user={ user name }
HTTP Request HeaderAuthorization: Bearer { OAuth access token }
DescriptionDeletes the specified property from the given resource
Response TypeJSON

 

 

  • No labels