||
Skip to end of metadata
Go to start of metadata

This section explains the REST operations for working the ratings of resources that have been secured with Basic Auth.

Query parameters

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

ParameterExplanation
pathPath of the resource
valueUser's rating of the given resource. It varies in range from 1-5.

For details on security (the authorization header) and the URI syntax (port, context, etc.), see Registry REST API.

Get the rating of a resource

AttributesValues

HTTP Method                

GET
Request URI/rating?path={ resource path }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionIt retrieves the current overall rating and the user's rating of the requested resource.
ResponseHTTP 200 OK
Response TypeJSON
Sample request

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


Add a rating to a resource

AttributesValues

HTTP Method                

POST
Request URI/rate?path={ resource path }&value={ your rating }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionIt adds the user's rating for the resource. The rating can vary between 0 and 5.
ResponseHTTP 204 No Content
Response TypeJSON
Sample request

curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/rate?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&value=4" -i -k


Delete the user's rating of a resource

AttributesValues

HTTP Method                

DELETE
Request URI/rate?path={ resource path }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionIt deletes the user's rating for the specified resource.
ResponseHTTP 204 No Content
Response TypeJSON
Sample request

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

 

  • No labels