Skip to main content

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.

note

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

  1. 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 produceCall
    A diagram imageStart a backend diagram render jobPOST /api/{repository}/webdiagrams/{webDiagramId}/render
    A narrative documentStart a narrative download jobPOST /api/{repository}/objects/{objectId}/narrative

    For a narrative, pass the format (DOCX or PDF); 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.

  2. Poll the job status. Call Get job information for a specific jobGET /api/jobs/{jobId} — until the job reports complete. Use a delay that grows between attempts; see Build a resilient API integration.

  3. Download the output. Once the job is complete, call the matching download endpoint:

    To downloadCall
    The diagram imageDownload a rendered diagram imageGET /api/{repository}/webdiagrams/{webDiagramId}/render/{jobId}/output
    The narrative documentDownload a narrative documentGET /api/{repository}/objects/{objectId}/narrative/{jobId}/output

    A 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.