Extract audience segments

post
Extract audience segments with config file

https://partner-api.sddan.com/api/v1/public/data/job/hash-by-segment
Create a JSON with your selected segments and size you need. You also can filter by column if your uploaded Job Storage has ones.
Request
Response
Request
Query Parameters
Authorization
required
string
Token
Response
200: OK
{
"job": {
"id": "XXXXXXXXXXX",
"partner_id": 1000,
"type": "JobHashBySegment",
"creation_timestamp": "2020-09-30T16:07:43.991934639+02:00",
"status": "DONE",
"start": "2020-09-30T16:07:48.896275563+02:00",
"end": "2020-09-30T16:08:40.5327737+02:00"
},
"result": {
"count": 0,
"download_url": "/api/v1/public/data/job/XXXXXXXXXXX/download/sirdata_job_result_XXXXXXXXXXX.json",
"bucket_name": "sirdata-partner-user-api",
"filename": "sirdata_job_result_XXXXXXXXXXX",
"downloads": null,
"dataset_id": "partner_user_api_eu",
"table_id": "job_YYYYYYYYYY",
"volume_by_segment": [
{
"segment_id": "2206",
"value": 0
},
{
"segment_id": "383",
"value": 0
}
]
},
"request": {
"start": "2020-09-28T16:07:43.990649761+02:00",
"segment_ids": "2206,383",
"hash_type": "hd_m",
"job_id_storage_reference": "XXXXXXXXXXX",
"conf": {
"job": "hash-by-segment",
"storage_id": "XXXXXXXXXXX",
"hash_type": "hd_m",
"rollback_days": 30,
"limit": 10000,
"segments": [
{
"id": "2206",
"limit": 5000
},
{
"id": "383",
"limit": 80000
}
],
"filter": null
},
"limit": null,
"filter": null
}
}

JSON body

{
"storage_id": "", // "id" from Job Storage
"hash_type": "hd_m or hd_s256", // hd_m for md5, hd_s256 for sha256
"rollbackdays": 30, // depend on the volume you need, will get older data if you increase (90 max)
"limit": 10000, // max number of hash you want to retrieve
"segments": [ // allow to define priority in selected segments, you will have the details when the job is finished
{
"id" : 2206,
"limit": 8000
},
{
"id" : 383,
"limit": 20000
},
],
"filter": [ // filter by columns you uploaded and declared in your Storage, column must exists
{
"columnname": "city",
"values": ["Paris", "Nice"]
}
]
}

Download result

Use property download_url to get result file

"download_url": "/api/v1/public/data/job/XXXXXXXXXXX/download/sirdata_job_result_XXXXXXXXXXX.json"

get
Download result

https://partner-api.sddan.com/api/v1/public/data/job/XXXXXXXXXXX/download/sirdata_job_result_XXXXXXXXXXX.json
Get path from json parameter download_url
Request
Response
Request
Headers
Authorization
required
string
Token
Response
200: OK
{"hash_value":"ea7f0941a13f72a9621d2db1db0ac31d", "segment_id": 2206}
{"hash_value":"ea91621539576cdcf40d70ecbd582e6d", "segment_id": 383}