Embeds
The Embeds API converts URLs into embedded videos, images and rich article previews.
Get embed
GET /api/embeds/{id}
Get an embed by id.
Sample request
$ curl {WEAVY_SERVER}/api/embeds/1
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | integer | True | Id of embed. |
Responses
Status code 200
application/json
{
"id": "integer",
"type": "string",
"title": "string",
"description": "string",
"author_name": "string",
"author_url": "string",
"provider_name": "string",
"provider_url": "string",
"cache_age": "integer",
"thumbnail_url": "string",
"thumbnail_width": "integer",
"thumbnail_height": "integer",
"url": "string",
"width": "integer",
"height": "integer",
"html": "string",
"original_url": "string"
}
Status code 404
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}
Create embed
POST /api/embeds
Create an embed for the given url.
Sample request
$ curl {WEAVY_SERVER}/api/embeds
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
-H "Content-Type: application/json"
-d "{ 'url': 'https://weavy.com' }"
Request body
application/json
{
"url": "string"
}
Note. Properties marked with ? are optional.
Responses
Status code 201
application/json
{
"id": "integer",
"type": "string",
"title": "string",
"description": "string",
"author_name": "string",
"author_url": "string",
"provider_name": "string",
"provider_url": "string",
"cache_age": "integer",
"thumbnail_url": "string",
"thumbnail_width": "integer",
"thumbnail_height": "integer",
"url": "string",
"width": "integer",
"height": "integer",
"html": "string",
"original_url": "string"
}
Status code 400
application/json
{
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string"
}