Download diagrams and narratives through the API
Get a web diagram as an image, or build a narrative document, through the REST API. Both run as an asynchronous job: you start the job, poll its status, then download the output when it finishes. The flow is the same for both — only the start and download endpoints differ.
These endpoints are available on iGrafx Cloud only. On-premises deployments don't serve them — a call fails even if you send it.
Prerequisites
- A working REST API integration — see Access the REST API.
- Permission to view the target diagram or object, in a repository you can use.
Steps
-
Start the job. Call the start endpoint for what you want. It returns a job whose ID you use to track and download the result.
To produce Call A diagram image Start a backend diagram render job — POST /api/{repository}/webdiagrams/{webDiagramId}/renderA narrative document Start a narrative download job — POST /api/{repository}/objects/{objectId}/narrativeFor a narrative, pass the
format(DOCXorPDF); omit the narrative template to use the repository's default narrative for the object's type. For a diagram, an optional request body sets image options such as the file format. -
Poll the job status. Call Get job information for a specific job —
GET /api/jobs/{jobId}— until the job reports complete. Use a delay that grows between attempts; see Build a resilient API integration. -
Download the output. Once the job is complete, call the matching download endpoint:
To download Call The diagram image Download a rendered diagram image — GET /api/{repository}/webdiagrams/{webDiagramId}/render/{jobId}/outputThe narrative document Download a narrative document — GET /api/{repository}/objects/{objectId}/narrative/{jobId}/outputA download called before the job finishes returns
409 Conflict.
Reference
For request bodies, parameters, and response schemas, see these endpoints in the iGrafx REST API portal, under BPMNBPMN An ISO/OMG standard graphical notation for modeling business processes. Process360 Live uses BPMN 2.0 for design and simulation artifacts. Diagrams, Object Narrative, and Jobs.