Files

The Files API has methods for managing files.

Create file

Creates a new file in the specified Files app.

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

App identifier (id or uid)

Body parameters
blob_id integer required

Id of blob containing content and metadata for the file.

name string

File name. When not specified the file will get the name of the underlying blob.

metadata object

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

tags array of strings

A list of tags to associate with the file.

replace boolean

true to force an existing file with the same name to be overwritten (otherwise a 409 Conflict response will be produced).

Example request
curl https://{WEAVY-SERVER}/api/apps/acme-files/files
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'blob_id': 1 }"
Response codes

200 Success
201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
422 Validation Failed

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

Get file

Get file metadata.

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

File id

Query parameters
trashed boolean

true to return file even if trashed.

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

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

Get version

Get specific version of a file.

GET /api/files/{id}/versions/{version}
Path parameters
id integer required

File id.

version integer required

Version number.

Example request
curl https://{WEAVY-SERVER}/api/files/1/versions/2
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

Get versions

List version history for the specified file.

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

File id.

Example request
curl https://{WEAVY-SERVER}/api/files/1/versions
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
[
  {
    "id": "integer",
    "app_id": "integer",
    "version": "integer",
    "name": "string",
    "kind": "string",
    "media_type": "string",
    "width": "integer",
    "height": "integer",
    "size": "integer",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "provider": "string",
    "raw": "string",
    "download_url": "string",
    "application_url": "string",
    "embed_url": "string",
    "external_url": "string",
    "preview_format": "string",
    "preview_url": "string",
    "thumbnail_url": "string",
    "created_at": "string",
    "created_by_id": "integer",
    "modified_at": "string",
    "modified_by_id": "integer",
    "comment_count": "integer",
    "comments": [
      "object"
    ],
    "is_subscribed": "boolean",
    "is_trashed": "boolean"
  }
]

Update file

Update a file.

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

Id of file.

Body parameters
blob_id integer

Id of blob containing content and metadata for the file.

name string

The file name.

metadata object

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

tags array of strings

A list of tags to associate with the file.

backup boolean

true to add previous version to version history, otherwise false (default).

Example request
curl -X PATCH https://{WEAVY_SERVER}/api/files/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'name': 'filename.txt' }"
Response codes

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

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

List files

List files.

GET /api/files
Query parameters
q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

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

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

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

skip integer

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

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

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

200 Success
401 Unauthorized

