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 3 Next »

This section shows the REST URIs for the following REST operations regarding the comments of a resource.

The following terms explain the meaning of the query parameters passed with the following REST URIs:

ParameterExplanation
pathPath of the resource
idIdentifier of the comment
startStart page number
sizeNumber of comments to be fetched

The {start page} and {number of records}  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 comments are retrieved. Please note that "start" and "size" are OPTIONAL parameters. If the user omits it will take the default value as 0.

Get All the Comments on a Resource

AttributesValues

HTTP Method                

GET
Request URI/comments?path={ resource path }&start={ start page }&size={ number of records }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionThis retrieves all the comments posted on the specific resource.
ResponseHTTP 200 OK
Response Typeapplication/json
Sample request

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/comments?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService" -i -k

Get a Specific Comment on a Resource

AttributesValues

HTTP Method                

GET
Request URI/comment?path={ resource path }&id={ comment id }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionThis retrieves the specific comment associated with the given comment id.
ResponseHTTP 200 OK
Response Typeapplication/json
Sample request

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/comment?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&id=1" -i -k

Add a Comment to a Resource

AttributesValues

HTTP Method                

POST
Request URI/comment?path={ resource path }
HTTP Request Header

Authorization: Basic { base64encoded(username:password) }

Content-Type: text/plain

PayloadComment appears in text format
DescriptionAdd the payload comment to the requested resource
ResponseHTTP 204 No Content
Response Typeapplication/json

 

Sample request

 

curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" -d 'Sample Comment' "https://localhost:9443/resource/1.0.0/comment?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService" -i -k

Update a Comment on a Resource

AttributesValues

HTTP Method                

PUT
Request URI/comment?path={ resource path }&id={ comment id}
HTTP Request Header

Authorization: Basic { base64encoded(username:password) }

Content-Type: text/plain

PayloadNew comment to be updated as TEXT.
DescriptionIt replaces the new comment for the given comment id
ResponseHTTP 204 No Content
Response Typeapplication/json
Sample request

curl -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" -d 'Sample 123' "https://localhost:9443/resource/1.0.0/comment?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&id=2" -i -k

Delete a Comment on a Resource

AttributesValues

HTTP Method                

DELETE
Request URI/comment?path={ resource path }&id={ comment id}
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
ResponseHTTP 204 No Content
Response Typeapplication/json
Sample request

curl -X DELETE -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" -d 'Sample 123 sdfsdafsdfdsfdsasdf' "https://localhost:9443/resource/1.0.0/comment?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&id=1" -i -k

  • No labels