Documents - API DOCS
Documents are the diagrams you create in Arcentry. Using this API you can create, update, and manipulate documents in any way the app does.
List All Documents
Lists the ids and titles of all documents for this account.
GET
https://arcentry.com/api/v1/doc
[{
"id": "d341ef2f-9f9f-4ad8-900b-7c1715d3324a",
"title": "Google Cloud Reference Architecture"
}, {
"id": "2ea7167c-ef44-4a0c-b158-3ba9fc05ef18",
"title": "High Throughput 1"
}]
curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/
Get details for a document
Get user, folder creation and change dates for a given document.
GET
https://arcentry.com/api/v1/doc/DOC_ID
{
"id": "d341ef2f-9f9f-4ad8-900b-7c1715d3324a",
"title": "Google Cloud Reference Architecture",
"created": "2018-07-08T09:48:24.882Z",
"lastChange": "2018-07-08T11:45:10.160Z",
"user": {
"id": "f3cb0f2a-d25f-48ec-b75c-b62273709cfe",
"email": "someuser@gmail.com"
},
"folder": {
"id": "40a0c77b-5a32-4aed-bbb6-1295b83b38fb",
"title": "Reference Architectures"
}
}
curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/d341ef2f-9f9f-4ad8-900b-7c1715d3324a
Get the content of a document
Returns the entire content of a document, including objects, their properties and meta information.
GET
https://arcentry.com/api/v1/doc/DOC_ID/obj/all
{
"1clduvg8g-n9fo5mofb": {
"type": "label",
"data": {
"text": "42%",
"color": "#2C8C05",
"fontSize": 0.35,
"position": { "x": 14.5, "y": -19.5 },
"rotation": 0,
"fontStyle": { "bold": true, "italic": false },
"textAlign": "center",
"dimensions": { "width": 4, "height": 1 },
"fontFamily": "\"Open Sans\",-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif",
"outlineColor": "#FFFFFF",
"outlineWidth": 0.075
}
},
"1cldvagbj-nde18vr1l": {
"type": "component"
"data": {
"componentId": "networking.aws-api-gateway",
"opacity": 1,
"position": { "x": 14, "y": -23.5 },
"rotation": 1.5707963267948966
},
}
}
curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/d341ef2f-9f9f-4ad8-900b-7c1715d3324a/obj/all
Set the content of a document
Sets the entire content of a document. This can be used to create diagrams from scratch or to load JSON files that were previously exported using the "download as JSON" feature in the app. WARNING: THIS WILL REPLACE ALL EXISTING CONTENT OF THE DOCUMENT!
POST
https://arcentry.com/api/v1/doc/set-content/DOC_ID
{
// The JSON content of the document. IMPORTANT: In difference to the create
// and update object APIs, set-content will NOT validate or add missing fields to your
// object data. If a value is missing or incorrect, your document may be corrupted.
// If nothing else works, you can always empty it (see next method) and start over.
"1ckelh58q-h2us6u6m": {
"type": "component",
"data": {
"icon": "cogs",
"opacity": 1,
"position": { "x": -3.5, "y": -2 },
"rotation": 0,
"iconColor": "#FFFFFF",
"imagePath": null,
"componentId": "generic.server",
"primaryColor": "#FFFFFF",
"backgroundColor": "#404040"
}
},
"1ckeo4tul-c05td66d": {
"type": "label",
"data": {
"text": "DB Cluster",
"color": "#606060",
"fontSize": 0.35,
"position": { "x": -1, "y": -4 },
"rotation": 0,
"fontStyle": { "bold": true, "italic": false },
"textAlign": "center",
"dimensions": { "width": 4, "height": 1 },
"fontFamily": "\"Open Sans\",-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif",
"outlineColor": "#FFFFFF"
}
}
{ "success": true }
curl \
-d "@my-file.json" \
-H "Authorization: Bearer 0b9cc1ca2b3bee7a64498345049eaaa49a31544c1481381c583c11a5661daccd" \
-H "Content-Type: application/json" \
-X POST \
https://arcentry.com/api/v1/doc/set-content/90669c3a-86de-4923-a8df-3f7bbfae9717
Create a new document
Creates a new, empty document.
POST
https://arcentry.com/api/v1/doc/create
{
// A title describing your document
"title": "Web Tier 14",
// OPTIONAL: The id of a folder the document should be placed
// into. If folderId is omitted, the document will be created in
// the first folder you have. You can get a list of folderIds by
// calling the v1/folder/list endpoint
"folderId": "b267971d-8379-4d2e-bdba-ed9962409fc8"
}
{
"success": true,
// The ID of the newly created document
"docId": "4030c27b-5a32-4aed-bbb6-111183b38fb"
}
Empty a document
Deletes all objects from a document.
POST
https://arcentry.com/api/v1/doc/empty
{ "docId": "b267971d-8379-4d2e-bdba-ed9962409fc8" }
{ "success": true }
Add a collaborator to a document
Share this document with another user and collaborate with them in realtime. Calling this endpoint will send a notification to the other account's Arcentry app, and the document will show up under their "shared with me" tab in the document panel. Please note: This only works for existing accounts. Arcentry will not send out email invites (sorry, spam laws). If the account doesn't exist, this endpoint will return a 404 response with a USER_NOT_FOUND error.
POST
https://arcentry.com/api/v1/doc/add-collaborator
{
"docId": "b267971d-8379-4d2e-bdba-ed9962409fc8",
"email": "some-user@your-company.com"
}
{ "success": true }
Change a document's title
POST
https://arcentry.com/api/v1/doc/change-title
{
"docId": "b267971d-8379-4d2e-bdba-ed9962409fc8",
"title": "A shiny new title"
}
{ "success": true }
Clone a document
Creates a new document with the content of an existing document.
POST
https://arcentry.com/api/v1/doc/clone
{
// Id of the existing document you wish to clone
"docId": "b267971d-8379-4d2e-bdba-ed9962409fc8",
// Title for the new document
"title": "Clone of Backend Architecture"
}
{
"success": true,
// Id of the cloned document
"docId": "71f9703e-9a10-4667-a8d8-24ab28dea183"
}
Delete a document
Irrevocably deletes a document and all its contents.
POST
https://arcentry.com/api/v1/doc/delete
{ "docId": "b267971d-8379-4d2e-bdba-ed9962409fc8" }
{ "success": true }