Comments¶
This page outlines the operations, endpoints, parameters, and example requests and responses for the Comments.
POST /api/v2/comments/¶
Post a comment
Code samples¶
# You can also use wget
curl -X POST http://10.97.84.40/api/v2/comments/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Body parameter¶
{
"content": "string",
"entityId": "string",
"entityType": "useCase",
"mentions": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | Comment | false | none |
Example responses¶
200 Response
{
"content": "string",
"createdAt": "string",
"createdBy": {
"firstName": "string",
"id": "string",
"lastName": "string",
"username": "string"
},
"entityId": "string",
"entityType": "useCase",
"id": "string",
"mentions": [
{
"firstName": "string",
"id": "string",
"lastName": "string",
"username": "string"
}
],
"updatedAt": "string"
}
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | CommentRetrieve |
201 | Created | The comment was successfully created | None |
422 | Unprocessable Entity | The request was formatted improperly | None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
DELETE /api/v2/comments/{commentId}/¶
Delete a comment
Code samples¶
# You can also use wget
curl -X DELETE http://10.97.84.40/api/v2/comments/{commentId}/ \
-H 'Authorization: Bearer {access-token}'
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
commentId | path | string | true | The ID of the comment |
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
204 | No Content | The use case comment was deleted | None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/comments/{commentId}/¶
Retrieve a comment
Code samples¶
# You can also use wget
curl -X GET http://10.97.84.40/api/v2/comments/{commentId}/ \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
commentId | path | string | true | The ID of the comment |
Example responses¶
200 Response
{
"content": "string",
"createdAt": "string",
"createdBy": {
"firstName": "string",
"id": "string",
"lastName": "string",
"username": "string"
},
"entityId": "string",
"entityType": "useCase",
"id": "string",
"mentions": [
{
"firstName": "string",
"id": "string",
"lastName": "string",
"username": "string"
}
],
"updatedAt": "string"
}
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | CommentRetrieve |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
PATCH /api/v2/comments/{commentId}/¶
Update a comment
Code samples¶
# You can also use wget
curl -X PATCH http://10.97.84.40/api/v2/comments/{commentId}/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}'
Body parameter¶
{
"content": "string",
"mentions": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
commentId | path | string | true | The ID of the comment |
body | body | CommentUpdate | false | none |
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
204 | No Content | The comment was successfully updated | None |
422 | Unprocessable Entity | The request was formatted improperly | None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/comments/{entityType}/{entityId}/¶
List comments
Code samples¶
# You can also use wget
curl -X GET http://10.97.84.40/api/v2/comments/{entityType}/{entityId}/ \
-H 'Authorization: Bearer {access-token}'
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
offset | query | integer | false | The number of records to skip over. Default 0. |
limit | query | integer | false | The number of records to return in the range from 1 to 100. Default 100. |
orderBy | query | string | false | Sort comments by a field of the comment. |
entityId | path | string | true | ID of the entity to retrieve comments of |
entityType | path | string | true | Type of the entity to retrieve a comments of, currently only useCase is supported |
Enumerated Values¶
Parameter | Value |
---|---|
orderBy | createdAt |
orderBy | -createdAt |
orderBy | updatedAt |
orderBy | -updatedAt |
entityType | useCase |
entityType | model |
entityType | catalog |
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
Schemas¶
Comment
{
"content": "string",
"entityId": "string",
"entityType": "useCase",
"mentions": [
"string"
]
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
content | string | true | maxLength: 10000 |
Content of the comment, 10000 symbols max |
entityId | string | true | ID of the entity to post the comment to | |
entityType | string | true | Type of the entity to post the comment to, currently only useCase is supported | |
mentions | [string] | false | maxItems: 100 |
A list of users IDs mentioned in the content |
Enumerated Values¶
Property | Value |
---|---|
entityType | useCase |
entityType | model |
entityType | catalog |
CommentRetrieve
{
"content": "string",
"createdAt": "string",
"createdBy": {
"firstName": "string",
"id": "string",
"lastName": "string",
"username": "string"
},
"entityId": "string",
"entityType": "useCase",
"id": "string",
"mentions": [
{
"firstName": "string",
"id": "string",
"lastName": "string",
"username": "string"
}
],
"updatedAt": "string"
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
content | string | true | Content of the comment | |
createdAt | string | true | Timestamp when the comment was created | |
createdBy | CommentUser | true | User object with information about the comment author | |
entityId | string | true | ID of the entity the comment posted to | |
entityType | string | true | Type of the entity to post the comment to, currently only useCase is supported | |
id | string | true | ID of the comment | |
mentions | [CommentUser] | true | A list of users objects (see below) mentioned in the content | |
updatedAt | string | true | Timestamp when the comment was updated |
Enumerated Values¶
Property | Value |
---|---|
entityType | useCase |
entityType | model |
entityType | catalog |
CommentUpdate
{
"content": "string",
"mentions": [
"string"
]
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
content | string | true | maxLength: 10000 |
Updated content of the comment, 10000 symbols max |
mentions | [string] | false | maxItems: 100 |
A list of users IDs mentioned in the content |
CommentUser
{
"firstName": "string",
"id": "string",
"lastName": "string",
"username": "string"
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
firstName | string | true | First name of the commenter | |
id | string | true | User ID of the commenter | |
lastName | string | true | Last name of the commenter | |
username | string | true | Username of the commenter |