Test workflow definition

POST https://automation.8x8.com/api/v1/accounts/:accountId/definitions/:definitionId/workflows

Use this resource to test workflow definition by starting workflow instances. This endpoint is useful for testing your workflows without involving external triggers like inbound messages.

Request

Path Parameters

    accountId stringrequired

    Account id

    definitionId stringrequired

    Workflow definition id.

Query Parameters

    version integer

    Possible values: >= 1

    Version of the definition to test. If not specified, latest version is used.

Body

    objectobject

    Workflow data required by the workflow. For instance, if you are trying to test a workflow that is supposed to be started by an inbound chat apps message, the request data should simulate an actual inbound webhook call. If you are unsure what the webhook payload is like for your account, please refer to webhook object structure or contact support.

A new workflow instance has been started from the specified workflow.

Response Headers

    Location

    Path to the newly started workflow instance.

Definition id is invalid (not a valid uuid).

Schema

    codeintegerrequired

    Error code.

    messagestringrequired

    Description of the error.

    errorIdstringrequired

    Unique error id.

    timestampstringrequired

    Timestamp when the error occurred.

{
"code":0,
"message":"string",
"errorId":"string",
"timestamp":"string"
}
{
"code":1000,
"message":"Invalid definition id.",
"errorId":"2558ff83-c8db-4890-805e-ad64001857a1",
"timestamp":"2021-07-13T01:28:37.66Z"
}

Workflow definition is not found.

Schema

    codeintegerrequired

    Error code.

    messagestringrequired

    Description of the error.

    errorIdstringrequired

    Unique error id.

    timestampstringrequired

    Timestamp when the error occurred.

{
"code":0,
"message":"string",
"errorId":"string",
"timestamp":"string"
}
{
"code":1300,
"message":"Definition 2aa9465e-dec7-4c3e-8fa6-bd168af9eaca not found.",
"errorId":"2558ff83-c8db-4890-805e-ad64001857a1",
"timestamp":"2021-07-13T01:28:37.66Z"
}

Source: https://developer.8x8.com/connect/reference/start-workflow-instance · 8x8 CPaaS Developer Docs. Synced for support deflection.

Was this article helpful?
or
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.

Didn't find what you were looking for?

Submit a request