Image
Arcentry makes it easy to download your diagram as images from the app - and now you can do the same programmatically using these API endpoints. Even better: Using Arcentry's image/create-from-diagram endpoint you can auto-generate diagram images out of simple CSVs or JSON files without ever having to open the app.
PNGs
All image generation endpoints return png image data. You can save the result of the request as a normal some-image.png file.
Querystring Parameter
Both endpoints support the following query string parameter.
- key your API key. (Optional, can also be provided as a Bearer Token).
- width the width of the desired image in pixels. (Optional, defaults to 1024)
- height the height of the desired image in pixels. (Optional, defaults to 768)
Timing
Image creation can take up to 15 seconds. Please allow for sufficient request timeouts.
Creates an image from a given document
Renders a document with a given DOC_ID and returns the result as png.
GET
https://arcentry.com/api/v1/image/from-document/DOC_ID
curl \
-o my-architecture.png \
-H "Authorization: Bearer 6b4f49e064e1534534ab7fc6cac42e5cc2e59cb43ff6b975a596331f31e9" \
https://arcentry.com/api/v1/image/from-document/4a2432e2-1cc3-4a48-9adc-5f240bf39554?width=800&height=600
Auto Generate a Diagram as Image
This endpoint is built on top of Arcentry's automated diagram creation. It allows you to upload a CSV or JSON file which Arcentry will automatically turn into a diagram, take a picture of and return this picture without any further work - isn't life awesome?
Please note - this endpoint supports all styling options for auto-created diagrams. Simple append them as query string parameters.
POST
https://arcentry.com/api/v1/image/create-from-diagram
curl \
-d '{"server-a":{"type":"component","componentType":"generic.server"},"server-b":{"type":"component","componentType":"generic.server"}}' \
-o my-architecture.png \
-H "Authorization: Bearer 6b4f49e064e1537a050d06067fc6cac42e5cc2e59cb43ff6b975a596331f31e9" \
-H "Content-Type: application/json" \
-X POST \
https://arcentry.com/api/v1/image/create-from-diagram?comp_gap=4