Skip to main content

Create an Embed

This endpoint creates an Embed

info

This operation requires admin role.

HTTP Request

POST /api/v2/embed/

Parameters

NameInTypeRequiredDescription
» idbodyintegerfalseA unique integer value identifying this embed
» embed_typebodystringtrueType of the embed, can be any string except sc_link that are used for embedded objects auomatically created by the community
» embed_idbodystringtrueExternal id for the embed object
» urlbodystring(uri)¦nullfalseUrl for the resource, if any
» metadatabodyjsonfalseMetadata associated to this embed. It mus be a valid json object

Example Body Parameters

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

Example Request

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

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

Responses

StatusMeaningDescriptionSchema
201CreatedResponse status codeEmbed

Example responses

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