REQUEST PASSWORD RESET

RESET YOUR PASSWORD

OK
forgot password?
CANCEL
Go to properties

API Docs

Arcentry has a powerful HTTP API that allows you to create, manipulate and delete objects on your diagrams. Any change is reflected in realtime in the app.

This is useful to:

  • Add metrics to your infrastructure
  • Visualize Scaling Groups
  • Show problems in their context

How the API works

Arcentry's API follows classic REST paradigms. It has two concepts:

  • A document (doc) is any diagram in your application. Each document is identified by a unique id - you can find your document's ID in the API tab in the sidebar Arcentry API Panel Screenshot
  • An object (obj) is any item on a diagram. That includes components such as databases, servers or custom components as well as line groups, icons, areas, labels or images. Each object has a unique id within its document. If you've enabled the API you can find an object's id in the API section of its properties panel. ObjectId location

Getting started

Arcentry's API is disabled by default. You can enable it in the API panel on the sidebar. This will create a unique API key. This API key has to be included in every request, either as a URL parameter

https://arcentry.com/api/v1/doc/cbd59b18-6adf-4f18-b6bc-ef1eb715f62c?key=1IP84UTvzJKds1Jomx8gIbTXcEEJSUilGqpxCcmnx

or as a bearer authorization header

Authorization : Bearer 1IP84UTvzJKds1Jomx8gIbTXcEEJSUilGqpxCcmnx

Please don't hardcode your key

As with all passwords and API keys - please don't hardcode this key in your code or commit it to your Github or similar repo. Instead use environment variables or a secure key store such as AWS Secrets Manager, Google Cloud Key Management Service or Azure Key Vault.

HTTP Endpoints to retrieve data (GET)

List all documents

GET /api/v1/doc/

Lists all available document ids and titles

Request curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/ Response [{ "id": "d341ef2f-9f9f-4ad8-900b-7c1715d3324a", "title": "Google Cloud Reference Architecture" }, { "id": "2ea7167c-ef44-4a0c-b158-3ba9fc05ef18", "title": "High Throughput 1" }]

Get details for a document

GET /api/v1/doc/<doc-id>

Get user, folder creation and change dates for a given document

Request curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/d341ef2f-9f9f-4ad8-900b-7c1715d3324a Response { "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" } }

List all objects for a document

GET /api/v1/doc/<doc-id>/obj/

Lists the id and type of all objects (components, line-groups, areas, labels, icons and images) for a given document. For components it also includes the componentId, for labels their text and for icons their icon value.

Request curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/d341ef2f-9f9f-4ad8-900b-7c1715d3324a/obj Response [{ "id": "1chsms8ds-l5qcq3vo", "type": "component", "componentId": "storage.gcc-cloud-storage" }, { "id": "1chsmmljq-lbtetinur", "type": "component", "componentId": "networking.gcc-cloud-interconnect" }, { "id": "1chsmqmgt-q6lfvkevo", "type": "label", "text": "Monitoring Endpoint" }, { "id": "1chsnlqel-bnvh81f9g", "type": "area" }, { "id": "1chsnufm2-jqs9j3of3", "type": "icon", "icon": "users" }]

Get all object data for a document

GET /api/v1/doc/<doc-id>/obj/all

Lists all objects and their properties for a given document

