Task History API
Introduction
The Task History API allows you to query your users’ usage of integration workflows and access data from historical workflow executions.
Task History API is available for Paragon customers on Enterprise plans. To learn more, contact your Customer Success Manager or [email protected].
When to use the Task History API
The Task History API can be used to analyze integration usage or pull information about historical workflow executions into your application. For example, you can use the Task History API to:
-
Query the number of workflow executions that ran last week for the Salesforce integration
-
Query all failed workflow executions for a specific user
-
Export all tasks that occurred in a specific month into Google BigQuery
You can find example queries in the request format below.
Generating API Keys
The Task History API authorizes with a project-level API Key, instead of the Paragon User Token.
API Keys provide access to all Connected Users in the project they are created in and can be rotated or deleted after being generated.
To generate a new project-level API Key:
-
Visit your Project’s Settings > API Keys.
-
Click “Create API Key”. Provide a meaningful name for the API Key for your reference.
-
The API Key will appear on a one-time basis for you to save in a secure place.
Examples
Querying Salesforce workflow executions run during a week’s time period
Response example:
Querying failed workflow executions for a user
Response example:
Endpoint Reference
Base URL
The Base URL of the Task History API endpoints begin with the same origin as the Connect and Users APIs.
-
For cloud customers who sign in to
dashboard.useparagon.com
, the Base URL ishttps\://api.useparagon.com/projects/\<Project ID>/task-history
-
For on-premise customers who sign in to
dashboard.<On-Premise URL>
, the base URL ishttps\://zeus.\<On-Premise URL>/projects/\<Project ID>/task-history
Authorization
Requests to the Task History API must provide an API Key as a Bearer-type Authorization
header in the request:
Pagination
API responses that include multiple objects will be provided in page size of 100. In the case that there are additional pages of data available, the API response will include a URL to get the next 100 records.
Rate Limits
The Task History API has a rate limit of 1,000 requests per 10 minutes. If you need higher rate limits, please reach out to our team at [email protected]
API Methods
Get workflow executions
GET
[Base URL]/workflow-executions
Search through historical workflow executions with the below filtering options as query parameters.
Query Parameters
Name | Type | Description |
---|---|---|
userId | String | Filter executions by a specific Connected User ID. |
workflowId | UUID | Filter executions for a specific workflow ID. |
integration | String | Filter executions for a specific integration, for example, salesforce . The integration name is in the same format as provided to paragon.connect . |
status | String | Filter executions by a status: EXECUTING / FAILED / SUCCEEDED / DELAYED |
beforeDate | String (Date) | Filter executions that began before a certain timestamp, in ISO 8601 format (for example, 2023-02-22 ). |
afterDate | String (Date) | Filter executions that began after a certain timestamp, in ISO 8601 format. |
offset | Number | Offset results by a fixed number of records. |
sortBy | String | Sort by execution time: ASC / DESC . Defaults to DESC . |
Get workflow execution by ID
GET
[Base URL]/workflow-executions/:executionID
Get details for a specific workflow execution by its Execution ID.
Path Parameters
Name | Type | Description |
---|---|---|
executionID* | UUID | The ID of the execution to get details for. |
Get details for step of workflow execution
GET
[Base URL]/workflow-executions/:executionID/step-executions/:stepExecutionID
Get details for a specific step of a workflow execution, by its Execution ID and Step Execution ID. These details include step input/output and run duration for the specific step.
Path Parameters
Name | Type | Description |
---|---|---|
executionID* | UUID | The ID of the execution to get details for. |
stepExecutionID* | UUID | The ID of the step execution to get details for. |
POST
[Base URL]/workflow-executions/:executionID/replay
Replay a specific workflow execution, using the same version of the workflow that the execution originally ran with.
This endpoint is in beta and may not be suitable for use in your production application. Please send any feedback you have about this endpoint to [email protected]!
Get workflow executions
GET
[Base URL]/workflow-executions
Get workflow execution by ID
GET
[Base URL]/workflow-executions/:executionID
Query Parameters
Name | Type | Description |
---|---|---|
userId | String | Filter executions by a specific Connected User ID. |
workflowId | UUID | Filter executions for a specific workflow ID. |
integration | String | Filter executions for a specific integration, for example, salesforce . The integration name is in the same format as provided to paragon.connect . |
status | String | Filter executions by a status: EXECUTING / FAILED / SUCCEEDED / DELAYED |
beforeDate | String (Date) | Filter executions that began before a certain timestamp, in ISO 8601 format (for example, 2023-02-22 ). |
afterDate | String (Date) | Filter executions that began after a certain timestamp, in ISO 8601 format. |
offset | Number | Offset results by a fixed number of records. |
sortBy | String | Sort by execution time: ASC / DESC . Defaults to DESC . |
Get details for step of workflow execution
GET
[Base URL]/workflow-executions/:executionID/step-executions/:stepExecutionID
Replay workflow execution
POST
[Base URL]/workflow-executions/:executionID/replay
Replay a specific workflow execution, using the same version of the workflow that the execution originally ran with.
This endpoint is in beta and may not be suitable for use in your production application. Please send any feedback you have about this endpoint to [email protected]!
Path Parameters
Name | Type | Description |
---|---|---|
executionID* | UUID | The ID of the execution to get details for. |