Event-dump

This asynchronous method initiates the preparation of data dump in CSV format. The number of dump files created or stored is limited to 10; to order more files, you have to delete one of the previous ones or wait until they will be deleted automatically. A newly created dump file is kept for 8 hours. If the request period is more than a day or there are too many events then several files will be generated and each file will contain no more than 100,000 events. File contains columns with the following information - 'event_time', 'job_id', 'from_email', 'email', 'status', 'delivery_status', 'metadata', 'destination_response', 'user_agent', 'url', 'ip', 'tags' and 'project_id' (for accounts with projects enabled). You can change the fields and include 'subject' field using 'dump_fileds' parameter.

post/event-dump/create.json

Request

  • Base URL: https://api.unione.io/en/transactional/api/v1
  • URL: https://api.unione.io/en/transactional/api/v1/event-dump/create.json
  • Auth: API key in header X-API-KEY

Request body

start_timestring utc-date-time required

Date and time in YYYY-MM-DD hh:mm:ss format, specifying period start time. Data is stored for up to 32 days, depending on your tariff.

end_timestring utc-date-time

Date and time in YYYY-MM-DD hh:mm:ss format, specifying period end time (non-inclusive).

limitinteger

Maximum number of events returned (default is 50). If this value is over 100 000, several files will be created, each having 100 000 events maximum.

all_projectsboolean

For accounts with projects enabled, the value all_projects=true allows to fetch data for all existing projects.

dump_fieldsstring[]

An array of strings containing the names of columns you need in your report, in your preferred order. If the 'dump_fields' array is missing or empty, a default field list and order will be applied. Allowed values, in their default order, are - 'project_id', 'event_time', 'job_id', 'from_email', 'email', 'status', 'delivery_status', 'metadata', 'destination_response', 'user_agent', 'url', 'ip', 'tags'. For maximum security, the 'subject' field is not included by default, but you can add it by explicitly including in the 'dump_fields' array.

aggregatestring

Allows you to obtain aggregated statistics for a given time period. The two allowed values are:<ul><li>day_status - fetch aggregated statistics (the filter value must be missing or empty, as filters are not allowed with this option); <li>an empty string - used by default, event_dump/create works as if the aggregate parameter is omitted.

delimiterstring

Field delimiter, can be set to either ',' or ';', defaults to ','.

formatstring

File format, either “csv” (default) or “csv_gzip”.

Example request

{
  "start_time": "2022-07-20 00:00:00",
  "end_time": "2022-07-21 00:00:00",
  "limit": 50,
  "filter": {
    "job_id": "1ZymBc-00041N-9X",
    "email": "david@example.org",
    "email_from": "sender@example.com",
    "domain": "example.org",
    "campaign_id": "c77f4f4e-3561-49f7-9f07-c35be01b4f43"
  },
  "dump_fields": [
    "string1"
  ],
  "aggregate": "day_status",
  "delimiter": ";",
  "format": "csv"
}

Response

Method call has succeeded.

status'success' required

"success" string

dump_idstring required

Dump identifier, used to call the event-dump/get method.

Changes

No recorded changes to this operation across all 1 revision of this API.