Segment Exports
+ Entity's `status` possible values: `waiting`, `running`, `finished`, `error`, `canceled`
Section:
Group Segment Exports. Base URL:https://instance_name.meiro.io/api/.
Segment Exports [/segments/{segment_id}/exports{?limit,offset,order_by,order_dir,load_full_structure}]
- Entity's
statuspossible values:waiting,running,finished,error,canceled
List All Segment Exports [GET]
Required feature (one of):
-
Segment ACL authorization
-
foreign_segments/view
-
foreign_segments/edit
-
segments/export
-
segments/export/EXPORT_DESTINATION_ID
-
Parameters
- limit (number, optional) - Limit of the number of records returned
- offset (number, optional) - Offset for the number of records returned
- order_by (string, optional) - Ordered column name
- order_dir (string, optional) - Ordering direction
- load_full_structure (number, optional) - Full data structure return flag
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"segment_exports": [
{
"id": 100,
"user_id": 200,
"segment_id": 300,
"segment_export_destination_id": 400
"name": "export example",
"settings": {
"conditions_operation": {
"operation": "and",
"operands": [
{
"operation": "or",
"operands": [
{
"attribute_id": "attribute_1",
"condition": {
"operation": "contains",
"value": "foo"
},
"negation": false
},
{
"attribute_id": "attribute_2",
"condition": {
"operation": "equals",
"value": "bar"
},
"negation": false
}
],
"negation": false
},
{
"attribute_id": "attribute_3",
"condition": {
"operation": "contains",
"value": "bar"
},
"negation": false
}
],
"negation": false
}
},
"frontend_settings": {},
"status": "running",
"stats": {
"statuses_history": {
"waiting": "2017-01-01 15:35:00",
"running": "2017-01-01 15:35:00",
"finished": "2017-01-01 15:35:00"
}
},
"file_download_token": "1234567890abcdef",
"created": "2017-01-01 15:35:00"
}
],
"selection_settings": {
"limit": 20,
"offset": null,
"order_by": "id",
"order_dir": "ASC"
}
}Run Segment Export [POST]
Required feature (one of):
-
segments/export
-
segments/export/EXPORT_DESTINATION_ID
-
Parameters
- load_full_structure (number, optional) - Full data structure return flag
-
Attributes
- segment_export_destination_id:
400(number) - name:
example tag(string, optional)
- segment_export_destination_id:
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 201 (application/json)
{
"segment_export": {
"id": 100,
"user_id": 200,
"segment_id": 300,
"segment_export_destination_id": 400
"name": "export example",
"settings": {
"conditions_operation": {
"operation": "and",
"operands": [
{
"operation": "or",
"operands": [
{
"attribute_id": "attribute_1",
"condition": {
"operation": "contains",
"value": "foo"
},
"negation": false
},
{
"attribute_id": "attribute_2",
"condition": {
"operation": "equals",
"value": "bar"
},
"negation": false
}
],
"negation": false
},
{
"attribute_id": "attribute_3",
"condition": {
"operation": "contains",
"value": "bar"
},
"negation": false
}
],
"negation": false
}
},
"frontend_settings": {},
"status": "running",
"stats": {
"statuses_history": {
"waiting": "2017-01-01 15:35:00",
"running": "2017-01-01 15:35:00",
"finished": "2017-01-01 15:35:00"
}
},
"file_download_token": null,
"created": "2017-01-01 15:35:00"
}
}Segment Export [/segments/{segment_id}/exports/{export_id}{?load_full_structure}]
-
Entity's
statuspossible values:waiting,running,finished,error,canceled -
Parameters
- load_full_structure (number, optional) - Full data structure return flag
Retrieve a Segment Export [GET]
Required feature (one of):
-
Segment ACL authorization
-
foreign_segments/view
-
foreign_segments/edit
-
segments/export
-
segments/export/EXPORT_DESTINATION_ID
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"segment_export": {
"id": 100,
"user_id": 200,
"segment_id": 300,
"segment_export_destination_id": 400
"name": "export example",
"settings": {
"conditions_operation": {
"operation": "and",
"operands": [
{
"operation": "or",
"operands": [
{
"attribute_id": "attribute_1",
"condition": {
"operation": "contains",
"value": "foo"
},
"negation": false
},
{
"attribute_id": "attribute_2",
"condition": {
"operation": "equals",
"value": "bar"
},
"negation": false
}
],
"negation": false
},
{
"attribute_id": "attribute_3",
"condition": {
"operation": "contains",
"value": "bar"
},
"negation": false
}
],
"negation": false
}
},
"frontend_settings": {},
"status": "running",
"stats": {
"statuses_history": {
"waiting": "2017-01-01 15:35:00",
"running": "2017-01-01 15:35:00",
"finished": "2017-01-01 15:35:00"
}
},
"file_download_token": "1234567890abcdef",
"created": "2017-01-01 15:35:00"
}
}Cancel Segment Export [DELETE]
Required feature (one of):
-
Segment ACL authorization
-
foreign_segments/edit
-
segments/export
-
segments/export/EXPORT_DESTINATION_ID
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"segment_export": {
"id": 100,
"user_id": 200,
"segment_id": 300,
"segment_export_destination_id": 400
"name": "export example",
"settings": {
"conditions_operation": {
"operation": "and",
"operands": [
{
"operation": "or",
"operands": [
{
"attribute_id": "attribute_1",
"condition": {
"operation": "contains",
"value": "foo"
},
"negation": false
},
{
"attribute_id": "attribute_2",
"condition": {
"operation": "equals",
"value": "bar"
},
"negation": false
}
],
"negation": false
},
{
"attribute_id": "attribute_3",
"condition": {
"operation": "contains",
"value": "bar"
},
"negation": false
}
],
"negation": false
}
},
"frontend_settings": {},
"status": "canceled",
"stats": {
"statuses_history": {
"waiting": "2017-01-01 15:35:00",
"running": "2017-01-01 15:35:00",
"finished": "2017-01-01 15:35:00"
}
},
"created": "2017-01-01 15:35:00"
}
}Segment Export History List [/segments/{segment_id}/exports/{export_id}/history{?limit,offset,order_by,order_dir,load_full_structure}]
- Entity's
statuspossible values:waiting,running,finished,error,canceled
Retrieve a Segment Export History List [GET]
Required feature (one of):
-
Segment ACL authorization
-
foreign_segments/view
-
foreign_segments/edit
-
segments/export
-
segments/export/EXPORT_DESTINATION_ID
-
Parameters
- limit (number, optional) - Limit of the number of records returned
- offset (number, optional) - Offset for the number of records returned
- order_by (string, optional) - Ordered column name
- order_dir (string, optional) - Ordering direction
- load_full_structure (number, optional) - Full data structure return flag
-
Request
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"history_list": [
{
"id": null,
"segment_export": {
"id": 100,
"user_id": 200,
"segment_id": 300,
"segment_export_destination_id": 400
"name": "export example",
"settings": {},
"frontend_settings": {},
"status": "waiting",
"stats": null,
"created": "2017-01-01 15:35:00"
}
},
{
"segment_export": {
"id": 200,
"user_id": 200,
"segment_id": 300,
"segment_export_destination_id": 400
"name": "export example",
"settings": {},
"frontend_settings": {},
"status": "waiting",
"stats": null,
"created": "2017-01-01 15:35:00"
}
}
],
"selection_settings": {
"limit": 20,
"offset": null,
"order_by": "id",
"order_dir": "ASC"
}
}Segment Export History Item [/segments/{segment_id}/exports/{export_id}/history/{history_id}{?load_full_structure}]
- Entity's
statuspossible values:waiting,running,finished,error,canceled
Retrieve a Segment's Export History Item [GET]
Required feature (one of):
-
Segment ACL authorization
-
foreign_segments/view
-
foreign_segments/edit
-
segments/export
-
segments/export/EXPORT_DESTINATION_ID
-
Request
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"history": {
"id": "100",
"segment_export": {
"id": 200,
"user_id": 200,
"segment_id": 300,
"segment_export_destination_id": 400
"name": "export example",
"settings": {},
"frontend_settings": {},
"status": "running",
"stats": null,
"created": "2017-01-01 15:35:00"
},
"diff": {
"status": {
"from": "waiting",
"to": "running"
}
}
}
}Segment Export Logs [/segments/{segment_id}/exports/{export_id}/logs{?limit,offset,order_by,order_dir,load_full_structure}]
List All Segment Export Logs [GET]
Required feature (one of):
-
Segment ACL authorization
-
foreign_segments/view
-
foreign_segments/edit
-
segments/export
-
segments/export/EXPORT_DESTINATION_ID
-
Parameters
- limit (number, optional) - Limit of the number of records returned
- offset (number, optional) - Offset for the number of records returned
- order_by (string, optional) - Ordered column name
- order_dir (string, optional) - Ordering direction
- load_full_structure (number, optional) - Full data structure return flag
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"segment_export_logs": [
{
"id": 100,
"segment_export_id": 200,
"level": "info",
"text": "log content"
"created": "2017-01-01 15:35:00"
}
],
"selection_settings": {
"limit": 20,
"offset": null,
"order_by": "id",
"order_dir": "ASC"
}
}Segment Export Download [/segments/{segment_id}/exports/{export_id}/download]
Download Segment Export [GET]
Required feature (one of):
-
segments/export
-
segments/export/EXPORT_DESTINATION_ID
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200