triggerWorkflow
POST
https://api.looply.io/v2/workflows/triggerworkflow/{workflow_id}/{workflow_version}
The triggerWorkflow
endpoint initiates the execution of a specified workflow. When called, this endpoint triggers the workflow process, allowing you to automate various tasks and operations defined within the workflow. This endpoint can receive a JSON body payload to be passed to the workflow execution. A looply_execution_id
will be returned on successful trigger of the workflow.
AWS IP address for whitelisting Looply API calls: 52.208.220.68
Path Parameters
200: OK Success Response 403: Forbidden Incorrect or No API Key Supplied 500: Internal Server Error 400: Bad Request
Copy {
"message" : "success" ,
"looply_execution_id" : "****"
}
Serverside issue with this endpoint
Copy {
"message" : "something went wrong"
}
Workflow ID is missing from the request path
Copy {
"message" : "incorrect workflow id"
}
resumeWorkflow
POST
https://api.looply.io/v2/workflows/resumeWorkflow/{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.
Path Parameters
Request Body
Example Body
Copy {
"payload" : {
"source" : "SAP" , // or "TEAMS" - Source is a protected attribute
// Any other relevant data for your workflow here...
}
}
200: OK Success 404: Not Found 403: Forbidden Incorrect or No API Key Supplied 409: Conflict 500: Internal Server Error
Copy {
"message" : "restarted" // or "already restarted"
}
The execution could not be found matching supplied execution/process ID
Copy {
"message" : "execution not found"
}
This process is not waiting to be resumed
Copy {
"message" : "not found"
}
Serverside issue with this endpoint
Copy {
"message" : "something went wrong"
}
terminateWorkflow
POST
https://api.looply.io/v2/workflows/terminateWorkflow/{process_id}
Terminate an ongoing execution of your workflow - supports providing a termination reason.
Path Parameters
Headers
Request Body
Example Body
Copy {
"payload" : {
"termination_reason" : "Process has now expired."
}
}
200 404
Copy {
"message" : "terminated"
}
Copy {
// Execution or process ID supplied in path is incorrect
// or exection is not actively running
"message" : "execution not found"
}
toggleScheduledWorkflow
POST
https://api.looply.io/v2/workflows/toggleScheduledWorkflow
Pause and resume scheduled workflows.
Request Body
200: OK Success 400: Bad Request Incorrect input body provided 409: Conflict Wrong Action Provided. 500: Internal Server Error Server side error.
Example Payload:
Copy {
"message" : "success" ,
"workflow_id" : "be9439c2-16b9-4de2-bb1a-9154b85af065" ,
"workflow_version" : 1 ,
"status" : "ACTIVE" // or "PAUSED"
}
getWorkflowExecutionById
GET
https://api.looply.io/v2/workflows/getWorkflowExecutionById
Returns the current state and logs for the workflow execution.
Query Parameters
200: OK Success 400: Bad Request Incorrect or missing Query Parameters 404: Not Found Execution does not exist 500: Internal Server Error Server side Error 401: Unauthorized You don't have access to this execution. 403: Forbidden Incorrect or No API Key Supplied
Example Payload:
Copy {
"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/v2/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
200: OK Success 400: Bad Request Incorrect or missing Query Parameters 401: Unauthorized You don't have access to this workflow's executions. 403: Forbidden Incorrect or No API Key Supplied 500: Internal Server Error Server side error.
Example Payload:
Copy {
"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/v2/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
200: OK Success 403: Forbidden Incorrect or No API Key Supplied 500: Internal Server Error Server side error.
Example Payload:
Copy {
"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/v2/workflows/getWorkflowById
Returns all data for a Looply Workflow
Query Parameters
200: OK Success 400: Bad Request Incorrect or missing Query Parameters 401: Unauthorized You don't have access to this workflow. 403: Forbidden Incorrect or No API Key Supplied 404: Not Found Execution does not exist 500: Internal Server Error Server side Error
Example Payload:
Copy {
"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/v2/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
200: OK Success 500: Internal Server Error Server side Error
Example Payload:
Copy {
"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/v2/workflows/getWorkflowSchemaById
Returns the data schema for a workflow
Query Parameters
200: OK Success 400: Bad Request Incorrect or missing Query Parameters 401: Unauthorized You don't have access to this execution. 403: Forbidden Incorrect or No API Key Supplied 404: Not Found Execution does not exist 500: Internal Server Error Server side Error
Example Payload:
Copy {
"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
}
}