Additional Data from a Process via API in Trackline
Export additional data from a process in Trackline via queries
How can I query additional data from a process via API in Trackline?
Trackline is a functionality of the Code Contract platform that allows automation of information collection from start to finish, without changing the way you work and without the need for manual records.
To integrate Trackline and export additional data from a process, queries must be made through the API (Application Programming Interface). Below are the steps to follow.
Step 1: Obtain the authentication token
To obtain a JWT token to include in subsequent queries, a POST request must be sent to the /login endpoint with the username and password.
Request example
POST /login HTTP/1.1
Host: api.codecontractplattform.com
Content-Type: application/json
{
"email": "myusername",
"password": "mypassword"
}
Response example
HTTP/1.1 200 OK
Content-Type: application/json
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmcmV..."
}
This token must be included in the authorization header (Authorization: Bearer {token}) in subsequent queries.
Step 2: Query additional data
Once authenticated, you can make queries to the API to retrieve data and attachments.
https://api.codecontractplattform.com/api/
Step 3: Query additional data from a process
Query additional data associated with a specific process using process_id or process_name:
GET /track-line/ext/track-path/metadata?process_id=xxx
GET /track-line/ext/track-path/metadata?process_name=xxx