MeiroDocs

Segment Export Destinations

Required feature (one of):

Section: Group Segment Export Destinations. Base URL: https://instance_name.meiro.io/api/.

Segment Export Destinations [/segments/export/destinations{?limit,offset,order_by,order_dir,load_full_structure}]

List All Segments Export Destinations [GET]

Required feature (one of):

  • data/sources_and_destinations

  • settings/sources_and_destinations

  • segments/export

  • 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_destinations": [
        {
            "id": 100,
            "user_id": 200,
            "name": "example segment",
            "description": "segment description",
            "settings": {
                "mandatory_attributes_operator": "and",
                "mi_workspace_variables": [
                    {
                        "name": "port",
                        "title": "Port",
                        "values": {
                            "port_home": "1234"
                        },
                        "required": true,
                        "can_be_empty": false,
                        "input_mode": "value_from_list"
                    }
                ]
            },
            "frontend_settings": {},
            "attribute_ids": ["id1", "id2"],
            "disabled": 0,
            "deleted": 0,
            "icon": "",
            "mandatory_attribute_ids": ["3"],
            "created": "2017-01-01 15:35:00",
            "mi_workspace_id": 300,
            "last_export": "2018-01-01 15:00:00"
        },
        {
            "id": 3,
            "user_id": 200,
            "name": "Push notifications destination",
            "description": "",
            "settings": {
                "mandatory_attributes_operator": "and",
                "registration_token_attribute_id": "attribute_a"
            },
            "frontend_settings": {},
            "attribute_ids": [],
            "disabled": 0,
            "deleted": 0,
            "icon": "",
            "mandatory_attribute_ids": ["3"],
            "created": "2017-01-01 15:35:00",
            "mi_workspace_id": None,
            "last_export": "2018-01-01 15:00:00"
        }
    ],
    "selection_settings": {
        "limit": 20,
        "offset": null,
        "order_by": "id",
        "order_dir": "ASC"
    }
}

Segment Export Destination [/segments/export/destinations/{destination_id}{?load_full_structure}]

  • Parameters
    • load_full_structure (number, optional) - Full data structure return flag

Retrieve a Segment Export Destination [GET]

Required feature (one of):

  • data/sources_and_destinations

  • settings/sources_and_destinations

  • segments/export

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "segment_export_destination": {
        "id": 100,
        "user_id": 200,
        "name": "example segment",
        "description": "segment description",
        "settings": {
            "mandatory_attributes_operator": "and",
            "mi_workspace_variables": [
                {
                    "name": "port",
                    "title": "Port",
                    "values": {
                        "port_home": "1234"
                    },
                    "required": true,
                    "can_be_empty": false,
                    "input_mode": "value_from_list"
                }
            ]
        },
        "frontend_settings": {},
        "attribute_ids": ["id1", "id2"],
        "disabled": 0,
        "icon": "",
        "mandatory_attribute_ids": ["3"],
        "created": "2017-01-01 15:35:00",
        "mi_workspace_id": 300,
        "last_export": "2018-01-01 15:00:00",
        "data_load_start_time": null,
        "data_load_end_time": null
    }
}

Modify a Segment Export Destination [PATCH]

Required feature: settings/sources_and_destinations

  • Attributes

    • name: example segment (string) - optional
    • settings: {} (string) - optional (json)
    • frontend_settings: {} (string) - optional (json)
    • attribute_ids: ["id1", "id2"] (string) - optional (json)
    • description: segment description (string) - optional
    • disabled: 0 (number) - optional
    • icon: destination.png (string) - optional
    • mandatory_attribute_ids: ["3"] (string) - optional (json)
    • mi_workspace_id: 300 (number) - optional
  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "segment_export_destination": {
        "id": 100,
        "user_id": 200,
        "name": "example segment",
        "description": "segment description",
        "settings": {
            "mandatory_attributes_operator": "and",
            "mi_workspace_variables": [
                {
                    "name": "port",
                    "title": "Port",
                    "values": {
                        "port_home": "1234"
                    },
                    "required": true,
                    "can_be_empty": false,
                    "input_mode": "value_from_list"
                }
            ]
        },
        "frontend_settings": {},
        "attribute_ids": ["id1", "id2"],
        "disabled": 0,
        "deleted": 0,
        "icon": "",
        "mandatory_attribute_ids": ["3"],
        "created": "2017-01-01 15:35:00",
        "customer_entities_count": 1200,
        "mi_workspace_id": 300
    }
}

Delete a Segment Export Destination [DELETE]

Required feature: settings/sources_and_destinations

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "message": "OK"
}

Segment Export Destination's Last Running Export [/segments/export/destinations/{destination_id}/last_running_export{?load_full_structure}]

  • Entity's status possible values: waiting, running, finished, error, canceled

  • Parameters

    • load_full_structure (number, optional) - Full data structure return flag

Retrieve a Segment Export Destination's Last Running Export [GET]

Required feature: data/sources_and_destinations

  • 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"
                                }
                            },
                            {
                                "attribute_id": "attribute_2",
                                "condition": {
                                    "operation": "equals",
                                    "value": "bar"
                                }
                            }
                        ]
                    },
                    {
                        "attribute_id": "attribute_3",
                        "condition": {
                            "operation": "contains",
                            "value": "bar"
                        }
                    }
                ]
            }
        },
        "frontend_settings": {},
        "status": "running",
        "stats": null,
        "file_download_token": "1234567890abcdef",
        "created": "2017-01-01 15:35:00"
    }
}

Trashed Segments Export Destinations [/segments/export/destinations/trash{?limit,offset,searched_text}]

List All Trashed Segments Export Destinations [GET]

  • Parameters

    • limit (number, optional) - Limit of the number of records returned
    • offset (number, optional) - Offset for the number of records returned
    • searched_text (string, optional) - Searched items' name
  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "trashed_segments_export_destinations": [
        {
            "id": 100,
            "user_id": 200,
            "name": "example segment",
            "description": "segment description",
            "settings": {},
            "frontend_settings": {},
            "attribute_ids": ["id1", "id2"],
            "disabled": 0,
            "deleted": 1,
            "icon": "",
            "mandatory_attribute_ids": ["3"],
            "created": "2017-01-01 15:35:00",
            "mi_workspace_id": 300
        }
    ],
    "selection_settings": {
        "limit": 20,
        "offset": null,
        "searched_text": "example"
    }
}

Trashed Segment Export Destination [/segments/export/destinations/trash/{destination_id}]

Restore a Trashed Segment Export Destination [PATCH]

Required feature: settings/sources_and_destinations

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "segment_export_destination": {
        "id": 100,
        "user_id": 200,
        "name": "example segment",
        "description": "segment description",
        "settings": {},
        "frontend_settings": {},
        "attribute_ids": ["id1", "id2"],
        "disabled": 0,
        "deleted": 0,
        "icon": "",
        "mandatory_attribute_ids": ["3"],
        "created": "2017-01-01 15:35:00",
        "mi_workspace_id": 300
    }
}

On this page