Workflow API

Workflow related endpoints, from the Trigger to the Results

triggerworkflow/{workflow_id}/{workflow_version}

POST https://api.looply.io/v1/workflows/triggerworkflow/{workflow_id}/{workflow_version}

You can supply any (although not required) JSON stringified body to this request. This will return a looply_execution_id which can be used to get more information on this Looply Workflow.

Path Parameters

NameTypeDescription

workflow_id*

String

id of the workflow

workflow_version

String

version of the workflow

Headers

NameTypeDescription

x-api-key*

String

Your API Key

{
	"message": "success",
	"looply_execution_id": "****"
}

{action}/{process_id}

POST https://api.looply.io/v1/workflows/{action}/{process_id}

Manually resume workflows depending on the process_id supplied. Resuming a workflow can contain any JSON stringified body payload, source is the only protected attribute.

More actions to come...

Path Parameters

NameTypeDescription

action*

String

resumeworkflow is currently the only action available

process_id*

String

Process ID supplied to the triggerworkflow endpoint or use the looply_execution_id if you did not supply one.

Headers

NameTypeDescription

x-api-key*

String

Your API Key

Request Body

NameTypeDescription

source

String

Allowed sources TEAMS | SAP

toggleScheduledWorkflow

POST https://api.looply.io/v1/workflows/toggleScheduledWorkflow

Pause and resume scheduled workflows.

Headers

NameTypeDescription

x-api-key

String

Your API Key

Request Body

NameTypeDescription

workflow_id

String

id of the workflow

workflow_version

Number

version of the workflow

action

String

PAUSE or PLAY

Example Payload:

{
	"message": "success",
	"workflow_id": "be9439c2-16b9-4de2-bb1a-9154b85af065",
	"workflow_version": 1,
	"status": "ACTIVE" // or "PAUSED"
}

getWorkflowExecutionById

GET https://api.looply.io/v1/workflows/getWorkflowExecutionById

Returns the current state and logs for the workflow execution.

Query Parameters

NameTypeDescription

workflow_id*

String

Id of the workflow

workflow_execution_id*

String

Id for the workflow execution

Headers

NameTypeDescription

x-api-key*

String

Your API Key

Example Payload:

