Enterprise Data Catalog REST API Reference > Object APIs > Object Reviews APIs
  

Object Reviews APIs

You can use the following Object Reviews REST APIs for the objects in the catalog:
Model Information REST API
Description
GET data/objects/{id}/reviews
Lists the reviews and ratings for an object
POST data/objects/{id}/reviews
Creates a review for an object
GET data/objects/{id}/reviews/{reviewId}
Lists the reviews and ratings for a specific review
PUT data/objects/{id}/reviews/{reviewId}
Updates a specific review
DELETE data/objects/{id}/reviews/{reviewId}
Deletes a specific review
GET data/objects/{id}/reviews/{reviewId}/vote
Lists aggregated votes for a review
POST data/objects/{id}/reviews/{reviewId}/vote
Creates a vote for a review
DELETE data/objects/{id}/reviews/{reviewId}/vote
Deletes a vote for a review

List All the Reviews and Ratings for an Object

{id}/reviews
API to list all the reviews and ratings for a data object.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/reviews
HTTP Method Type
GET

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of the data object.
Path
String
userFilter
Optional
Choose one of the following user-based filter parameters:
  • - MY_REVIEW_ONLY
  • - EXCLUDING_MY_REVIEW
Query
String
ratingFilter
Optional
Choose one of the following rating filters:
  • - ONE_AND_ABOVE
  • - TWO_AND_ABOVE
  • - THREE_AND_ABOVE
  • - FOUR_AND_ABOVE
Query
String
sortOn
Optional
Choose one of the following parameters to sort comments:
  • - TIMESTAMP
  • - VOTE_COUNT
  • - RATING
Query
String
offset
Optional
The offset position from which the API lists the results.
Default is 0.
Query
Integer
pageSize
Optional
The number of results to be display in a page.
Default is 20.
Query
Integer

Response Codes

Code
Reason
200
Returned all reviews and ratings on single object.
400
Missing or invalid parameter.
401
Missing credentials.
403
User does not have the required access permissions.
404
Requested object not found.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X GET "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/34523/reviews?userFilter=MY_REVIEW_ONLY&ratingFilter=FOUR_AND_ABOVE&sortOn=VOTE_COUNT&offset=0&pageSize=20" -H "accept: application/json"

Create a Review for an Object

{id}/reviews
API to create a review for a data object.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/reviews
HTTP Method Type
POST

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of the data object.
Path
String
object
Required
Enter the following review options:
  • - ratings. Enter the rating type and rating value. You can rate a review on a scale of 1 through 5.
  • - reviewText. Enter a review for the object.
Body
-

Response Codes

Code
Reason
201
Created a review for the specified data object.
400
Missing or invalid parameter.
401
Missing credentials.
403
User does not have the required access permissions.
404
Requested object not found.
412
Conflicting edit detected.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X POST "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/22234/reviews" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"ratings\": [ { \"ratingType\": \"Good\", \"ratingValue\": 3 } ], \"reviewText\": \"Good.\"}"

List the Details for a Review

{id}/reviews/{reviewId}
API to list the review details.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/reviews/{reviewId}
HTTP Method Type
GET

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of the data object.
Path
String
reviewId
Required
The ID of the review.
Path
String

Response Codes

Code
Reason
200
Review object.
400
Missing or invalid parameter.
401
Missing credentials.
403
User does not have the required access permissions.
404
Requested object not found.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X GET "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/34678/reviews/875" -H "accept: application/json"

Update An Existing Review

{id}/reviews/{reviewId}
API to update an existing review for a data object.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/reviews/{reviewId}
HTTP Method Type
PUT

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of a data object.
Path
String
reviewId
Required
The ID of a review.
Path
String
object
Required
Enter the following review options:
  • - ratings. Enter the rating type and rating value. You can rate a review on a scale of 1 through 5.
  • - reviewText. Enter a review for the object.
Body
-
If-Match
Optional
Identify the ETag for the resource. Enterprise Data Catalog does not update the resource if the ETag for the resource has changed.
Header
String

Response Codes

Code
Reason
201
Updated the review.
400
Missing or invalid parameter.
401
Missing credentials.
403
User does not have the required access permissions.
404
Requested object not found.
412
Conflicting edit detected.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X PUT "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/87656/reviews/5456" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"ratings\": [ { \"ratingType\": \"Good\", \"ratingValue\": 3 } ], \"reviewText\": \"Helpful\"}"

Delete Reviews and Ratings for a Data Object

{id}/reviews/{reviewId}
API to delete the reviews and ratings for a data object.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/data/objects/{id}/reviews/{reviewId}
HTTP Method Type
DELETE

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of the data object.
Path
String
reviewId
Required
The ID of the review.
Path
String

Response Codes

Code
Reason
200
Deleted reviews and ratings for the data object.
204
No content to display.
400
Missing or invalid parameter.
401
Missing credentials.
403
User does not have the required access permissions.
404
Requested object not found.
412
Conflicting edit detected.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X DELETE "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/23453/reviews/22224" -H "accept: application/json"

List the Aggregated Votes for a Review

{id}/reviews/{reviewId}/vote
API to list the total number of votes for the specified review.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/reviews/{reviewId}/vote
HTTP Method Type
GET

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of the data object.
Path
String
reviewId
Required
The ID of the review.
Path
String

Response Codes

Code
Reason
200
Listed the votes for the specified review.
400
Missing or invalid parameter.
401
Missing credentials.
403
User does not have the required access permissions.
404
Requested object not found.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X GET "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/3424/reviews/332/vote" -H "accept: application/json"

Create a Vote for a Review

{id}/reviews/{reviewId}/vote
API to create a vote for a review.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/reviews/{reviewId}/vote
HTTP Method Type
POST

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of the data object.
Path
String
reviewId
Required
The ID of a review.
Path
String
object
Required
Enter HELPFUL or NOT_HELPFUL as voteKind.
Body
-

Response Codes

Code
Reason
200
Upvote on comment.
201
Created a vote for the specified review successfully.
400
Missing or invalid parameter.
401
Missing credentials.
403
User does not have the required access permissions.
404
Requested object not found.
412
Conflicting edit detected.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X POST "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/3456/reviews/333/vote" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"voteKind\": \"HELPFUL\"}"

Delete Votes for a Review

{id}/reviews/{reviewId}/vote
API to delete the vote for a specific review.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/data/objects/{id}/reviews/{reviewId}/vote
HTTP Method Type
DELETE

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of the data object.
Path
String
reviewId
Required
The ID of the review.
Path
String

Response Codes

Code
Reason
200
Deleted the votes for the specified review.
204
No content to display.
400
Missing or invalid parameter.
401
Missing credentials.
403
User does not have the required access permissions.
404
Requested object not found.
412
Conflicting edit detected.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X DELETE "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/3333/reviews/223/vote" -H "accept: application/json"