You can obtain a list of all timelines and their statistics in a CSV table using Timeline API.
For example, you may want to export the calculated basic metrics to work with them in a separate system. To do it, follow the steps below.
Note. For information on where to find path parameter values for the endpoints, see Project path parameters.
Before you begin
As in this example an interaction with an existing project is expected, make sure that the target project has some data in it before collecting timeline statistics. The data can be uploaded from any source in this case, using Timeline interface or through API requests.
For details on data upload using Timeline interface, data requirements and mapping, see Process Analysis Project in Timeline web Help.
For details on data upload using Timeline API, see How to Upload Data to Project.
Collecting timeline data
- Send a POST request to initiate the process of collecting timeline statistics.
Endpoint:
{your.timeline.instance}.com/api/ext/1.0/project/{projectId}/timeline-statistics
Required parameters: projectId
In response, you will receive a processingId.
- Send a GET request with the processingId returned by the previous request. Endpoint:
{your.timeline.instance}.com/api/ext/1.0/processing/{processingId}
Poll the processing endpoint until the status becomes FINISHED.
In response, you will receive a URL.
- Send a GET request to the received URL. This will start a download of a CSV file with a table, which contains timeline data. The file will be downloaded to the machine or server from which the request was made.
See the content of the resulting file in the table below.
Show the resulting file content
Column name |
Value format |
Description |
inquiry_no |
Number |
Numeric name of a timeline. |
Start time |
Date and time in the format configured in the project |
Timestamp of the Start Event in the timeline. |
Finish time |
Date and time in the format configured in the project |
Timestamp of the End Event in the timeline. |
Tag |
String |
A user-defined, alphanumeric label of the timeline. |
Number of events |
Number |
An absolute number of events included in the timeline. |
Number of unique events |
Number |
A number of unique occurrences of events in the timeline. |
Duration |
Time in seconds |
Absolute time from Start Event to End Event in the timeline. |
Average gap |
Time in seconds |
Average time between two event occurrences in the timeline. |
Min gap |
Time in seconds |
Minimal time between two consecutive events in the timeline. |
Max gap |
Time in seconds |
Maximal time between two consecutive events in the timeline. |
Note. The value format may differ depending on the project settings.
Examples
For Windows
Important. CURL is not available on Windows by default, you will need to install it separately to use the commands below.
- Request:
curl --location --request POST "https://online.timelinepi.com/api/ext/1.0/project/6032/timeline-statistics" --header "Authorization: Bearer b2SampleTokenGY0ZTktOTAyMC00YTg4LTljZWUtMmVkMzBjNzY0NDBmOjhkOWNkYTI2LTRhY2ItNGY5Yy04YWYxLWVjNzJhZDQwNmJhZA=="
Response:
{
"processingId": "8WsPCljtJrv1be7Hn_2s5A"
}
- Request:
curl --location "https://online.timelinepi.com/api/ext/1.0/processing/8WsPCljtJrv1be7Hn_2s5A" --header "Authorization: Bearer b2SampleTokenGY0ZTktOTAyMC00YTg4LTljZWUtMmVkMzBjNzY0NDBmOjhkOWNkYTI2LTRhY2ItNGY5Yy04YWYxLWVjNzJhZDQwNmJhZA=="
Response:
{
"id": "8WsPCljtJrv1be7Hn_2s5A",
"status": "FINISHED",
"result": {
"downloadUrl": "https://SampleURL.com/project-import/6032/timelines-1691421471051/TimelinesWithStats.csv?AWSAccessKeyId=ASIA2OZVVRERWK56ND2K&Expires=1691422967&Signature=qHv7gR%2FmNGPe2WNImOHrjUsCVJ8%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEM7%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJIMEYCIQDtgiEkqCelCbw06BfFh9Kl4E2QeHFcGtYZZH68JUF8MQIhAJf34XS2IurBjNuzdSFPsrvaQ3mH3acnwUPBCsqWF3l%2BKo8ECHcQAxoMNzE4OTgyNzExNTg3Igya7uPHDCc5v80vOugq7AOAgFX753WejQkcfJNVI%2Fpuxzltw65GDUBUeA0IU2vhLxnccYarnXbX1Iy2KmrHoxnnhkqJp2oXYyImYnQO2x4eLNVGmP%2BbI7tVT4y5Ctq2I7p%2FPPKK5q4onAgtxZ1Lggj05nLhEq1iMrRwSq6LV3V0ssmHdZAXpxQxgRpm1o8EJEcgUIE2qVFenhLMMag9DwAVcr6kGxGHY3K6acq%2FmVCDKaMixaD2B6IsJ8XV30Mw5eQ6gFHhxQTFAeAn6L2LTBwSMEafqQBDijiI86CRaNtATTSbb%2F3%2Fp8pz30eLJTmnSj4wAdfLmfDLjN3h5WM%2Fsrys57h3qA%2BEM9dMOz4fJ3mGuQkCUtNz%2FCH%2Bxv678ell58WdvPiS4qxYPkfFyK50a7W25Vs2%2BEAIldKMHdG4afQ8mAUynq0Z27rm3yP%2Fb4PIoKJ%2FqpKm3EXo9uZZvmUaqEdBgdanhHT5vhLbgbBBqbscH9LS%2Fopjr11w%2BOqBrokVJUcEWpUIrkGbBdUr1%2B7BXe8lowh2jmgMIXIpN1mH0Q1FCW2T2z8aPMUEYaMYBEDiJGHxZhJDXMMBeg7aV8SqZ9DvlJCPQyozoCNKhFRMv0O9QbmUZT5%2B9NuCxwOWsq8LqN4guNZUT02%2BYA5MLgRKVDRLMkt%2BD%2FJUIuk3j%2FEw9unDpgY6pQEYcTpxliacrSrvT32f5q4TcOJrGPjABuoPja0tYGkbxFu%2BjMeRb9uVdAEiFcKDJRR6gW74AgsTY09oxCNTwn0Z%2BzL64xAjf1u6aeePHz4ND2ieaiZsLsX1teCp0Mb%2BXlF%2FVGwDOH4q3owJ8Y0X28dGZE00dq0MuYmOQOE9L3JQ8%2BI91ec0fmAxKP7sflVk2Vb1WABWRf96LIglY5TLZXa0ZF5CdTg%3D"
},
}
- Request:
curl --location "https://SampleURL.com/project-import/6032/timelines-1691421471051/TimelinesWithStats.csv?AWSAccessKeyId=ASIA2OZVVRERWK56ND2K&Expires=1691422967&Signature=qHv7gR%2FmNGPe2WNImOHrjUsCVJ8%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEM7%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJIMEYCIQDtgiEkqCelCbw06BfFh9Kl4E2QeHFcGtYZZH68JUF8MQIhAJf34XS2IurBjNuzdSFPsrvaQ3mH3acnwUPBCsqWF3l%2BKo8ECHcQAxoMNzE4OTgyNzExNTg3Igya7uPHDCc5v80vOugq7AOAgFX753WejQkcfJNVI%2Fpuxzltw65GDUBUeA0IU2vhLxnccYarnXbX1Iy2KmrHoxnnhkqJp2oXYyImYnQO2x4eLNVGmP%2BbI7tVT4y5Ctq2I7p%2FPPKK5q4onAgtxZ1Lggj05nLhEq1iMrRwSq6LV3V0ssmHdZAXpxQxgRpm1o8EJEcgUIE2qVFenhLMMag9DwAVcr6kGxGHY3K6acq%2FmVCDKaMixaD2B6IsJ8XV30Mw5eQ6gFHhxQTFAeAn6L2LTBwSMEafqQBDijiI86CRaNtATTSbb%2F3%2Fp8pz30eLJTmnSj4wAdfLmfDLjN3h5WM%2Fsrys57h3qA%2BEM9dMOz4fJ3mGuQkCUtNz%2FCH%2Bxv678ell58WdvPiS4qxYPkfFyK50a7W25Vs2%2BEAIldKMHdG4afQ8mAUynq0Z27rm3yP%2Fb4PIoKJ%2FqpKm3EXo9uZZvmUaqEdBgdanhHT5vhLbgbBBqbscH9LS%2Fopjr11w%2BOqBrokVJUcEWpUIrkGbBdUr1%2B7BXe8lowh2jmgMIXIpN1mH0Q1FCW2T2z8aPMUEYaMYBEDiJGHxZhJDXMMBeg7aV8SqZ9DvlJCPQyozoCNKhFRMv0O9QbmUZT5%2B9NuCxwOWsq8LqN4guNZUT02%2BYA5MLgRKVDRLMkt%2BD%2FJUIuk3j%2FEw9unDpgY6pQEYcTpxliacrSrvT32f5q4TcOJrGPjABuoPja0tYGkbxFu%2BjMeRb9uVdAEiFcKDJRR6gW74AgsTY09oxCNTwn0Z%2BzL64xAjf1u6aeePHz4ND2ieaiZsLsX1teCp0Mb%2BXlF%2FVGwDOH4q3owJ8Y0X28dGZE00dq0MuYmOQOE9L3JQ8%2BI91ec0fmAxKP7sflVk2Vb1WABWRf96LIglY5TLZXa0ZF5CdTg%3D
Response:
inquiry_no,"Start time","Finish time",Tag,Number of events,Number of unique events,Duration,Average gap,Min gap,Max gap
74373744161,2017-04-23 10:50:00,2017-04-23 11:06:00,,3,3,960,480,0,960
16222601161,2017-03-20 10:05:00,2017-03-20 10:09:00,,3,3,240,120,0,240
44018620161,2017-03-12 08:23:00,2017-03-12 08:36:00,,3,3,780,390,0,780
60166220161,2017-03-12 16:59:00,2017-03-12 17:05:00,,3,3,360,180,0,360
82914552161,2017-04-04 11:49:00,2017-04-04 11:52:00,,3,3,180,90,0,180
81436889061,2017-03-08 11:44:00,2017-03-08 11:49:00,,3,3,300,150,0,300
89443489061,2017-03-08 12:29:00,2017-03-08 12:34:00,,3,3,300,150,0,300
70697652161,2017-04-04 09:10:00,2017-04-04 09:11:00,,3,3,60,30,0,60
5955650161,2017-03-15 14:35:00,2017-03-15 14:52:00,,3,3,1020,510,0,1020
9617706161,2017-05-09 09:35:00,2017-05-09 09:41:00,,3,3,360,180,0,360
80570779061,2017-03-07 11:59:00,2017-03-07 12:02:00,,3,3,180,90,0,180
19052579061,2017-03-07 08:45:00,2017-03-07 08:50:00,,6,3,300,60,0,300
52949629061,2017-03-02 16:16:00,2017-03-02 16:22:00,,3,3,360,180,0,360
1741704161,2017-04-19 14:55:00,2017-04-19 15:13:00,,3,3,1080,540,0,1080
57811889061,2017-03-08 15:31:00,2017-03-08 15:34:00,,3,3,180,90,0,180
11383444161,2017-04-23 10:50:00,2017-04-23 11:04:00,,3,3,840,420,0,840
For Linux
- Request:
curl --location --request POST 'https://online.timelinepi.com/api/ext/1.0/project/6032/timeline-statistics' \
--header 'Authorization: Bearer b2SampleTokenGY0ZTktOTAyMC00YTg4LTljZWUtMmVkMzBjNzY0NDBmOjhkOWNkYTI2LTRhY2ItNGY5Yy04YWYxLWVjNzJhZDQwNmJhZA=='
Response:
{
"processingId": "8WsPCljtJrv1be7Hn_2s5A"
}
- Request:
curl --location 'https://online.timelinepi.com/api/ext/1.0/processing/8WsPCljtJrv1be7Hn_2s5A' \
--header 'Authorization: Bearer b2SampleTokenGY0ZTktOTAyMC00YTg4LTljZWUtMmVkMzBjNzY0NDBmOjhkOWNkYTI2LTRhY2ItNGY5Yy04YWYxLWVjNzJhZDQwNmJhZA=='
Response:
{
"id": "8WsPCljtJrv1be7Hn_2s5A",
"status": "FINISHED",
"result": {
"downloadUrl": "https://SampleURL.com/project-import/6032/timelines-1691421471051/TimelinesWithStats.csv?AWSAccessKeyId=ASIA2OZVVRERWK56ND2K&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NTwn0Z%2BzL64xAjf1u6aeePHz4ND2ieaiZsLsX1teCp0Mb%2BXlF%2FVGwDOH4q3owJ8Y0X28dGZE00dq0MuYmOQOE9L3JQ8%2BI91ec0fmAxKP7sflVk2Vb1WABWRf96LIglY5TLZXa0ZF5CdTg%3D"
},
}
- Request:
curl --location 'https://SampleURL.com/project-import/6032/timelines-1691421471051/TimelinesWithStats.csv?AWSAccessKeyId=ASIA2OZVVRERWK56ND2K&Expires=1691422967&Signature=qHv7gR%2FmNGPe2WNImOHrjUsCVJ8%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEM7%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJIMEYCIQDtgiEkqCelCbw06BfFh9Kl4E2QeHFcGtYZZH68JUF8MQIhAJf34XS2IurBjNuzdSFPsrvaQ3mH3acnwUPBCsqWF3l%2BKo8ECHcQAxoMNzE4OTgyNzExNTg3Igya7uPHDCc5v80vOugq7AOAgFX753WejQkcfJNVI%2Fpuxzltw65GDUBUeA0IU2vhLxnccYarnXbX1Iy2KmrHoxnnhkqJp2oXYyImYnQO2x4eLNVGmP%2BbI7tVT4y5Ctq2I7p%2FPPKK5q4onAgtxZ1Lggj05nLhEq1iMrRwSq6LV3V0ssmHdZAXpxQxgRpm1o8EJEcgUIE2qVFenhLMMag9DwAVcr6kGxGHY3K6acq%2FmVCDKaMixaD2B6IsJ8XV30Mw5eQ6gFHhxQTFAeAn6L2LTBwSMEafqQBDijiI86CRaNtATTSbb%2F3%2Fp8pz30eLJTmnSj4wAdfLmfDLjN3h5WM%2Fsrys57h3qA%2BEM9dMOz4fJ3mGuQkCUtNz%2FCH%2Bxv678ell58WdvPiS4qxYPkfFyK50a7W25Vs2%2BEAIldKMHdG4afQ8mAUynq0Z27rm3yP%2Fb4PIoKJ%2FqpKm3EXo9uZZvmUaqEdBgdanhHT5vhLbgbBBqbscH9LS%2Fopjr11w%2BOqBrokVJUcEWpUIrkGbBdUr1%2B7BXe8lowh2jmgMIXIpN1mH0Q1FCW2T2z8aPMUEYaMYBEDiJGHxZhJDXMMBeg7aV8SqZ9DvlJCPQyozoCNKhFRMv0O9QbmUZT5%2B9NuCxwOWsq8LqN4guNZUT02%2BYA5MLgRKVDRLMkt%2BD%2FJUIuk3j%2FEw9unDpgY6pQEYcTpxliacrSrvT32f5q4TcOJrGPjABuoPja0tYGkbxFu%2BjMeRb9uVdAEiFcKDJRR6gW74AgsTY09oxCNTwn0Z%2BzL64xAjf1u6aeePHz4ND2ieaiZsLsX1teCp0Mb%2BXlF%2FVGwDOH4q3owJ8Y0X28dGZE00dq0MuYmOQOE9L3JQ8%2BI91ec0fmAxKP7sflVk2Vb1WABWRf96LIglY5TLZXa0ZF5CdTg%3D
Response:
inquiry_no,"Start time","Finish time",Tag,Number of events,Number of unique events,Duration,Average gap,Min gap,Max gap
74373744161,2017-04-23 10:50:00,2017-04-23 11:06:00,,3,3,960,480,0,960
16222601161,2017-03-20 10:05:00,2017-03-20 10:09:00,,3,3,240,120,0,240
44018620161,2017-03-12 08:23:00,2017-03-12 08:36:00,,3,3,780,390,0,780
60166220161,2017-03-12 16:59:00,2017-03-12 17:05:00,,3,3,360,180,0,360
82914552161,2017-04-04 11:49:00,2017-04-04 11:52:00,,3,3,180,90,0,180
81436889061,2017-03-08 11:44:00,2017-03-08 11:49:00,,3,3,300,150,0,300
89443489061,2017-03-08 12:29:00,2017-03-08 12:34:00,,3,3,300,150,0,300
70697652161,2017-04-04 09:10:00,2017-04-04 09:11:00,,3,3,60,30,0,60
5955650161,2017-03-15 14:35:00,2017-03-15 14:52:00,,3,3,1020,510,0,1020
9617706161,2017-05-09 09:35:00,2017-05-09 09:41:00,,3,3,360,180,0,360
80570779061,2017-03-07 11:59:00,2017-03-07 12:02:00,,3,3,180,90,0,180
19052579061,2017-03-07 08:45:00,2017-03-07 08:50:00,,6,3,300,60,0,300
52949629061,2017-03-02 16:16:00,2017-03-02 16:22:00,,3,3,360,180,0,360
1741704161,2017-04-19 14:55:00,2017-04-19 15:13:00,,3,3,1080,540,0,1080
57811889061,2017-03-08 15:31:00,2017-03-08 15:34:00,,3,3,180,90,0,180
11383444161,2017-04-23 10:50:00,2017-04-23 11:04:00,,3,3,840,420,0,840