{
	"message": "success",
	"item": {
		"workflow_current_state": "State Name",
		"organization_id": "****",
		"workflow_execution_id": "****",
		"modified_by": null,
		"workflow_version": 1,
		"workflow_event_log": {
			// trimmed down logs
		},
		"workflow_id": "****",
		"workflow_input_payload": {
			// combined input payload
		},
		"workflow_output_payload": {
			// combined output payload
		},
		"workflow_trigger_type": "REQUEST",
		"workspace_id": "****",
		"created_on": 1697641835712,
		"condensed_logs": {
            		// input/output for each step. Condensed
        	},
		"workflow_details": { 
			// structure of the workflow - connections and steps
		}
    }

getWorkflowExecutionHistory

GET https://api.looply.io/v1/workflows/getWorkflowExecutionHistory

Returns a list of workflow executions. Will return a lastKey attribute. Use this to get the next page of data.

Limit can be added to the request, 30 is the max.

Query Parameters

NameTypeDescription

workflow_id*

String

id of the workflow

limit

String

Number of items to return per page. Default 20

workflow_execution_id

String

Pagination Key from the lastKey attribute.

Headers

NameTypeDescription

x-api-key*

String

Your API Key

Example Payload:

{
	"message": "success",
	"count": 20,
	"items": [
		{
			"workflow_id": "****",
			"workflow_current_state": "wait_for_response_state",
			"modified_on": 1697454831391,
			"organization_id": "****",
			"workflow_execution_id": "****",
			"modified_by": null,
			"workflow_version": 1,
			"workflow_event_log": {
				// trimmed down logs
			},
			"workflow_trigger_type": "REQUEST",
			"workspace_id": "****",
			"created_on": 1697454828765,
			"workflow_details": {
				"workflow_name": "Workflow name"
			}
		}
		
	],
	"lastKey": {
		"workflow_id": "****",
		"workflow_execution_id": "****"
	}
}

getOrganizationExecutions

GET https://api.looply.io/v1/workflows/getOrganizationExecutions

Returns a list of all the workflow executions for an organization. Will return a lastKey attribute. Use this to get the next page of data.

Limit can be added to the request, 30 is the max.

Query Parameters

NameTypeDescription

limit

String

Number of items to return per page. Default 20

workflow_id

String

Pagination Key from the lastKey attribute

workflow_execution_id

String

Pagination Key from the lastKey attribute

Example Payload:

{
	"message": "success",
	"count": 20,
	"items": [
		{
			"workflow_id": "****",
			"workflow_current_state": "wait_for_response_state",
			"modified_on": 1697454831391,
			"organization_id": "****",
			"workflow_execution_id": "****",
			"modified_by": null,
			"workflow_version": 1,
			"workflow_event_log": {
				// event log
			},
			"workflow_trigger_type": "REQUEST",
			"workspace_id": "****",
			"created_on": 1697454828765,
			"workflow_details": {
				"workflow_name": "Workflow name"
			}
		},
		
	],
	"lastKey": {
		"workflow_id": "****",
		"workflow_execution_id": "****"
	}
}

getWorkflowById

GET https://api.looply.io/v1/workflows/getWorkflowById

Returns all data for a Looply Workflow

Query Parameters

NameTypeDescription

workflow_id*

String

Id for the workflow

workflow_version*

String

Version of the workflow

Headers

NameTypeDescription

x-api-key*

String

Your API Key

Example Payload:

{
  "message": "success",
  "item": {
    "organization_id": "****",
    "workflow_integrations": {
      // integrations configured for this workflow - e.g. SAP profile
    },
    "workflow_name": "****",
    "created_by": "test-user",
    "workflow_status_version": "DRAFT_1",
    "modified_by": null,
    "workflow_version": 1,
    "workflow_steps": [
      // states within the workflow
    ],
    "workflow_id": "****",
    "modified_on": 1697642922168,
    "workflow_connections": [
      // connections between all the workflow states
    ],
    "workflow_status": "DRAFT",
    "latest": "true",
    "workspace_id": "****",
    "created_on": 1695136500202,
    "workflow_schema": {
      // workflow schema
    }
  }
}

getOrganizationWorkflows

GET https://api.looply.io/v1/workflows/getOrganizationWorkflows

Returns a list organization workflows. Will return a lastKey attribute. Use this to get the next page of data.

Limit can be added to the request, 30 is the max.

Query Parameters

NameTypeDescription

limit

String

Number of items to return per page. Default 20

workflow_id

String

Pagination Key from the lastKey attribute.

workflow_version

String

Pagination Key from the lastKey attribute.

Headers

NameTypeDescription

x-api-key*

String

Your API Key

Example Payload:

{
  "message": "success",
  "count": 20,
  "items": [
    {
      "workflow_id": "****",
      "modified_on": 1693488718083,
      "organization_id": "****",
      "workflow_status": "ACTIVE",
      "latest": "false",
      "workflow_name": "Adaptive Card Workflow",
      "created_by": "****",
      "workflow_status_version": "ACTIVE_3",
      "modified_by": "****",
      "workspace_id": "****",
      "created_on": 1692614072550
    }
  ],
  "lastKey": {
    "organization_id": "****",
    "workflow_id": "****",
    "workflow_version": 1
  }
}

getWorkflowSchemaById

GET https://api.looply.io/v1/workflows/getWorkflowSchemaById

Returns the data schema for a workflow

Query Parameters

NameTypeDescription

workflow_id*

String

Id of the workflow

workflow_version*

String

Version of the workflow

Headers

NameTypeDescription

x-api-key*

String

Your API Key

Example Payload:

{
  "message": "success",
  "item": {
    "workflow_id": "****",
    "modified_on": 1697642922168,
    "created_by": "test-user",
    "workflow_mock_payload": {
      // mock payload from a previous execution
    },
    "workflow_schema": {
      // schema for the mock payload
    },
    "modified_by": null,
    "workflow_version": 1,
    "created_on": 1695136500202
  }
}

Last updated