Common integration tasks

Explore the sample without setup, or follow the walkthroughs using your own server.

Explore a sample integration#

Sample data — no connection to your server

Process library

Simplified teaching diagrams, not exact 2c8 notation. Choose a model, then a shape or connection. Both models reuse the same Customer symbol.

Handle an order

ConnectionCustomerSymbol placed as a vertexCheck orderSymbol placed as a vertex

Illustrative layout. Select a shape or use the element buttons to inspect its data.

Customer

This shape is a vertex: one placement in this model. Its symbol is the reusable object behind it.

Vertex ID
baa2e42e-0b41-408d-a987-c5f93166cac4
Symbol ID
f2d2ee19-1582-4399-ab55-49b8c9ae1197

Customer appears in both models: the symbol ID stays the same, while the vertex ID and placement change.

Check order

This shape is a vertex: one placement in this model. Its symbol is the reusable object behind it.

Vertex ID
9be93a23-d344-4e36-b025-0123d77e8b11
Symbol ID
535eb24b-afd2-4dab-9d61-c7a4f2acb19b
Connection

This edge connects the two vertices and implicitly defines the modeled relation. There is no separate relation entity to fetch.

Edge ID
83091817-805f-4b1d-bf95-d87f94a89f4f
From vertex
baa2e42e-0b41-408d-a987-c5f93166cac4
To vertex
9be93a23-d344-4e36-b025-0123d77e8b11
Description

Check the order before dispatch.

A rich-text value in a configured field.

Associated document

Order checklist

Resolved metadata; this does not download a file. Placeholder URL: https://documents.example/order-checklist

Show the API requests

These are bundled example responses, not executed requests. Highlighted JSON belongs to the selected element. Canvas and language responses show relevant fields; your server can return more.

getRepositories

GET /api/v1/repositories?projection=SIMPLE&startAt=0&maxResults=10

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "startAt": 0,
  "maxResults": 10,
  "total": 1,
  "data": [
    {
      "uuid": "603055e8-4734-461e-bf42-d4456afe7bb7",
      "name": "Process library"
    }
  ]
}
getModels

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/models?projection=SIMPLE&fields=titles&startAt=0&maxResults=50

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "startAt": 0,
  "maxResults": 50,
  "total": 2,
  "data": [
    {
      "uuid": "c022603a-4d79-4b5e-a82e-ce1f2916b2c0",
      "modelType": "GENERAL_MODEL",
      "titles": {
        "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
          "title": "Handle an order"
        }
      }
    },
    {
      "uuid": "a41979d0-f088-44e5-828c-bd12ce9e0196",
      "modelType": "GENERAL_MODEL",
      "titles": {
        "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
          "title": "Dispatch an order"
        }
      }
    }
  ]
}
getLanguages

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/languages?fields=uuid%2Cname%2CdefaultLanguage&startAt=0&maxResults=50

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "startAt": 0,
  "maxResults": 50,
  "total": 1,
  "data": [
    {
      "uuid": "b030a9f8-a89c-41c4-a972-0da5763c4d95",
      "name": "English",
      "defaultLanguage": true
    }
  ]
}
getCanvas

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/models/c022603a-4d79-4b5e-a82e-ce1f2916b2c0/canvas

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "workflowState": "EDITABLE",
  "vertices": [
    {
      "uuid": "baa2e42e-0b41-408d-a987-c5f93166cac4",
      "symbol": "f2d2ee19-1582-4399-ab55-49b8c9ae1197",
      "x": 40,
      "y": 60,
      "width": 100,
      "height": 60
    },
    {
      "uuid": "9be93a23-d344-4e36-b025-0123d77e8b11",
      "symbol": "535eb24b-afd2-4dab-9d61-c7a4f2acb19b",
      "x": 220,
      "y": 60,
      "width": 100,
      "height": 60
    }
  ],
  "edges": [
    {
      "uuid": "83091817-805f-4b1d-bf95-d87f94a89f4f",
      "fromVertex": "baa2e42e-0b41-408d-a987-c5f93166cac4",
      "toVertex": "9be93a23-d344-4e36-b025-0123d77e8b11",
      "edgeType": "FLOW"
    }
  ]
}
getSymbol

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/symbols/f2d2ee19-1582-4399-ab55-49b8c9ae1197?projection=SIMPLE&fields=titles

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "uuid": "f2d2ee19-1582-4399-ab55-49b8c9ae1197",
  "objectType": "INTERESTED_PARTY",
  "titles": {
    "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
      "title": "Customer"
    }
  }
}
getSymbol

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/symbols/535eb24b-afd2-4dab-9d61-c7a4f2acb19b?projection=SIMPLE&fields=titles

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "uuid": "535eb24b-afd2-4dab-9d61-c7a4f2acb19b",
  "objectType": "ACTIVITY",
  "titles": {
    "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
      "title": "Check order"
    }
  }
}
getModelDescriptions

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/models/c022603a-4d79-4b5e-a82e-ce1f2916b2c0/descriptions?startAt=0&maxResults=50

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "startAt": 0,
  "maxResults": 50,
  "total": 1,
  "data": [
    {
      "descriptionType": "4f394d93-0d4a-4b0c-b512-d96f193b9a5a",
      "content": {
        "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
          "text": "<p>Check the order before dispatch.</p>"
        }
      }
    }
  ]
}
getModel

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/models/c022603a-4d79-4b5e-a82e-ce1f2916b2c0?projection=SIMPLE&fields=documents

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "uuid": "c022603a-4d79-4b5e-a82e-ce1f2916b2c0",
  "modelType": "GENERAL_MODEL",
  "documents": [
    {
      "sourceId": "mt.documents",
      "uuid": "2148d3b8-c5c3-423c-928c-b988c62f5779"
    }
  ]
}
getDocumentSources

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/documents/sources

