The Raw Activity Data API provides access to raw, unaggregated activity data ingested from your GTM motions.
The Raw Activity Data API is a bulk REST API, which means data extraction jobs will be generated based on your requests, with files available for download upon completion.
Start a Job
The first step in retrieving activities is creating a job. This object represents the activity export that you have created.
POST https://api.people.ai/pull/v1/export/activities/jobs
curl -X POSThttps://api.people.ai/pull/v1/export/activities/jobs-H "Authorization: Bearer {bearer_token}"-H "Content-Type: application/json"-d "{request parameters}"Parameter | Description |
start_date string | Start date of your data retrieval, starting at 0:00 AM UTC of that day Acceptable values follow the “yyyy-MM-dd” format |
end_date string | End date of your data retrieval, ending at 11:59 PM UTC of that day Acceptable values follow the “yyyy-MM-dd” format |
activity_type string | Activity types to include in the export. Acceptable values are:
|
output_format string | Output data structure.
|
export_type string | Acceptable values are:
|
Response
Upon successful job creation, the API will return the following fields:
Property | Description |
job_id string | Unique job identifier |
state string | Status of the job
“Queued”, “Running", “Completed", “Canceled”, or “Failed” |
export_type string | The export type specified in the request: “delta” or "snapshot" |
output_format string | Activity type specified in the request: “JSONLines” |
activity_type string | Activity type specified in the request: “email”, “meeting”, “call”, or “all” |
start_date string, date | Start date specified in the request: “yyyy-MM-dd” |
end_date string | End date specified in the request: “yyyy-MM-dd” |
job_created_time string | The time at which the job was created: “yyyy-MM-ddTHH:mm:ssZ” |
job_start_time string | The time that the job started: “yyyy-MM-ddTHH:mm:ssZ” |
job_end_time string | The time the job ended: “yyyy-MM-ddTHH:mm:ssZ” |
results_size integer | Result size in bytes |
fragment integer | Count of fragments for parallel data download (0-based) |
Job Status Request
Retrieve the details of a job, using the same response as the initial request.
GET https://api.people.ai/pull/v1/export/activities/jobs/{job_id}curl -X GEThttps://api.people.ai/pull/v1/export/activities/jobs/{job_id}-H "Authorization: Bearer {bearer token}"To get the details of all jobs initiated in the past 10 days, simply omit the job_id parameter
GET https://api.people.ai/pull/v1/export/activities/jobs
curl -X GEThttps://api.people.ai/pull/v1/export/activities/jobs-H "Authorization: Bearer {bearer token}"Data Retrieval
When a job is in a Completed state, get all activity data produced by the job
GET https://api.people.ai/pull/v1/export/activities/jobs/{job_id}/datacurl -X GEThttps://api.people.ai/pull/v1/export/activities/jobs/{job_id}/data-H "Authorization: Bearer {bearer token}"For parallel retrieval, use fragments. Large datasets can be retrieved more quickly by concurrently fetching multiple fragments at a time.
GET https://api.people.ai/pull/v1/export/activities/jobs/{job_id}/data?fragment={fragment}curl -X GEThttps://api.people.ai/pull/v1/export/activities/jobs/{job_id}/fragment?fragment={fragment number}-H "Authorization: Bearer {bearer token}"For the response schema, refer to the Activity APIs: Raw Activity Data Schema article.
Use Limits
To protect the integrity of our platform, usage of the Backstory APIs is subject to these use limits:
Maximum number of concurrent export jobs | 2 |
Maximum number of queued export jobs (inclusive of currently exporting jobs) | 10 |
File retention period | 10 days |
Maximum date range for snapshot data | 1 year |
Maximum date range for non-snapshot (delta) data | 14 days |
Time Out
The maximum timeout for data retrieval after the job is in a 'Completed' state is 60 seconds per 20mb of data
For example, if Backstory is fetching 80 mb of data, 240 seconds is the maximum wait time.
