Comments

The Comments API supports managing comments.

Create app comment

Creates a new comment in the specified Comments app.

POST /api/apps/{app}/comments
Path parameters
app string required

App identifier (id or uid)

Body parameters
blobs array of strings

Ids of blobs to attach.

embed_id string

Id of embed to attach.

meeting_id string

Id of meeting to attach.

options array of objects

List of poll options to attach.

text string

The message text.

metadata object

Additional metadata properties, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the item.

Example request
curl {WEAVY-URL}/api/apps/acme-comments/comments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'text': 'This is a comment' }"
Response codes

201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Validation Failed

Response schema
{
  "id": "string",
  "app": {
    "id": "string",
    "rev": "string",
    "type": "string",
    "uid": "string",
    "name": "string",
    "description": "string",
    "archive_url": "string",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "access": "object",
    "directory_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_pinned": "boolean",
    "is_starred": "boolean",
    "is_subscribed": "boolean",
    "is_trashed": "boolean",
    "is_unread": "boolean",
    "permissions": [
      "object"
    ]
  },
  "parent": {
    "id": "string",
    "type": "object"
  },
  "text": "string",
  "html": "string",
  "plain": "string",
  "embed": {
    "id": "string",
    "type": "object",
    "title": "string",
    "description": "string",
    "url": "string",
    "thumbnail_url": "string",
    "actions": [
      "string"
    ],
    "metadata": "object",
    "author_name": "string",
    "author_url": "string",
    "provider_name": "string",
    "provider_url": "string",
    "html": "string",
    "width": "string",
    "height": "string"
  },
  "meeting": {
    "id": "string",
    "provider": "string",
    "provider_id": "string",
    "join_url": "string",
    "code": "string",
    "created_at": "string",
    "metadata": "object"
  },
  "annotations": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "attachments": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "options": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "reactions": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "metadata": "object",
  "tags": [
    "string"
  ],
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_reported": "boolean",
  "reported_at": "string",
  "is_trashed": "boolean",
  "created_at": "string",
  "created_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  },
  "updated_at": "string",
  "updated_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  }
}

Create file comment

Creates a new comment on the specified file.

POST /api/files/{id}/comments
Path parameters
id integer required

File id

Body parameters
blobs array of strings

Ids of blobs to attach.

embed_id string

Id of embed to attach.

meeting_id string

Id of meeting to attach.

options array of objects

List of poll options to attach.

text string

The message text.

metadata object

Additional metadata properties, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the item.

Example request
curl {WEAVY-URL}/api/files/1/comments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'text': 'This is a comment on a file' }"
Response codes

201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Validation Failed

Response schema
{
  "id": "string",
  "app": {
    "id": "string",
    "rev": "string",
    "type": "string",
    "uid": "string",
    "name": "string",
    "description": "string",
    "archive_url": "string",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "access": "object",
    "directory_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_pinned": "boolean",
    "is_starred": "boolean",
    "is_subscribed": "boolean",
    "is_trashed": "boolean",
    "is_unread": "boolean",
    "permissions": [
      "object"
    ]
  },
  "parent": {
    "id": "string",
    "type": "object"
  },
  "text": "string",
  "html": "string",
  "plain": "string",
  "embed": {
    "id": "string",
    "type": "object",
    "title": "string",
    "description": "string",
    "url": "string",
    "thumbnail_url": "string",
    "actions": [
      "string"
    ],
    "metadata": "object",
    "author_name": "string",
    "author_url": "string",
    "provider_name": "string",
    "provider_url": "string",
    "html": "string",
    "width": "string",
    "height": "string"
  },
  "meeting": {
    "id": "string",
    "provider": "string",
    "provider_id": "string",
    "join_url": "string",
    "code": "string",
    "created_at": "string",
    "metadata": "object"
  },
  "annotations": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "attachments": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "options": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "reactions": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "metadata": "object",
  "tags": [
    "string"
  ],
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_reported": "boolean",
  "reported_at": "string",
  "is_trashed": "boolean",
  "created_at": "string",
  "created_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  },
  "updated_at": "string",
  "updated_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  }
}