Open this operation in Swagger

Example HTTP 200 · JSON
[
  "mt.documents"
]
resolveDocuments

POST /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/documents/sources/mt.documents/documents/resolve

Open this operation in Swagger

JSON request body
{
  "language": "b030a9f8-a89c-41c4-a972-0da5763c4d95",
  "documentKeys": [
    "2148d3b8-c5c3-423c-928c-b988c62f5779"
  ]
}
Example HTTP 200 · JSON
[
  {
    "documentId": {
      "source": "mt.documents",
      "id": "2148d3b8-c5c3-423c-928c-b988c62f5779"
    },
    "title": "Order checklist",
    "link": "https://documents.example/order-checklist",
    "iconURL": null,
    "metadata": []
  }
]

Dispatch an order

ConnectionCustomerSymbol placed as a vertexDispatch orderSymbol placed as a vertex

Illustrative layout. Select a shape or use the element buttons to inspect its data.

Customer

This shape is a vertex: one placement in this model. Its symbol is the reusable object behind it.

Vertex ID
741269f4-2f7e-454c-a474-a64f4aaadf76
Symbol ID
f2d2ee19-1582-4399-ab55-49b8c9ae1197

Customer appears in both models: the symbol ID stays the same, while the vertex ID and placement change.

Dispatch order

This shape is a vertex: one placement in this model. Its symbol is the reusable object behind it.

Vertex ID
e83d0aa5-cc2b-46bd-af35-87a4a8ed46c2
Symbol ID
6ca1f77d-d782-460a-87a7-dc602838d71a
Connection

This edge connects the two vertices and implicitly defines the modeled relation. There is no separate relation entity to fetch.

Edge ID
0eebeb0f-d361-4c10-aee5-a1bfe41ccba1
From vertex
741269f4-2f7e-454c-a474-a64f4aaadf76
To vertex
e83d0aa5-cc2b-46bd-af35-87a4a8ed46c2
Description

Dispatch the checked order to the customer.

A rich-text value in a configured field.

Associated document

Order checklist

Resolved metadata; this does not download a file. Placeholder URL: https://documents.example/order-checklist

Show the API requests

These are bundled example responses, not executed requests. Highlighted JSON belongs to the selected element. Canvas and language responses show relevant fields; your server can return more.

getRepositories

