Embeds - API DOCS
Arcentry makes it easy to embed diagrams into third party applications, blogposts, and websites. There are fundamentally two ways to do that, both of which will create an iFrame URL: Static and Live Embeds.
Static Embeds
Static Embeds create a copy of a document at the given point in time. This means you can create as many static embeds from the same document at different stages as you like.
Live Embeds
Live embeds create a URL that makes a given document public and allows you to embed it. Any change, whether through the Arcentry app or the API will be reflected in this document at realtime. Please note, live embeds are limited to five simultaneous connections per embed.
Create a static embed
Creates a static copy of a document to be embedded into another site.
Request Parameters
-
The ID of the source document.
-
An optional title, will be displayed in the list of embeds
POST
https://arcentry.com/api/v1/embed/create-static
{ "docId": "9ce70f08-0ae1-4277-badc-131fdc47d928" }
{
"success":true,
// The ID of the embed (if you wish to delete it later)
"id":"363cf432-c884-415d-a975-9614634154e2",
// The embeddable URL. Stick it into an iFrame
"url":"https://arcentry.com/app/embed.html?id=363cf432-c884-415d-a975-9614634154e2&camera=0_0.7854_7.6667_-0.7854_0.6155_0.5236_450_450_450&hideViewControls=0"
}
curl \
-d '{"docId": "901d1e2b-0bb4-494b-ac25-4c361b4238d5"}' \
-H "Authorization: Bearer 6b4f49e064e1537a050d06067fc6cac42e5cc2e59cb43ff6b975a596331f31e9" \
-H "Content-Type: application/json" \
-X POST \
https://arcentry.com/api/v1/embed/create-static
Delete a static embed
Deletes a previously created static embed and will prevent any iFrame using it from working.
Request Parameters
-
The ID of the embed - will be returned by create-static.
POST
https://arcentry.com/api/v1/embed/delete-static
{ "id": "9ce70f08-0ae1-4277-badc-131fdc47d928" }
{ "success":true }
Enable Live Embed
Enables an existing document to be embedded into a webpage etc.
Request Parameters
-
The ID of the document to be embedded.
POST
https://arcentry.com/api/v1/embed/enable-live
{ "docId": "9ce70f08-0ae1-4277-badc-131fdc47d928" }
{
"success":true,
"key":"355784bcd59fa826e980b6d2090daddc",
"url":"https://arcentry.com/app/embed.html?id=901d1e2b-0bb4-494b-ac25-4c361b4238d5&key=355784bcd59fa826e980b6d2090daddc&live=true&camera=0_0.7854_7.6667_-0.7854_0.6155_0.5236_450_450_450&hideViewControls=0"
}