Create post comment

Creates a new comment on the specified post.

POST /api/posts/{id}/comments
Path parameters
id integer required

Post id

Body parameters
blobs array of strings

Ids of blobs to attach.

embed_id string

Id of embed to attach.

meeting_id string

Id of meeting to attach.

options array of objects

List of poll options to attach.

text string

The message text.

metadata object

Additional metadata properties, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the item.

Example request
curl {WEAVY-URL}/api/posts/1/comments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'text': 'This is a comment on a post' }"
Response codes

201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Validation Failed

Response schema
{
  "id": "string",
  "app": {
    "id": "string",
    "rev": "string",
    "type": "string",
    "uid": "string",
    "name": "string",
    "description": "string",
    "archive_url": "string",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "access": "object",
    "directory_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_pinned": "boolean",
    "is_starred": "boolean",
    "is_subscribed": "boolean",
    "is_trashed": "boolean",
    "is_unread": "boolean",
    "permissions": [
      "object"
    ]
  },
  "parent": {
    "id": "string",
    "type": "object"
  },
  "text": "string",
  "html": "string",
  "plain": "string",
  "embed": {
    "id": "string",
    "type": "object",
    "title": "string",
    "description": "string",
    "url": "string",
    "thumbnail_url": "string",
    "actions": [
      "string"
    ],
    "metadata": "object",
    "author_name": "string",
    "author_url": "string",
    "provider_name": "string",
    "provider_url": "string",
    "html": "string",
    "width": "string",
    "height": "string"
  },
  "meeting": {
    "id": "string",
    "provider": "string",
    "provider_id": "string",
    "join_url": "string",
    "code": "string",
    "created_at": "string",
    "metadata": "object"
  },
  "annotations": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "attachments": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "options": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "reactions": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "metadata": "object",
  "tags": [
    "string"
  ],
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_reported": "boolean",
  "reported_at": "string",
  "is_trashed": "boolean",
  "created_at": "string",
  "created_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  },
  "updated_at": "string",
  "updated_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  }
}

Get comment

Gets a comment by id.

GET /api/comments/{id}
Path parameters
id integer required

Id of the comment.

Query parameters
trashed boolean

true to return comment even if trashed, otherwise false.

Example request
curl {WEAVY-URL}/api/comments/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 OK
401 Unauthorized
404 Not Found

Response schema
{
  "id": "string",
  "app": {
    "id": "string",
    "rev": "string",
    "type": "string",
    "uid": "string",
    "name": "string",
    "description": "string",
    "archive_url": "string",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "access": "object",
    "directory_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_pinned": "boolean",
    "is_starred": "boolean",
    "is_subscribed": "boolean",
    "is_trashed": "boolean",
    "is_unread": "boolean",
    "permissions": [
      "object"
    ]
  },
  "parent": {
    "id": "string",
    "type": "object"
  },
  "text": "string",
  "html": "string",
  "plain": "string",
  "embed": {
    "id": "string",
    "type": "object",
    "title": "string",
    "description": "string",
    "url": "string",
    "thumbnail_url": "string",
    "actions": [
      "string"
    ],
    "metadata": "object",
    "author_name": "string",
    "author_url": "string",
    "provider_name": "string",
    "provider_url": "string",
    "html": "string",
    "width": "string",
    "height": "string"
  },
  "meeting": {
    "id": "string",
    "provider": "string",
    "provider_id": "string",
    "join_url": "string",
    "code": "string",
    "created_at": "string",
    "metadata": "object"
  },
  "annotations": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "attachments": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "options": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "reactions": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "metadata": "object",
  "tags": [
    "string"
  ],
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_reported": "boolean",
  "reported_at": "string",
  "is_trashed": "boolean",
  "created_at": "string",
  "created_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  },
  "updated_at": "string",
  "updated_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  }
}

Update comment

Updates a comment.

PATCH /api/comments/{id}
Path parameters
id integer required

