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

Object Comments APIs

You can use the following Object Comments REST APIs for the objects in the catalog:
Model Information REST API
Description
GET data/objects/{id}/comments
Lists all the comments
POST data/objects/{id}/comments
Creates a top-level comment for an object
GET data/objects/{id}/comments/{commentId}
Lists a specific comment for an object
PUT data/objects/{id}/comments/{commentId}
Updates a specific comment for an object
DELETE data/objects/{id}/comments/{commentId}
Deletes a specific comment for an object
GET data/objects/{id}/comments/{commentId}/replies
Lists all the replies to a comment
POST data/objects/{id}/comments/{commentId}/replies
Creates a reply for a comment
GET data/objects/{id}/comments/{commentId}/replies/{replyId}
Lists the reply for a specific comment
PUT data/objects/{id}/comments/{commentId}/replies/{replyId}
Updates a reply for a specific comment
DELETE data/objects/{id}/comments/{commentId}/replies/{replyId}
Deletes a reply for a specific comment
GET data/objects/{id}/comments/{commentId}/reply/{replyId}/vote
Lists the aggregated votes for a reply
POST data/objects/{id}/comments/{commentId}/reply/{replyId}/vote
Updates the vote for a specific reply
DELETE data/objects/{id}/comments/{commentId}/reply/{replyId}/vote
Deletes the vote for a specific reply
GET data/objects/{id}/comments/{commentId}/vote
Lists the aggregated votes for a comment
POST data/objects/{id}/comments/{commentId}/vote
Updates the vote for a specific comment
DELETE data/objects/{id}/comments/{commentId}/vote
Deletes the vote for a specific comment

List the Comments for an Object

data/objects/{id}/comments
API to list the comments for an object.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments
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
filter
Optional
Choose one of the following filters:
  • - MY_QUESTIONS
  • - UNANSWERED_QUESTIONS
  • - ANSWERED_QUESTIONS
  • - EXCLUDING_MY_QUESTIONS
Query
String
sortOn
Optional
Choose TIMESTAMP to sort based on timestamp.
Query
String
replyLimit
Optional
Limits the number of replies to a comment.
Query
Integer
offset
Optional
The offset position from which the API lists the comments.
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
Requested comment sent through API response.
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/1001/comments?filter=MY_QUESTIONS&sortOn=TIMESTAMP&replyLimit=4&offset=0&pageSize=20" -H "accept: application/json"

Create Comment

data/objects/{id}/comments
API to create a new top-level comment for the specified object.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments
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 parameters as necessary:
  • - text. Enter the comments for the object.
  • - type. Enter QUESTION, ANSWER, or OTHERS as the comment type.
Body
-

Response Codes

Code
Reason
201
Created a comment for the specified 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/1002/comments" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"text\": \"Comment5\", \"type\": \"Query regarding object.\"}"

List a Specific Comment for an Object

data/objects/{id}/comments/{commentId}
API to list a specific comment for a data object.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}
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
commentId
Required
The ID of the comment.
Path
String

Response Codes

Code
Reason
200
Requested comment sent through API response.
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 GET "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/1003/comments/54" -H "accept: application/json"

Update Existing Comments for an Object

data/objects/{id}/comments/{commentId}
API to update an existing comment.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}
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
commentId
Required
The ID of a comment.
Path
String
object
Required
Enter the following parameters as necessary:
  • - text. Enter the comments for the object.
  • - type. Enter QUESTION, ANSWER, or OTHERS as the comment type.
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
200
Updated the comment.
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/1002/comments/192" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"text\": \"new object\", \"type\": \"Have a query regarding this.\"}"

Delete Replies

data/objects/{id}/comments/{commentId}
API to delete the replies for the specified comment.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}
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
commentId
Required
The ID of the comment.
Path
String

Response Codes

Code
Reason
200
Deleted the replies for the specified comment.
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/1090/comments/222" -H "accept: application/json"

List All the Replies for an Object

data/objects/{id}/comments/{commentId}/replies
API to list all the replies for a comment.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/replies
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
commentId
Required
The ID of the comment.
Path
String
sortOn
Optional
Choose one of the following parameters to sort the comments:
  • - TIMESTAMP
  • - VOTE_COUNT
  • - CREATED_BY
Query
String
offset
Optional
The offset position from which the API lists the comments.
Default is 0.
Query
Integer
pageSize
Optional
The number of results to display in a page.
Default is 20.
Query
Integer

Response Codes

