Skip to content

Synchronous workflows

Every synchronous workflow exposes an API resource that allows any program to use the workflow.

  • Request:

    • Verb: POST
    • Endpoint:

      https://host/api/v1/runtime/workflow/workflowId/action/analyze[?verboseErrorOutput=true]

      where:

      • host is host name or IP address of the NL Flow runtime
      • workflowId is the workflow ID
      • verboseErrorOutput=true is an optional query string parameter that makes the workflow produce a verbose output in case of errors.
    • HTTP headers:

      Mandatory:

      • X-API-KEY: API key

        where API key is one of the API keys associated with the workflow.

      • Content-type: application/json; charset=utf-8

      Optional:

      • X-Correlation-Id: Correlation ID

        For troubleshooting purposes. Correlation ID can be any unique string. It can be mentioned when asking for support in case of unexpected errors because support personnel can then track API calls based on this value when examining system logs.

    • Body: the substance of what needs to be processed by the workflow, that is an UTF-8 encoded JSON object compatible with the format of the workflow's input.

  • Response:

    • HTTP status code: the HTTP status code upon success is 200 (OK).
    • Body: in case of success, the response body is a JSON corresponding to the workflow output.

      In case of error the response body may contain a message providing information about the problem.

How to know a workflow's ID

To get the ID of a workflow to use in endpoints access the NL Flow application and:

  1. Open the workflow.
  2. Locate and copy the workflow ID.