Id of the comment.

Body parameters
attachments array of strings

Ids of attached files.

blobs array of strings

Ids of additional blobs to attach.

embed_id string

Id of embed to attach.

meeting_id string

Id of meeting to attach.

options array of objects

List of poll options for the item.

text string

The message text.

metadata object

Additional metadata properties, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the item.

Example request
curl -X PATCH {WEAVY-URL}/api/comments/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{'text': 'Update comment text' }"
Response codes

200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Validation Failed

Response schema
{
  "id": "string",
  "app": {
    "id": "string",
    "rev": "string",
    "type": "string",
    "uid": "string",
    "name": "string",
    "description": "string",
    "archive_url": "string",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "access": "object",
    "directory_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_pinned": "boolean",
    "is_starred": "boolean",
    "is_subscribed": "boolean",
    "is_trashed": "boolean",
    "is_unread": "boolean",
    "permissions": [
      "object"
    ]
  },
  "parent": {
    "id": "string",
    "type": "object"
  },
  "text": "string",
  "html": "string",
  "plain": "string",
  "embed": {
    "id": "string",
    "type": "object",
    "title": "string",
    "description": "string",
    "url": "string",
    "thumbnail_url": "string",
    "actions": [
      "string"
    ],
    "metadata": "object",
    "author_name": "string",
    "author_url": "string",
    "provider_name": "string",
    "provider_url": "string",
    "html": "string",
    "width": "string",
    "height": "string"
  },
  "meeting": {
    "id": "string",
    "provider": "string",
    "provider_id": "string",
    "join_url": "string",
    "code": "string",
    "created_at": "string",
    "metadata": "object"
  },
  "annotations": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "attachments": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "options": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "reactions": {
    "data": [
      "object"
    ],
    "start": "string",
    "end": "string",
    "count": "string"
  },
  "metadata": "object",
  "tags": [
    "string"
  ],
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_reported": "boolean",
  "reported_at": "string",
  "is_trashed": "boolean",
  "created_at": "string",
  "created_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  },
  "updated_at": "string",
  "updated_by": {
    "id": "string",
    "uid": "string",
    "name": "string",
    "given_name": "string",
    "middle_name": "string",
    "family_name": "string",
    "nickname": "string",
    "email": "string",
    "phone_number": "string",
    "username": "string",
    "avatar_url": "string",
    "directories": [
      "object"
    ],
    "presence": "object",
    "comment": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "created_at": "string",
    "updated_at": "string",
    "is_blocked": "boolean",
    "is_followed": "boolean",
    "is_reported": "boolean",
    "is_trashed": "boolean"
  }
}

List comments

List comments.

GET /api/comments
Query parameters
directory string

Directory identifier (id or name). When specified only comments from apps in the specified directory are listed.

around string

A comment id. Used to find results "around" a specific comment.

q string

A string used to find matching items by name, e.g. q=test.

prefix boolean

When true, uses prefix/wildcard search for search terms in q.

tag array of strings

List items with the specified tags. May be specified multiple times to list items matching any of the given tags, e.g. tag=a&tag=b.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to list both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. order_by=id or order_by=id+desc.

skip string

The number of items to skip. Used together with take to return a specific range of items (for pagination).

take string

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

count_only boolean

true to count the number of matching items instead of listing them; when specified the response will only contain the count property.

Example request
curl {WEAVY-URL}/api/comments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 OK
401 Unauthorized

Response schema
{
  "data": [
    {
      "id": "string",
      "text": "string",
      "html": "string",
      "plain": "string",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "is_starred": "boolean",
      "is_subscribed": "boolean",
      "is_reported": "boolean",
      "reported_at": "string",
      "is_trashed": "boolean",
      "created_at": "string",
      "updated_at": "string"
    }
  ],
  "start": "string",
  "end": "string",
  "count": "string"
}

List app comments

List comments in the specified comments app.

GET /api/apps/{app}/comments
Path parameters
app string required

App identifier (id or uid)