Code
Reason
200
Listed all the replies for the specified comment.
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/19992/comments/321/replies?sortOn=TIMESTAMP&offset=0&pageSize=20" -H "accept: application/json"

Create a Reply for a Comment

{id}/comments/{commentId}/replies
API to create a reply for the specified comment.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/replies
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
commentId
Required
The ID of the comment.
Path
String
object
Required
Enter the reply text.
Body
-

Response Codes

Code
Reason
201
Created a reply for the comment.
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 POST "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/1020/comments/112/replies" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"text\": \"Replying to a comment\"}"

List a Specific Reply

{id}/comments/{commentId}/replies/{replyId}
API to display a specific reply.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/replies/{replyId}
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
commentId
Required
The ID of the comment.
Path
String
replyId
Required
The ID of the reply.
Path
String

Response Codes

Code
Reason
200
Listed the specified reply.
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/232/comments/333/replies/123" -H "accept: application/json"

Update a Specific Reply

{id}/comments/{commentId}/replies/{replyId}
API to update a specific reply.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/replies/{replyId}
HTTP Method Type
PUT

Request Parameters

Parameter
Required or Optional
Description
Parameter Type
Data Type
id
Required
The ID of the data object.
Path
String
commentId
Required
The ID of a comment.
Path
String
replyId
Required
The ID of a reply.
Path
String
object
Required
Enter the reply text.
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 reply.
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/1111/comments/23/replies/11" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"text\": \"Response to comment 23\"}"

Delete a Reply for a Comment

{id}/comments/{commentId}/replies/{replyId}
API to delete a specific reply.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/replies/{replyId}
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
commentId
Required
The ID of the comment.
Path
String
replyId
Required
The ID of the reply.
Path
String

Response Codes

Code
Reason
200
Deleted the specified reply.
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.
429
Rate limit for requests encountered.

Sample Call Using Curl

curl -X DELETE "http://<CatalogAdmin>:<port>/access/2/catalog/data/objects/333/comments/21/replies/222" -H "accept: application/json"

List the Aggregated Votes for a Reply

{id}/comments/{commentId}/reply/{replyId}/vote
API to list the total number of votes for a specific reply.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/reply/{replyId}/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
commentId
Required
The ID of the comment.
Path
String
replyId
Required
The ID of the reply.
Path
String

Response Codes

Code
Reason
200
Requested reply sent through API response.
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/333/comments/2223/reply/432/vote" -H "accept: application/json"

Create a Vote for a Reply to a Comment

{id}/comments/{commentId}/reply/{replyId}/vote
API to create a vote for a specific reply.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/reply/{replyId}/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
commentId
Required
The ID of the comment.
Path
String
replyId
Required
The ID of the reply.
Path
String
object
Required
Enter a brief description for the parameter voteKind.
Body
-

Response Codes

Code
Reason
201
Created a vote for the specified reply to a comment.
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/121/comments/231/reply/221/vote" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"voteKind\": \"HELPFUL\"}"

Delete the Vote for a Reply

{id}/comments/{commentId}/reply/{replyId}/vote
API to delete the votes for a specific reply.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/reply/{replyId}/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
commentId
Required
The ID of the comment.
Path
String
replyId
Required
The ID of the reply.
Path
String

Response Codes

Code
Reason
200
Deleted the vote for the specified reply.
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/121/comments/222/reply/32/vote" -H "accept: application/json"

List the Aggregated Votes for a Comment

{id}/comments/{commentId}/vote
API to list the total number of votes for a comment.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/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
commentId
Required
The ID of the comment.
Path
String

Response Codes

Code
Reason
200
Requested comment sent through API response.
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/1444/comments/342/vote" -H "accept: application/json"

Create a Vote for a Comment

{id}/comments/{commentId}/vote
API to create a vote for the specified comment.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/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
commentId
Required
The ID of the comment.
Path
String
object
Required
Enter HELPFUL or NOT_HELPFUL as voteKind.
Body
-

Response Codes

Code
Reason
201
Created a vote for the specified comment.
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/2/comments/3/vote" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"voteKind\": \"HELPFUL\"}"

Delete the Votes for a Comment

{id}/comments/{commentId}/vote
API to delete the votes for a specific comment.
REST API Element
Input Format
Request URL
<CatalogAdmin>:<port>/access/2/catalog/data/objects/{id}/comments/{commentId}/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
commentId
Required
The ID of the comment.
Path
String

Response Codes

Code
Reason
200
Deleted the vote for the comment.
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/233/comments/22/vote" -H "accept: application/json"