GET /api/v1/repositories?projection=SIMPLE&startAt=0&maxResults=10

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "startAt": 0,
  "maxResults": 10,
  "total": 1,
  "data": [
    {
      "uuid": "603055e8-4734-461e-bf42-d4456afe7bb7",
      "name": "Process library"
    }
  ]
}
getModels

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/models?projection=SIMPLE&fields=titles&startAt=0&maxResults=50

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "startAt": 0,
  "maxResults": 50,
  "total": 2,
  "data": [
    {
      "uuid": "c022603a-4d79-4b5e-a82e-ce1f2916b2c0",
      "modelType": "GENERAL_MODEL",
      "titles": {
        "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
          "title": "Handle an order"
        }
      }
    },
    {
      "uuid": "a41979d0-f088-44e5-828c-bd12ce9e0196",
      "modelType": "GENERAL_MODEL",
      "titles": {
        "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
          "title": "Dispatch an order"
        }
      }
    }
  ]
}
getLanguages

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/languages?fields=uuid%2Cname%2CdefaultLanguage&startAt=0&maxResults=50

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "startAt": 0,
  "maxResults": 50,
  "total": 1,
  "data": [
    {
      "uuid": "b030a9f8-a89c-41c4-a972-0da5763c4d95",
      "name": "English",
      "defaultLanguage": true
    }
  ]
}
getCanvas

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/models/a41979d0-f088-44e5-828c-bd12ce9e0196/canvas

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "workflowState": "EDITABLE",
  "vertices": [
    {
      "uuid": "741269f4-2f7e-454c-a474-a64f4aaadf76",
      "symbol": "f2d2ee19-1582-4399-ab55-49b8c9ae1197",
      "x": 60,
      "y": 100,
      "width": 100,
      "height": 60
    },
    {
      "uuid": "e83d0aa5-cc2b-46bd-af35-87a4a8ed46c2",
      "symbol": "6ca1f77d-d782-460a-87a7-dc602838d71a",
      "x": 260,
      "y": 100,
      "width": 100,
      "height": 60
    }
  ],
  "edges": [
    {
      "uuid": "0eebeb0f-d361-4c10-aee5-a1bfe41ccba1",
      "fromVertex": "741269f4-2f7e-454c-a474-a64f4aaadf76",
      "toVertex": "e83d0aa5-cc2b-46bd-af35-87a4a8ed46c2",
      "edgeType": "FLOW"
    }
  ]
}
getSymbol

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/symbols/f2d2ee19-1582-4399-ab55-49b8c9ae1197?projection=SIMPLE&fields=titles

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "uuid": "f2d2ee19-1582-4399-ab55-49b8c9ae1197",
  "objectType": "INTERESTED_PARTY",
  "titles": {
    "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
      "title": "Customer"
    }
  }
}
getSymbol

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/symbols/6ca1f77d-d782-460a-87a7-dc602838d71a?projection=SIMPLE&fields=titles

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "uuid": "6ca1f77d-d782-460a-87a7-dc602838d71a",
  "objectType": "ACTIVITY",
  "titles": {
    "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
      "title": "Dispatch order"
    }
  }
}
getModelDescriptions

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/models/a41979d0-f088-44e5-828c-bd12ce9e0196/descriptions?startAt=0&maxResults=50

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "startAt": 0,
  "maxResults": 50,
  "total": 1,
  "data": [
    {
      "descriptionType": "4f394d93-0d4a-4b0c-b512-d96f193b9a5a",
      "content": {
        "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
          "text": "<p>Dispatch the checked order to the customer.</p>"
        }
      }
    }
  ]
}
getModel

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/models/a41979d0-f088-44e5-828c-bd12ce9e0196?projection=SIMPLE&fields=documents

Open this operation in Swagger

Example HTTP 200 · JSON
{
  "uuid": "a41979d0-f088-44e5-828c-bd12ce9e0196",
  "modelType": "GENERAL_MODEL",
  "documents": [
    {
      "sourceId": "mt.documents",
      "uuid": "2148d3b8-c5c3-423c-928c-b988c62f5779"
    }
  ]
}
getDocumentSources

GET /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/documents/sources

Open this operation in Swagger

Example HTTP 200 · JSON
[
  "mt.documents"
]
resolveDocuments

POST /api/v1/repositories/603055e8-4734-461e-bf42-d4456afe7bb7/documents/sources/mt.documents/documents/resolve

Open this operation in Swagger

JSON request body
{
  "language": "b030a9f8-a89c-41c4-a972-0da5763c4d95",
  "documentKeys": [
    "2148d3b8-c5c3-423c-928c-b988c62f5779"
  ]
}
Example HTTP 200 · JSON
[
  {
    "documentId": {
      "source": "mt.documents",
      "id": "2148d3b8-c5c3-423c-928c-b988c62f5779"
    },
    "title": "Order checklist",
    "link": "https://documents.example/order-checklist",
    "iconURL": null,
    "metadata": []
  }
]

Ready to use your own data? Follow the server quickstart.

Continue with your own server#

Build on the Quickstart: use your own server, API key and repository UUID. The examples continue the fictional Process library and Handle an order model. Replace their example values with values from your responses.

