Zaius Exports API
The Exports API from Zaius — 4 operation(s) for exports.
The Exports API from Zaius — 4 operation(s) for exports.
openapi: 3.0.1
info:
title: Advanced Compliance Exports API
description: Advanced
version: v3
servers:
- url: https://api.us1.odp.optimizely.com/v3
description: United States
- url: https://api.eu1.odp.optimizely.com/v3
description: Europe
- url: https://api.au1.odp.optimizely.com/v3
description: Asia-Pacific
security:
- x-api-key: []
tags:
- name: Exports
paths:
/exports:
post:
tags:
- Exports
summary: Start Data Export Job
description: Export objects and events data from Optimizely to Amazon S3.
operationId: export
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DataExportRequest'
examples:
Start Export Job (Filtered):
description: Export a filtered set of data from Optimizely to Amazon S3.
value:
format: csv
delimiter: comma
select:
object: events
fields:
- product.name
filter:
field: product.name
operator: '='
value: '%shoe%'
sorts:
- field: product.name
order: asc
Start Export Job (Unfiltered):
description: Export a full set of objects from Optimizely to Amazon S3.
value:
objects:
- products
format: csv
delimiter: comma
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ExportJobStatus'
'400':
description: Bad Request
content:
application/json:
schema:
type: string
example:
title: Bad Request
status: 400
timestamp: '2018-09-11T02:07:10.000Z'
detail:
invalids:
- field: delimiter
reason: Unrecognized delimiter. Valid options are "comma", "tab", or "pipe".
'403':
description: Forbidden
content:
application/json:
schema:
type: string
example:
title: Forbidden
status: 403
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: Insufficient privileges to access this resource.
'404':
description: Not Found
content:
application/json:
schema:
type: string
example:
title: Not Found
status: 404
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: Unable to locate field products.unknown_field.
'422':
description: Unprocessable Entity
content:
application/json:
schema:
type: string
example:
title: Unprocessable Entity
status: 422
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: 'Unable to process request. The following object(s) are currently being exported: events.'
/export-segment-members:
post:
tags:
- Exports
summary: Start Segment Members Export Job
description: Export segment membership data from Optimizely to Amazon S3.
operationId: export_1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SegmentExportRequest'
examples:
Start Segment Export Job:
description: Export segment members from Optimizely to Amazon S3.
value:
format: csv
delimiter: comma
select:
segments:
- has_email
- has_orders
fields:
- customer.zaius_id
- customer.email
- valid_time
- qualifications
maxDelay: PT1H
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ExportJobStatus'
'400':
description: Bad Request
content:
application/json:
schema:
type: string
example:
title: Bad Request
status: 400
timestamp: '2018-09-11T02:07:10.000Z'
detail:
invalids:
- field: delimiter
reason: Unrecognized delimiter. Valid options are "comma", "tab", or "pipe".
'403':
description: Forbidden
content:
application/json:
schema:
type: string
example:
title: Forbidden
status: 403
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: Insufficient privileges to access this resource.
'404':
description: Not Found
content:
application/json:
schema:
type: string
example:
title: Not Found
status: 404
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: Unable to locate field products.unknown_field.
'422':
description: Unprocessable Entity
content:
application/json:
schema:
type: string
example:
title: Unprocessable Entity
status: 422
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: 'Unable to process request. The following object(s) are currently being exported: events.'
/exports/{exportJobId}:
get:
tags:
- Exports
summary: Get Data Export Job Status
description: Fetch the status of a data export request.
operationId: getExportJobStatus
parameters:
- name: exportJobId
in: path
description: 'The export job ID to check. Example: Example: "3aab9524-5248-45f9-8102-0399872a921e".'
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ExportJobStatus'
'403':
description: Forbidden
content:
application/json:
schema:
type: string
example:
title: Forbidden
status: 403
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: Insufficient privileges to access this resource.
'404':
description: Not Found
content:
application/json:
schema:
type: string
example:
title: Not Found
status: 404
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: Unable to locate status for the export example.
/export-segment-members/{exportJobId}:
get:
tags:
- Exports
summary: Get Segment Export Job Status
description: Fetch the status of a segment export request.
operationId: getSegmentExportJobStatus
parameters:
- name: exportJobId
in: path
description: 'The export job ID to check. Example: "3aab9524-5248-45f9-8102-0399872a921e".'
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ExportJobStatus'
'403':
description: Forbidden
content:
application/json:
schema:
type: string
example:
title: Forbidden
status: 403
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: Insufficient privileges to access this resource.
'404':
description: Not Found
content:
application/json:
schema:
type: string
example:
title: Not Found
status: 404
timestamp: '2018-09-11T02:07:10.000Z'
detail:
message: Unable to locate status for the export example.
components:
schemas:
Sort:
type: object
description: Sort specification applied to each export file. A single table export may span multiple files.
example:
field: product.name
order: asc
DataExportRequest:
required:
- delimiter
- format
type: object
properties:
format:
type: string
description: The format of the export. Valid values are "csv" and "parquet".
enum:
- csv
- parquet
delimiter:
type: string
description: Defaults to "comma". Valid options are "comma", "tab", and "pipe". Not applicable for parquet exports.
enum:
- tab
- comma
- pipe
objects:
uniqueItems: true
type: array
description: The objects to be exported in full.
items:
type: string
description: The objects to be exported in full.
select:
$ref: '#/components/schemas/Select'
Select:
required:
- fields
- object
type: object
properties:
object:
type: string
description: Target object for this selection filter.
example: events
fields:
type: array
description: An array of fields to export. The array ['*'] captures all fields from select.object, but does not follow any relations.
example:
- product.name
items:
type: string
description: An array of fields to export. The array ['*'] captures all fields from select.object, but does not follow any relations.
example: '["product.name"]'
filter:
type: object
additionalProperties:
type: object
description: Refer to "Filtering" section.
example:
field: product.name
operator: '='
value: '%shoe%'
description: Refer to "Filtering" section.
example:
field: product.name
operator: '='
value: '%shoe%'
sorts:
type: array
description: Sort specification applied to each export file. A single table export may span multiple files.
example:
field: product.name
order: asc
items:
$ref: '#/components/schemas/Sort'
ExportDefinition:
required:
- format
- id
type: object
properties:
id:
type: string
example: 3aab9524-5248-45f9-8102-0399872a921e
format:
type: string
example: csv
enum:
- csv
- parquet
delimiter:
type: string
example: comma
enum:
- tab
- comma
- pipe
select:
$ref: '#/components/schemas/Select'
exportType:
type: string
example: data
objects:
uniqueItems: true
type: array
example:
- string
items:
type: string
example: '["string"]'
ExportJobStatus:
required:
- id
- path
- requestedAt
- state
type: object
properties:
id:
type: string
example: 3aab9524-5248-45f9-8102-0399872a921e
path:
type: string
example: s3://zaius-outgoing/kIFB_X1VG2gf6caBn8LHtg/data-exports/3aab9524-5248-45f9-8102-0399872a921e
state:
type: string
example: pending
enum:
- pending
- running
- completed
- completed_with_errors
exportRowCount:
type: integer
format: int64
example: 14
exportType:
type: string
example: data
requestedAt:
type: string
format: date-time
example: '2018-09-11T02:07:10.000Z'
startedAt:
type: string
format: date-time
endedAt:
type: string
format: date-time
presignedUrls:
type: array
items:
type: string
description: Presigned URLs to download files without using your Key ID or Secret Access Key. These URLs are valid for an hour and are only generated for Get Segment Export Job Status.
example: https://s3.amazonaws.com/abc123/data-exports/abc123/has_email_0_0_0.csv.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20250403T162222Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=abc123%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=abc123
active:
type: boolean
format:
type: string
enum:
- csv
- parquet
running:
type: boolean
terminated:
type: boolean
delimiter:
type: string
enum:
- tab
- comma
- pipe
routeBase:
type: string
trackerId:
type: string
complete:
type: boolean
pending:
type: boolean
childErrors:
type: array
items:
type: string
detail:
$ref: '#/components/schemas/ExportDefinition'
SegmentSelect:
required:
- fields
- segments
type: object
properties:
segments:
uniqueItems: true
type: array
description: 'Array of segments to export. Examples: [my_rts_segment, rts:my_rts_segment2, classic:public_segment].'
items:
type: string
description: 'Array of segments to export. Examples: [my_rts_segment, rts:my_rts_segment2, classic:public_segment].'
fields:
type: array
description: Array of fields to export. The array ['*'] captures all fields from select.object, but does not follow any relations.
example:
- customer.email, product.name, qualifications
items:
type: string
description: Array of fields to export. The array ['*'] captures all fields from select.object, but does not follow any relations.
example: '["customer.email, product.name, qualifications"]'
maxDelay:
type: string
description: 'Maximum acceptable delay for segment data freshness in ISO 8601 duration format. Default: PT1H (1 hour). Must be at least an hour.'
example: PT1H
description: Specifies the segments to export and the fields to be included.
SegmentExportRequest:
required:
- delimiter
- format
type: object
properties:
format:
type: string
description: The format of the segment export. Valid values are "csv" and "parquet".
enum:
- csv
- parquet
delimiter:
type: string
description: Defaults to "comma". Valid options are "comma", "tab", and "pipe". Not applicable for parquet exports.
enum:
- tab
- comma
- pipe
select:
$ref: '#/components/schemas/SegmentSelect'
securitySchemes:
x-api-key:
type: apiKey
name: x-api-key
in: header
x-readme:
explorer-enabled: true
proxy-enabled: true