Blobs
The Blobs API enables the creation and listing of blobs.
Get blob metadata
GET /api/blobs/{id}
Get the metadata of a blob.
Sample request
$ curl {WEAVY_SERVER}/api/blobs/1
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Id of blob. |
Responses
Status code 200
application/json
{
"id": "integer",
"name": "string",
"media_type": "string",
"width": "integer",
"height": "integer",
"size": "integer",
"thumbnail_url": "string"
}
Status code 404
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}
Upload a blob
POST /api/blobs
Uploads a blob using multipart/form-data.
After upload the blob can be used as reference when creating attachments and/or files.
Responses
Status code 200
application/json
{
"id": "integer",
"name": "string",
"media_type": "string",
"width": "integer",
"height": "integer",
"size": "integer",
"thumbnail_url": "string"
}
Status code 400
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}
Create a cloud blob
POST /api/blobs/external
Creates a cloud blob, i.e. a blob that links to an external blob provider.
After creation the blob can be used as reference when creating attachments and/or files.
Request body
application/json
{
"provider": "string",
"link": "string",
"name": "string",
"width?": "integer",
"height?": "integer",
"size": "integer",
"media_type?": "string",
"download?": "string",
"embed?": "string",
"raw?": null
}
Note. Properties marked with ? are optional.
Responses
Status code 201
application/json
{
"id": "integer",
"name": "string",
"media_type": "string",
"width": "integer",
"height": "integer",
"size": "integer",
"thumbnail_url": "string"
}
Status code 400
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}