For Bash, set API_BASE_URL, API_KEY and REPOSITORY_ID as in the quickstart. For Swagger, use the same endpoints and parameters on your server. The requests below only read data, including the explicitly identified POST used to resolve document metadata.

Browse repository content#

Goal: produce a catalogue of model names, types and identifiers.

Prerequisite: a repository UUID from the quickstart. First list its models:

Bash / cURL
curl --fail-with-body --silent --show-error \
  --header "x-api-key: $API_KEY" \
  "$API_BASE_URL/repositories/$REPOSITORY_ID/models?projection=SIMPLE&fields=titles&startAt=0&maxResults=50"

Example HTTP 200 response:

JSON
{
  "startAt": 0,
  "maxResults": 50,
  "total": 2,
  "data": [
    {
      "uuid": "c022603a-4d79-4b5e-a82e-ce1f2916b2c0",
      "modelType": "GENERAL_MODEL",
      "titles": {
        "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
          "title": "Handle an order"
        }
      }
    },
    {
      "uuid": "a41979d0-f088-44e5-828c-bd12ce9e0196",
      "modelType": "GENERAL_MODEL",
      "titles": {
        "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
          "title": "Dispatch an order"
        }
      }
    }
  ]
}

The keys in titles identify languages. Retrieve the repository's language list:

Bash / cURL
curl --fail-with-body --silent --show-error \
  --header "x-api-key: $API_KEY" \
  "$API_BASE_URL/repositories/$REPOSITORY_ID/languages?fields=uuid,name,defaultLanguage&startAt=0&maxResults=50"

Example HTTP 200 response, showing the relevant fields (your response can contain additional language fields):

JSON · excerpt
{
  "startAt": 0,
  "maxResults": 50,
  "total": 1,
  "data": [{
    "uuid": "b030a9f8-a89c-41c4-a972-0da5763c4d95",
    "name": "English",
    "defaultLanguage": true
  }]
}

Match that language's uuid to a key in each model's titles. Read the nested title to produce:

Model name Type Model ID
Handle an order GENERAL_MODEL c022603a-4d79-4b5e-a82e-ce1f2916b2c0
Dispatch an order GENERAL_MODEL a41979d0-f088-44e5-828c-bd12ce9e0196

Use the desired language when present. If it is missing, your integration can fall back to the default language; if that is missing too, show an explicit label such as “Untitled model.” This is a display policy for your integration, not an automatic API translation.

Read all pages of both lists using pagination. Keep each model UUID together with its repository UUID. Empty lists are valid.

Next: choose a model and inspect its canvas below. References: List models, Languages.

Read a model's canvas#

Goal: identify placed objects and follow their connections.

Prerequisite: a model UUID returned in the selected repository. Set it from your result:

Bash / cURL
export MODEL_ID='REPLACE_WITH_MODEL_UUID'

curl --fail-with-body --silent --show-error \
  --header "x-api-key: $API_KEY" \
  "$API_BASE_URL/repositories/$REPOSITORY_ID/models/$MODEL_ID/canvas"

An HTTP 200 returns one canvas object, not a paginated list. This valid JSON excerpt omits other layout/style fields:

JSON · excerpt
{
  "workflowState": "EDITABLE",
  "vertices": [
    {
      "uuid": "baa2e42e-0b41-408d-a987-c5f93166cac4",
      "symbol": "f2d2ee19-1582-4399-ab55-49b8c9ae1197",
      "x": 40, "y": 60, "width": 100, "height": 60
    },
    {
      "uuid": "9be93a23-d344-4e36-b025-0123d77e8b11",
      "symbol": "535eb24b-afd2-4dab-9d61-c7a4f2acb19b",
      "x": 220, "y": 60, "width": 100, "height": 60
    }
  ],
  "edges": [{
    "uuid": "83091817-805f-4b1d-bf95-d87f94a89f4f",
    "fromVertex": "baa2e42e-0b41-408d-a987-c5f93166cac4",
    "toVertex": "9be93a23-d344-4e36-b025-0123d77e8b11",
    "edgeType": "FLOW"
  }]
}
  1. Index vertices by their uuid.
  2. Match each edge's fromVertex and toVertex to those vertex IDs. Here the edge connects the first placement to the second.
  3. Each vertex's symbol identifies the reusable modeled object. To read that object's metadata, use GET /repositories/{repositoryId}/symbols/{symbolId} with the returned symbol UUID.