Request curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/d341ef2f-9f9f-4ad8-900b-7c1715d3324a/obj/all Response { "1clduvg8g-n9fo5mofb": { "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 }, "type": "label" }, "1cldvagbj-nde18vr1l": { "data": { "opacity": 1, "position": { "x": 14, "y": -23.5 }, "rotation": 1.5707963267948966, "componentId": "networking.aws-api-gateway" }, "type": "component" }, "1clgbv35g-aih80blnp": { "data": { "icon": null, "opacity": 1, "position": { "x": 7, "y": -21.5 }, "rotation": 1.5707963267948966, "iconColor": "#18E688", "imagePath": "c0820c51f5577d274d436dd5027e26bc/unicorn.png", "componentId": "generic.bucket", "primaryColor": "#55B3D5", "backgroundColor": "#4E8594" }, "type": "component" } }

Get properties for an object

GET /api/v1/doc/<doc-id>/obj/<obj-id>

Displays the full set of data for a given object

Request curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/d341ef2f-9f9f-4ad8-900b-7c1715d3324a/obj/1chsmqmgt-q6lfvkevo Response { "data": { "text": "Monitoring Endpoint", "color": "#EA4335", "fontSize": 0.5, "position": { "x": -28.25, "y": -25.5 }, "rotation": 0, "fontStyle": { "bold": true, "italic": false }, "textAlign": "right", "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.1 }, "type": "label" }

Retrieve objects by selector

GET /api/v1/doc/<doc-id>/obj/where/<selector>

Retrieves all objects with Metadata matching a given Selector

Request for ["dockerImg","eq","mysql-small"] curl --header "Authorization: Bearer YOUR_API_KEY" https://arcentry.com/api/v1/doc/a9b5a951-1ff6-4ea8-a28d-ec5956187354/obj/where/%5B%22dockerImg%22,%22eq%22,%22mysql-small%22%5D Response { "1cml7vrs0-ef6r4n2uv": { "data": { "meta": { "dockerImg": "mysql-small" }, "opacity": 1, "position": { "x": 6, "y": 1 }, "rotation": 0, "componentId": "database.mysql", "showMetaData": true, "metaDataFontSize": 0.5, "metaDataRotation": 0, "showMetaDataKeys": true, "metaDataTextAlign": "center" }, "type": "component" }, "1cml7v3dp-13nr9eg006": { "data": { "meta": { "dockerImg": "mysql-small" }, "opacity": 1, "position": { "x": 2, "y": 1 }, "rotation": 0, "componentId": "database.mysql", "showMetaData": true, "metaDataFontSize": 0.5, "metaDataRotation": 0, "showMetaDataKeys": true, "metaDataTextAlign": "center" }, "type": "component" } }

HTTP Endpoints to set data (POST)

JSON only

Arcentry's API expects all POST requests to send JSON data with a header of 'application/json'. Form-data requests are not supported.

Create a new object

POST /api/v1/doc/<doc-id>/obj/

Request Parameters

  • The type of the object, can be 'component', 'line-group', 'label', 'icon', 'area', or 'image'
  • The properties to create the object with. Different types support different properties, please find a detailed list here. Any property that isn't specified will be replaced by its default value. Please note: for components (type == 'component') you must specify componentId as a property.
Request curl \ -d '{"type":"label", "props":{"text":"Hello World","position":{"x":-10,"y":20}}}' \ -H "Authorization: Bearer 9ce7f16d4a6647f3d74491560ec64ff87a6faa015c4178a7c5739dca900aa4bf" \ -H "Content-Type: application/json" \ -X POST \ https://arcentry.com/api/v1/doc/d341ef2f-9f9f-4ad8-900b-7c1715d3324a/obj/1chsmqmgt-q6lfvkevo/obj Response { "success": true, "objId": "1cl8unihs-8sebjki9g" }

Set properties for an object

POST /api/v1/doc/<doc-id>/obj/<obj-id>

Request Parameters

  • One or more properties to merge into the existing object data. Different types support different properties, please find a detailed list here.

Updates the properties of an existing object. You can set as few or as many properties as you like - any JSON will be merged into the object's current data structure. Please note that the merge is non-recursive, so nested properties, e.g. "position":{"x":2,"y":3} need to contain all fields.

Request curl \ -d '{"props":{"color": "#F0000F","position":{"x":5,"y":2}}}' \ -H "Authorization: Bearer 9ce7f16d4a6647f3d744915605434ff87a6577015c4178a7ccf59dca900aa4bf" \ -H "Content-Type: application/json" \ -X POST \ https://arcentry.com/api/v1/doc/980482ba-54d7-427d-8dbf-f23745d233fa/obj/1claqoit6-12ft652qhj Response {"success":true}

Update multiple objects matching a selector

POST /api/v1/doc/<doc-id>/obj/where

Request Parameters

  • A selector that finds objects based on their associated metadata. Please find more here.
  • One or more properties to merge into the existing object data. Different types support different properties, please find a detailed list here.

Similar to the id based update object endpoint, but this can update multiple objects at once, based on their Metadata

Request curl \ -d '{"selector":["status","eq","running"],"props":{"backgroundColor": "#00FF00"}}' \ -H "Authorization: Bearer 9ce7f16d4a6647f3d744915605434ff87a6577015c4178a7ccf59dca900aa4bf" \ -H "Content-Type: application/json" \ -X POST \ https://arcentry.com/api/v1/doc/980482ba-54d7-427d-8dbf-f23745d233fa/obj/where/ Response { "success": true, "updatedObjectCount": 2, "updatedObjectIds": [ "1cml7vrs0-ef6r4n2uv", "1cml7v3dp-13nr9eg006" ] }

Update multiple objects in bulk

POST /api/v1/doc/<doc-id>/

Request Parameters

  • A map of ID to object data - any data will be merged into existing objects detailed list here.

Updates the properties of multiple existing objects. You can set as few or as many properties as you like - any JSON will be merged into the object's current data structure. Please note that the merge is non-recursive, so nested properties, e.g. "position":{"x":2,"y":3} need to contain all fields.

Request curl \ -d '{"objects":{"1cn24l762-mro0uporu":{"text":"Enabled","color":"#259E07"},"1cn24l762-8qo4f10hg":{"fillColor":"#FFFFFF"}}}' \ -H "Authorization: Bearer 9ce7f16d4a6647f3d744915605434ff87a6577015c4178a7ccf59dca900aa4bf" \ -H "Content-Type: application/json" \ -X POST \ https://arcentry.com/api/v1/doc/980482ba-54d7-427d-8dbf-f23745d233fa/ Response {"success":true}

Delete an object

POST /api/v1/doc/<doc-id>/obj/<obj-id>/delete

Deletes an object from its document

Request curl \ -H "Authorization: Bearer 9ce7f16d4a6647f3d74491560ec64ff87a6faa015c4178a7c5739dca900aa4bf" \ -H "Content-Type: application/json" \ -X POST \ https://arcentry.com/api/v1/doc/980482ba-54d7-427d-8dbf-f23745d233fa/obj/1claqoit6-12ft652qhj/delete Response {"success":true}