Query parameters
around string

A comment id. Used to find results "around" a specific comment.

q string

A string used to find matching items by name, e.g. q=test.

prefix boolean

When true, uses prefix/wildcard search for search terms in q.

tag array of strings

List items with the specified tags. May be specified multiple times to list items matching any of the given tags, e.g. tag=a&tag=b.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to list both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. order_by=id or order_by=id+desc.

skip string

The number of items to skip. Used together with take to return a specific range of items (for pagination).

take string

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

count_only boolean

true to count the number of matching items instead of listing them; when specified the response will only contain the count property.

Example request
curl {WEAVY-URL}/api/apps/acme-comments/comments?take=25
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 OK
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "string",
      "text": "string",
      "html": "string",
      "plain": "string",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "is_starred": "boolean",
      "is_subscribed": "boolean",
      "is_reported": "boolean",
      "reported_at": "string",
      "is_trashed": "boolean",
      "created_at": "string",
      "updated_at": "string"
    }
  ],
  "start": "string",
  "end": "string",
  "count": "string"
}

List file comments

List comments on the specified file.

GET /api/files/{id}/comments
Path parameters
id integer required

File id.

Query parameters
around string

A comment id. Used to find results "around" a specific comment.

q string

A string used to find matching items by name, e.g. q=test.

prefix boolean

When true, uses prefix/wildcard search for search terms in q.

tag array of strings

List items with the specified tags. May be specified multiple times to list items matching any of the given tags, e.g. tag=a&tag=b.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to list both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. order_by=id or order_by=id+desc.

skip string

The number of items to skip. Used together with take to return a specific range of items (for pagination).

take string

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

count_only boolean

true to count the number of matching items instead of listing them; when specified the response will only contain the count property.

Example request
curl {WEAVY-URL}/api/files/1/comments?take=25
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 OK
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "string",
      "text": "string",
      "html": "string",
      "plain": "string",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "is_starred": "boolean",
      "is_subscribed": "boolean",
      "is_reported": "boolean",
      "reported_at": "string",
      "is_trashed": "boolean",
      "created_at": "string",
      "updated_at": "string"
    }
  ],
  "start": "string",
  "end": "string",
  "count": "string"
}

List post comments

List comments on the specified post.

GET /api/posts/{id}/comments
Path parameters
id integer required

Post id.

Query parameters
around string

A comment id. Used to find results "around" a specific comment.

q string

A string used to find matching items by name, e.g. q=test.

prefix boolean

When true, uses prefix/wildcard search for search terms in q.

tag array of strings

List items with the specified tags. May be specified multiple times to list items matching any of the given tags, e.g. tag=a&tag=b.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to list both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. order_by=id or order_by=id+desc.

skip string

The number of items to skip. Used together with take to return a specific range of items (for pagination).

take string

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

count_only boolean

true to count the number of matching items instead of listing them; when specified the response will only contain the count property.

Example request
curl {WEAVY-URL}/api/posts/1/comments?take=25
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 OK
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "string",
      "text": "string",
      "html": "string",
      "plain": "string",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "is_starred": "boolean",
      "is_subscribed": "boolean",
      "is_reported": "boolean",
      "reported_at": "string",
      "is_trashed": "boolean",
      "created_at": "string",
      "updated_at": "string"
    }
  ],
  "start": "string",
  "end": "string",
  "count": "string"
}

Trash comment

Move a comment to the trash.

POST /api/comments/{id}/trash
Path parameters
id integer required

Id of the comment to trash.

Example request
curl -X POST {WEAVY-URL}/api/comments/1/trash
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Restore comment

Restore a comment from the trash.

POST /api/comments/{id}/restore
Path parameters
id integer required

Id of the comment to restore.

Example request
curl -X POST {WEAVY-URL}/api/comments/1/restore
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Delete comment

Delete a comment.

DELETE /api/comments/{id}
Path parameters
id integer required

Id of the comment.

Example request
curl -X DELETE {WEAVY-URL}/api/comments/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found