The edge itself implicitly defines the modeled relation; there is no separate relation object to fetch. Other vertex-list endpoints can return a different representation of a symbol reference, so use the schema for the endpoint you called.

Next: collect descriptions and attached documents. References: Get canvas, Symbols, shared-symbol example.

Read descriptions and documents#

Goal: retrieve a model's rich-text content and discover the documents it refers to.

Prerequisites: MODEL_ID from the previous step and a language UUID from the repository's language list.

Read descriptive text#

Bash / cURL
curl --fail-with-body --silent --show-error \
  --header "x-api-key: $API_KEY" \
  "$API_BASE_URL/repositories/$REPOSITORY_ID/models/$MODEL_ID/descriptions?startAt=0&maxResults=50"

Example HTTP 200 response:

JSON
{
  "startAt": 0,
  "maxResults": 50,
  "total": 1,
  "data": [{
    "descriptionType": "4f394d93-0d4a-4b0c-b512-d96f193b9a5a",
    "content": {
      "b030a9f8-a89c-41c4-a972-0da5763c4d95": {
        "text": "<p>Check the order before dispatch.</p>"
      }
    }
  }]
}

descriptionType identifies a configured field. Rich-text field values are generally called descriptions. Match the language key in content as you did for titles, then read text. It can contain HTML: apply your application's HTML-sanitization rules before displaying it. Read remaining pages if needed.

Find the attached document references#

Bash / cURL
curl --fail-with-body --silent --show-error \
  --header "x-api-key: $API_KEY" \
  "$API_BASE_URL/repositories/$REPOSITORY_ID/models/$MODEL_ID?projection=SIMPLE&fields=documents"

Example HTTP 200 response:

JSON
{
  "uuid": "c022603a-4d79-4b5e-a82e-ce1f2916b2c0",
  "modelType": "GENERAL_MODEL",
  "documents": [{
    "sourceId": "mt.documents",
    "uuid": "2148d3b8-c5c3-423c-928c-b988c62f5779"
  }]
}

Here sourceId identifies the document provider and documents[].uuid is the provider's document key. Despite that field's name, not every provider uses UUID-formatted keys.

To see the available sources:

Bash / cURL
curl --fail-with-body --silent --show-error \
  --header "x-api-key: $API_KEY" \
  "$API_BASE_URL/repositories/$REPOSITORY_ID/documents/sources"

Example HTTP 200 response (an array, without a pagination envelope):

JSON
["mt.documents"]

This endpoint uses POST to read document metadata because the list of keys is sent in a request body. It does not create a document. Do not assume other POST operations are read-only.

Save the following JSON as resolve-document.json, replacing both the language UUID and document key with values from your responses. Use a JSON editor so provider keys containing quotes are escaped correctly:

JSON
{
  "language": "b030a9f8-a89c-41c4-a972-0da5763c4d95",
  "documentKeys": ["2148d3b8-c5c3-423c-928c-b988c62f5779"]
}

Set the source from the returned reference. URL-encode it first if it contains characters that are not safe in a URL path:

Bash / cURL
export SOURCE_ID='mt.documents'

curl --fail-with-body --silent --show-error \
  --request POST \
  --header "x-api-key: $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-binary @resolve-document.json \
  "$API_BASE_URL/repositories/$REPOSITORY_ID/documents/sources/$SOURCE_ID/documents/resolve"

In Swagger, open Documents → POST .../documents/resolve, set repositoryId and sourceId, and paste the JSON into the request body.

Example HTTP 200 response; titles, links and metadata depend on the provider:

JSON
[{
  "documentId": {
    "source": "mt.documents",
    "id": "2148d3b8-c5c3-423c-928c-b988c62f5779"
  },
  "title": "Order checklist",
  "link": "https://documents.example/order-checklist",
  "iconURL": null,
  "metadata": []
}]

Match documentId.source and documentId.id to the requested reference rather than relying on response order. The example link is a placeholder. A returned link may lead to another application and require separate authentication; it is not a guarantee of a direct file download. Do not forward your 2c8 API key to that link. Handle missing/unavailable documents as reported by the endpoint.

Next: decide how your integration displays the description and opens the document link. References: Model descriptions, Document sources, Resolve documents.

Prepare an integration for regular use#

Use pagination and field selection to keep requests bounded. Handle empty results, missing localized values and deleted resources. Follow the rate-limit and retry guidance when scheduling repeated reads.

Before adding create, update or delete operations, inspect their schemas and test in a suitable non-production repository. A read-only workflow does not make its API key read-only.