Update a specific Embed
This endpoint updates a specific Embed
info
This operation requires authentication only if content_availability
community option is false
HTTP Request
PUT /api/v2/embed/{id}/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | A unique integer value identifying this embed |
» url | string(uri)¦null | false | none | Url for the resource, if any |
» metadata | json | false | none | Metadata associated to this embed. It mus be a valid json object |
Example Body Parameters
- JSON
{
"url": "string(uri)",
"metadata": {}
}
Example Request
- JavaScript
- Bash
const inputBody = '{
"url": "https://example.com",
"metadata": {}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/embed/{id}/',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X PUT /api/v2/embed/{id}/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
--data-raw '{
"url": "https://example.com",
"metadata": {}
}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Update Embed |
Example responses
- 200
{
"id": "integer",
"embed_type": "string",
"embed_id": "string",
"url": "string(uri)",
"metadata": {}
}