Uploading profiles to a file
Description
Retrieves information about all database or segment profiles.
To get the result, you need to check the task status and download the resulting file.
Step 1. Creating profiles export task
Request URL
Method: POST
https://example.com/api/v1.1/profiles/get_all
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| task_id | string | "task_b2f9fk6a-2479-4a63-b592-f15d4e3b69c5" | Yes | Export task ID |
Request example
- JSON
- XML
{
"task_id": "ecd371a8-2229-48bb-bc3e-de7d39cd3051"
}
<xml>
<task_id>ecd371a8-2229-48bb-bc3e-de7d39cd3051</task_id>
</xml>
Response example
- JSON
- XML
{
"data": {
"status": "completed",
"progress": 100,
"result": {
"errors": [],
"source_id": 1,
"total": 1343,
"type": "database",
"urls": [
"/api/download/data/4cf435e8-9921-4666-a39e-03ecbf57527e/1_database_export.csv"
]
}
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<progress>100</progress>
<result>
<errors/>
<source_id>1</source_id>
<total>1343</total>
<type>database</type>
<urls>/api/download/data/4cf435e8-9921-4666-a39e-03ecbf57527e/1_database_export.csv</urls>
</result>
<status>completed</status>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
| Parameter | Type | Description |
|---|---|---|
| status | string | Task status |
| progress | int | Task progress |
| total | int | Number of profiles |
| urls | array | Export file link |
| error | int | Error code |
| error_text | string | Error text |
Step 3. Downloading result file
The link to download the file looks like following:
https://example.com/api/download/6b248de2-33b9-4715-9720-5f7e23f4a296/1_database_export.csv, where:
https://example.com- platform domainapi/download/6b248de2-33b9-4715-9720-5f7e23f4a296/1_database_export.csv- link from theurlsparameter of the past request
To download a file with profiles, send a GET request to the specified link with the authorization header Authorization: Bearer <token>.