Skip to main content

Patch a Specific Embed

This endpoint patches a specific endpoint

info

You can use this endpoint to edit a single field passing only the id and the needed field (without mandatory fields).

info

This operation requires authentication only if content_availability community option is false

HTTP Request

PATCH /api/v2/embed/{id}/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this embed
» urlstring(uri)¦nullfalsenoneUrl for the resource, if any
» metadatajsonfalsenoneMetadata associated to this embed. It mus be a valid json object

Example Body Parameters

{
"url": "string(uri)",
"metadata": {}
}

Example Request

const inputBody = '{
"url": "string(uri)",
"metadata": {}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/embed/{id}/',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});


Responses

StatusMeaningDescriptionSchema
200OKResponse status codeUpdate Embed

Example responses

{
"id": "integer",
"embed_type": "string",
"embed_id": "string",
"url": "string(uri)",
"metadata": {}
}