Comments
The Comments API supports managing comments.
Create app comment
POST /api/apps/{id}/comments
Creates a new comment in the specified Comments app.
Sample request
$ curl {WEAVY_SERVER}/api/apps/1/comments
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
-H "Content-Type: application/json"
-d "{ 'text': 'This is a comment' }"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | App id |
Request body
application/json
{
"blobs?": [
"integer"
],
"embed_id?": "integer",
"meeting_id?": "integer",
"options?": [
{
"text": "string"
}
],
"text?": "string",
"metadata?": {},
"tags?": [
"string"
]
}
Note. Properties marked with ? are optional.
Responses
Status code 200
application/json
{
"id": "integer",
"app_id": "integer",
"text": "string",
"html": "string",
"plain": "string",
"attachment_count": "integer",
"attachments": [
"object"
],
"embed_id": "integer",
"meeting_id": "integer",
"option_count": "integer",
"options": [
"object"
],
"reactions": [
"object"
],
"tags": [
"string"
],
"created_at": "string",
"created_by_id": "integer",
"modified_at": "string",
"modified_by_id": "integer",
"is_trashed": "boolean"
}
List app comments
GET /api/apps/{id}/comments
List comments in the specified Comments app.
Sample request
$ curl {WEAVY_SERVER}/api/apps/1/comments?top=20
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | App id. |
q | string | False | |
tag | string | False | |
trashed | boolean | False | |
order_by | string | False | |
top | integer | False | |
skip | integer | False | |
count | boolean | False | |
count_only | boolean | False |
Responses
Status code 200
application/json
{
"data": [
"object"
],
"start": "integer",
"end": "integer",
"count": "integer"
}
Create file comment
POST /api/files/{id}/comments
Creates a new comment on the specified file.
Sample request
$ curl {WEAVY_SERVER}/api/files/1/comments
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
-H "Content-Type: application/json"
-d "{ 'text': 'This is a comment on a file' }"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | File id |
Request body
application/json
{
"blobs?": [
"integer"
],
"embed_id?": "integer",
"meeting_id?": "integer",
"options?": [
{
"text": "string"
}
],
"text?": "string",
"metadata?": {},
"tags?": [
"string"
]
}
Note. Properties marked with ? are optional.
Responses
Status code 200
application/json
{
"id": "integer",
"app_id": "integer",
"text": "string",
"html": "string",
"plain": "string",
"attachment_count": "integer",
"attachments": [
"object"
],
"embed_id": "integer",
"meeting_id": "integer",
"option_count": "integer",
"options": [
"object"
],
"reactions": [
"object"
],
"tags": [
"string"
],
"created_at": "string",
"created_by_id": "integer",
"modified_at": "string",
"modified_by_id": "integer",
"is_trashed": "boolean"
}
List file comments
GET /api/files/{id}/comments
List comments on the specified file.
Sample request
$ curl {WEAVY_SERVER}/api/files/1/comments?top=20
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | File id. |
q | string | False | |
tag | string | False | |
trashed | boolean | False | |
order_by | string | False | |
top | integer | False | |
skip | integer | False | |
count | boolean | False | |
count_only | boolean | False |
Responses
Status code 200
application/json
{
"data": [
"object"
],
"start": "integer",
"end": "integer",
"count": "integer"
}
Create post comment
POST /api/posts/{id}/comments
Creates a new comment on the specified post.
Sample request
$ curl {WEAVY_SERVER}/api/posts/1/comments
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
-H "Content-Type: application/json"
-d "{ 'text': 'This is a comment on a post' }"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Post id |
Request body
application/json
{
"blobs?": [
"integer"
],
"embed_id?": "integer",
"meeting_id?": "integer",
"options?": [
{
"text": "string"
}
],
"text?": "string",
"metadata?": {},
"tags?": [
"string"
]
}
Note. Properties marked with ? are optional.
Responses
Status code 200
application/json
{
"id": "integer",
"app_id": "integer",
"text": "string",
"html": "string",
"plain": "string",
"attachment_count": "integer",
"attachments": [
"object"
],
"embed_id": "integer",
"meeting_id": "integer",
"option_count": "integer",
"options": [
"object"
],
"reactions": [
"object"
],
"tags": [
"string"
],
"created_at": "string",
"created_by_id": "integer",
"modified_at": "string",
"modified_by_id": "integer",
"is_trashed": "boolean"
}
List post comments
GET /api/posts/{id}/comments
List comments on the specified post.
Sample request
$ curl {WEAVY_SERVER}/api/posts/1/comments?top=20
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Post id. |
q | string | False | |
tag | string | False | |
trashed | boolean | False | |
order_by | string | False | |
top | integer | False | |
skip | integer | False | |
count | boolean | False | |
count_only | boolean | False |
Responses
Status code 200
application/json
{
"data": [
"object"
],
"start": "integer",
"end": "integer",
"count": "integer"
}
Get comment
GET /api/comments/{id}
Gets a comment by id.
Sample request
$ curl {WEAVY_SERVER}/api/comments/1
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Id of the comment. |
trashed | boolean | False |
Responses
Status code 200
application/json
{
"id": "integer",
"app_id": "integer",
"text": "string",
"html": "string",
"plain": "string",
"attachment_count": "integer",
"attachments": [
"object"
],
"embed_id": "integer",
"meeting_id": "integer",
"option_count": "integer",
"options": [
"object"
],
"reactions": [
"object"
],
"tags": [
"string"
],
"created_at": "string",
"created_by_id": "integer",
"modified_at": "string",
"modified_by_id": "integer",
"is_trashed": "boolean"
}
Update comment
PATCH /api/comments/{id}
Updates a comment.
Sample request
$ curl -X PATCH {WEAVY_SERVER}/api/comments/1
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
-H "Content-Type: application/json"
-d "{'text': 'Update comment text' }"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Id of the comment. |
Request body
application/json
{
"attachments?": [
"integer"
],
"blobs?": [
"integer"
],
"embed_id?": "integer",
"meeting_id?": "integer",
"options?": [
{
"id?": "integer",
"text": "string"
}
],
"text?": "string",
"metadata?": {},
"tags?": [
"string"
]
}
Note. Properties marked with ? are optional.
Responses
Status code 204
No Content
Status code 404
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}
Status code 400
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}
Delete comment
DELETE /api/comments/{id}
Delete a comment.
Sample request
$ curl -X DELETE {WEAVY_SERVER}/api/comments/1
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Id of the comment. |
Responses
Status code 204
No Content
Trash comment
POST /api/comments/{id}/trash
Move a comment to the trash.
Sample request
$ curl -X POST {WEAVY_SERVER}/api/comments/1/trash
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Id of the comment to trash. |
Responses
Status code 200
application/json
{
"id": "integer",
"app_id": "integer",
"text": "string",
"html": "string",
"plain": "string",
"attachment_count": "integer",
"attachments": [
"object"
],
"embed_id": "integer",
"meeting_id": "integer",
"option_count": "integer",
"options": [
"object"
],
"reactions": [
"object"
],
"tags": [
"string"
],
"created_at": "string",
"created_by_id": "integer",
"modified_at": "string",
"modified_by_id": "integer",
"is_trashed": "boolean"
}
Status code 404
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}
Status code 400
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}
Restore comment
POST /api/comments/{id}/restore
Restore a comment from the trash.
Sample request
$ curl -X POST {WEAVY_SERVER}/api/comments/1/restore
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Id of the comment to restore. |
Responses
Status code 200
application/json
{
"id": "integer",
"app_id": "integer",
"text": "string",
"html": "string",
"plain": "string",
"attachment_count": "integer",
"attachments": [
"object"
],
"embed_id": "integer",
"meeting_id": "integer",
"option_count": "integer",
"options": [
"object"
],
"reactions": [
"object"
],
"tags": [
"string"
],
"created_at": "string",
"created_by_id": "integer",
"modified_at": "string",
"modified_by_id": "integer",
"is_trashed": "boolean"
}
Indicate typing (file)
PUT /api/files/{id}/comments/typing
Indicate that the authenticated user is commenting on a file.
Sample request
$ curl -X PUT {WEAVY_SERVER}/api/files/1/comments/typing
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | File id. |
Responses
Status code 204
No Content
Indicate typing (post)
PUT /api/posts/{id}/comments/typing
Indicate that the authenticated user is commenting on a post.
Sample request
$ curl -X PUT {WEAVY_SERVER}/api/posts/1/comments/typing
-H "Authorization: Bearer {ACCESS_TOKEN}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Post id. |
Responses
Status code 204
No Content