Response schema
{
  "data": [
    {
      "id": "integer",
      "app_id": "integer",
      "version": "integer",
      "name": "string",
      "kind": "string",
      "media_type": "string",
      "width": "integer",
      "height": "integer",
      "size": "integer",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "provider": "string",
      "raw": "string",
      "download_url": "string",
      "application_url": "string",
      "embed_url": "string",
      "external_url": "string",
      "preview_format": "string",
      "preview_url": "string",
      "thumbnail_url": "string",
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "comment_count": "integer",
      "comments": [
        "object"
      ],
      "is_subscribed": "boolean",
      "is_trashed": "boolean"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

List files in app

List files in the specified Files app.

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

App identifier (id or uid)

Query parameters
q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

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

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

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

skip integer

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

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Example request
curl https://{WEAVY-SERVER}/api/apps/acme-files/files?top=30
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "integer",
      "app_id": "integer",
      "version": "integer",
      "name": "string",
      "kind": "string",
      "media_type": "string",
      "width": "integer",
      "height": "integer",
      "size": "integer",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "provider": "string",
      "raw": "string",
      "download_url": "string",
      "application_url": "string",
      "embed_url": "string",
      "external_url": "string",
      "preview_format": "string",
      "preview_url": "string",
      "thumbnail_url": "string",
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "comment_count": "integer",
      "comments": [
        "object"
      ],
      "is_subscribed": "boolean",
      "is_trashed": "boolean"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

List post attachments

List files attached to the specified post.

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

Post id.

Query parameters
q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

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

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

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

skip integer

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

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Example request
curl https://{WEAVY-SERVER}/api/posts/1/attachments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "integer",
      "app_id": "integer",
      "version": "integer",
      "name": "string",
      "kind": "string",
      "media_type": "string",
      "width": "integer",
      "height": "integer",
      "size": "integer",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "provider": "string",
      "raw": "string",
      "download_url": "string",
      "application_url": "string",
      "embed_url": "string",
      "external_url": "string",
      "preview_format": "string",
      "preview_url": "string",
      "thumbnail_url": "string",
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "comment_count": "integer",
      "comments": [
        "object"
      ],
      "is_subscribed": "boolean",
      "is_trashed": "boolean"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

List comment attachments

List files attached to the specified comment.

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

Comment id.

Query parameters
q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

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

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

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

skip integer

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

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

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

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "integer",
      "app_id": "integer",
      "version": "integer",
      "name": "string",
      "kind": "string",
      "media_type": "string",
      "width": "integer",
      "height": "integer",
      "size": "integer",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "provider": "string",
      "raw": "string",
      "download_url": "string",
      "application_url": "string",
      "embed_url": "string",
      "external_url": "string",
      "preview_format": "string",
      "preview_url": "string",
      "thumbnail_url": "string",
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "comment_count": "integer",
      "comments": [
        "object"
      ],
      "is_subscribed": "boolean",
      "is_trashed": "boolean"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

List message attachments

List files attached to the specified message.

GET /api/messages/{id}/attachments
Path parameters
id integer required

Message id.

Query parameters
q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

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

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

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

skip integer

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

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Example request
curl https://{WEAVY-SERVER}/api/messages/1/attachments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "integer",
      "app_id": "integer",
      "version": "integer",
      "name": "string",
      "kind": "string",
      "media_type": "string",
      "width": "integer",
      "height": "integer",
      "size": "integer",
      "metadata": "object",
      "tags": [
        "string"
      ],
      "provider": "string",
      "raw": "string",
      "download_url": "string",
      "application_url": "string",
      "embed_url": "string",
      "external_url": "string",
      "preview_format": "string",
      "preview_url": "string",
      "thumbnail_url": "string",
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "comment_count": "integer",
      "comments": [
        "object"
      ],
      "is_subscribed": "boolean",
      "is_trashed": "boolean"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

Subscribe to file

Subscribe to notifications for activity on a file.

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

Id of the file.

Example request
curl -X POST https://{WEAVY_SERVER}/api/files/1/subscribe
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

Unsubscribe from file

Unsubscribe to notifications for activity on a file.

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

Id of the file.

Example request
curl -X POST https://{WEAVY_SERVER}/api/files/1/unsubscribe
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

Trash file

Move a file to the trash.

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

Id of the file to trash.

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

200 Success
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

Restore file

Restore a file from the trash.

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

Id of the file to restore.

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

200 Success
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

Restore version

Restore a previous version of a file to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the file.

POST /api/files/{id}/versions/{version}/restore
Path parameters
id integer required

File id.

version integer required

Version number.

Example request
curl -X POST https://{WEAVY_SERVER}/api/files/1/versions/2/restore
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Response schema
{
  "id": "integer",
  "app_id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "version": "integer",
  "name": "string",
  "kind": "string",
  "media_type": "string",
  "width": "integer",
  "height": "integer",
  "size": "integer",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "provider": "string",
  "raw": "string",
  "download_url": "string",
  "application_url": "string",
  "embed_url": "string",
  "external_url": "string",
  "preview_format": "string",
  "preview_url": "string",
  "thumbnail_url": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "modified_at": "string",
  "modified_by_id": "integer",
  "modified_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "comment_count": "integer",
  "comments": [
    {
      "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"
      ],
      "metadata": "object",
      "tags": [
        "string"
      ],
      "created_at": "string",
      "created_by_id": "integer",
      "modified_at": "string",
      "modified_by_id": "integer",
      "is_trashed": "boolean"
    }
  ],
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

Delete file

Delete a file.

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

Id of the file.

Example request
curl -X DELETE https://{WEAVY_SERVER}/api/files/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

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

Delete version

Delete specific version of a file.

DELETE /api/files/{id}/versions/{version}
Path parameters
id integer required

File id.

version integer required

Version number.

Example request
curl -X DELETE https://{WEAVY_SERVER}/api/files/1/versions/2
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

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