Paragon
Search
K
Links

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.
API Keys screen in Paragon dashboard
To generate a new project-level API Key:
  1. 1.
    Visit your Project's Settings > API Keys.
  2. 2.
    Click "Create API Key". Provide a meaningful name for the API Key for your reference.
  3. 3.
    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

REST API
GET /projects/<Paragon Project ID>/task-history/workflow-executions?integration=salesforce&afterDate=2023-02-16T00:00:00&beforeDate=2023-02-23T00:00:00
Authorization: Bearer <Paragon API Key>
Response example:
{
"workflowExecutions": [
{
"id": "c70cafa5-4f80-45c7-b5b3-71454f6d638d",
"userId": "d1f142cd-1dfe-4d76-ab4c-8f64901a9c5c",
"taskCount": 1,
"runDuration": 1477,
"workflowId": "c395c170-4541-499c-afd1-0eccfaae49c9",
"status": "SUCCEEDED",
"dateEnded": "2023-02-20T06:21:43.751Z",
"dateStarted": "2023-02-20T06:21:42.274Z"
},
...
],
"nextLink": "https://zeus.useparagon.com/projects/d1f142cd-1dfe-4d76-ab4c-8f64901a9c5c/task-history/workflow-executions?integration=salesforce&afterDate=2023-02-16T00:00:00&beforeDate=2023-02-23T00:00:00&sortBy=ASC&offset=100",
"total": 14295
}

Querying failed workflow executions for a user

REST API
GET /projects/<Paragon Project ID>/task-history/[email protected]&status=FAILED
Authorization: Bearer <Paragon API Key>
Response example:
{
"workflowExecutions": [
{
"id": "317a396c-7dc8-4a1f-8ceb-b39d5ad845da",
"userId": "123456",
"taskCount": 0,
"runDuration": 3847,
"workflowId": "24cf377b-c7f5-40e7-9b10-6cc5d811266a",
"status": "FAILED",
"dateEnded": "2023-03-01T11:15:04.051Z",
"dateStarted": "2023-03-01T11:15:00.204Z"
},
...
],
"nextLink": "https://zeus.useparagon.com/projects/d1f142cd-1dfe-4d76-ab4c-8f64901a9c5c/task-history/[email protected]&status=FAILED&sortBy=ASC&offset=100",
"total": 180
}

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 is https://api.useparagon.com/projects/<Project ID>/task-history
  • For on-premise customers who sign in to dashboard.<On-Premise URL>, the base URL is https://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:
GET /projects/<Paragon Project ID>/task-history/workflow-executions
Authorization: Bearer <Paragon API Key>

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 nextLink URL property that can be used to fetch the next page.

API Methods

get
[Base URL]
/workflow-executions
Get workflow executions
get
[Base URL]
/workflow-executions/:executionID
Get workflow execution by ID
get
[Base URL]
/workflow-executions/:executionID/step-executions/:stepExecutionID
Get details for step of workflow execution