/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    List data exports by message, channel, or user

    Copy link

    Retrieves a list of message, channel, or user data exports.


    HTTP request

    Copy link
    GET https://api-{application_id}.sendbird.com/v3/export/{data_type}
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    data_type

    string

    Specifies the type of a data export. Acceptable values are messages, channels, users, and failed_webhooks.

    OptionalTypeDescription

    token

    string

    Specifies a page token that indicates the starting index of a chunk of results to retrieve. If not specified, the index is set as 0.

    limit

    int

    Specifies the number of data exports to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)

    ?token=&limit=3
    

    Response

    Copy link

    If successful, this action returns a list of data export resources in the response body.

    {
        "exported_data": [
            {
                "request_id": "1ed107739a77414",
                "status": "scheduled",
                "format": "csv",
                "csv_delimiter": "|",
                "timezone": "US/Pacific",
                "created_at": 1544406267000,
                "start_ts": 1544367600000,
                "end_ts": 1544453999000,
                "channel_urls": [
                    "public_chat_room_031", "public_chat_room_032"
                ],
                "sender_ids": [
                    "Tom", "Jeff", "Rommel"
                ]
            },
            {
                "request_id": "76578f9a2bfc469",
                "status": "exporting",
                "format": "csv",
                "csv_delimiter": ",",
                "timezone": "Europe/London",
                "created_at": 1539830900000,
                "start_ts": 153883800000,
                "end_ts": 1539442799000,
                "channel_urls": [
                    "public_chat_room_001", "public_chat_room_002"
                ]
            },
            {
                "request_id": "ae54def5f11043d",
                "status": "done",
                "format": "json",
                "timezone": "Asia/Seoul",
                "created_at": 1503112356286,
                "start_ts": 1544367600000,
                "end_ts": 1544453999000,
                "channel_urls": [
                    "public_chat_room_101", "public_chat_room_102"
                ],
                "file": {   // The 'file' appears only when the status is 'done'.
                    "url": "https://sendbird-us-1.s3-us-west-2.amazonaws.com/c17699fb9539453.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=decd2b8870da04168304d41c087ef373a11ac6cf2c4a4e9f1ed22f17717d837d&X-Amz-Date=20181210T014509Z&X-Amz-Credential=AKIAJMXOUSBABZBO45LA%2F20181210%2Fus-west-2%2Fs3%2Faws4_request",
                    "expires_at": 1549506234580     // 7 days from the timestamp of file creation.
                }
            }
        ],
        "next": "YdFDRsFRQ1AIRaBXX1RcE2d0FUZSUlkJFVQRHB863DAgNn8eABABBBNFX11fUlsWde53"
    }
    

    List of response properties

    Copy link
    Property nameTypeDescription

    exported_data[]

    array of objects

    The array of data export objects.

    next

    string

    The value of the token parameter to retrieve the next page in the result.

    In the case of an error, an error object is returned. A detailed list of error codes is available here.