> ## Documentation Index > Fetch the complete documentation index at: https://learn.servitly.com/llms.txt > Use this file to discover all available pages before exploring further. # Schedule a new data-export > Note that, depending on the amount of data to export, a data-export may require several minutes to complete.
Periodically check the data-export status by calling the get details method issuing the data-export identifier.
Limitations:
- Only one bulk export can be scheduled at a time.
- Only the archives of exports completed during the last 30 days are kept for further downloads.

Required permissions: EXPORT_DATA. ## OpenAPI ````json POST /data/dataExports { "openapi": "3.1.0", "info": { "title": "Servitly DPS API", "version": "1.0.0" }, "servers": [ { "url": "https://api.servitly-sandbox.com", "description": "[AWS SANDBOX]" }, { "url": "https://api.servitly.com", "description": "[AWS PRODUCTION Ireland]" }, { "url": "https://api-ap.servitly.com", "description": "[AWS Hong Kong]" }, { "url": "https://azapi.servitly-dev.com", "description": "[AZURE DEV Frankfurt]" }, { "url": "https://azapi.servitly-staging.com", "description": "[AZURE STAGING Frankfurt]" }, { "url": "https://azapi.servitly.com", "description": "[AZURE PRODUCTION Frankfurt]" } ], "security": [ { "bearerAuth": [] } ], "tags": [ { "name": "ACTIONS" }, { "name": "ALERTS" }, { "name": "API GATEWAY" }, { "name": "AUTHENTICATION" }, { "name": "AUTHORIZATIONS" }, { "name": "CUSTOMERS" }, { "name": "DATA IMPORT / EXPORT" }, { "name": "EVENTS" }, { "name": "LOCATIONS" }, { "name": "MAINTENANCE" }, { "name": "MAPPING" }, { "name": "METRIC DATA" }, { "name": "MOBILE APP" }, { "name": "ORGANIZATION" }, { "name": "PARTNERS" }, { "name": "PRODUCT MODELS" }, { "name": "SPARE PARTS" }, { "name": "STATISTICS" }, { "name": "STORE ORDERS" }, { "name": "SUBSCRIPTIONS" }, { "name": "SUBSCRIPTIONS (OLD)" }, { "name": "THING CONTROL" }, { "name": "THING DEFINITIONS" }, { "name": "THING MANAGEMENT" }, { "name": "THINGS" }, { "name": "TICKETS" }, { "name": "USER TYPES" }, { "name": "USERS" }, { "name": "WORK SESSIONS" } ], "paths": { "/data/dataExports": { "post": { "summary": "Schedule a new data-export", "description": "Note that, depending on the amount of data to export, a data-export may require several minutes to complete.
Periodically check the data-export status by calling the get details method issuing the data-export identifier.
Limitations:
- Only one bulk export can be scheduled at a time.
- Only the archives of exports completed during the last 30 days are kept for further downloads.

Required permissions: EXPORT_DATA.", "tags": [ "DATA IMPORT / EXPORT" ], "parameters": [ { "$ref": "#/components/parameters/tenantNameHeader" } ], "requestBody": { "description": "The details of the scheduled data-export.", "required": "true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataExport" } } } }, "responses": { "201": { "description": "Successfully created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataExport" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/NotAuthenticated" }, "403": { "$ref": "#/components/responses/NotAuthorized" }, "429": { "$ref": "#/components/responses/ApiLimit" }, "500": { "$ref": "#/components/responses/IntError" } } } } }, "components": { "parameters": { "tenantNameHeader": { "in": "header", "name": "X-Servitly-Tenant", "required": "true", "schema": { "type": "string", "example": "{{tenantName}}" }, "description": "The name of the tenant (e.g. acme)." } }, "schemas": { "DataExport": { "type": "object", "description": "The bean providing data-export details.", "properties": { "id": { "type": "string", "description": "The data-export unique identifier.", "readOnly": "true" }, "name": { "type": "string", "description": "The data-export friendly name.", "example": "AllTemperatures_march_20200" }, "dateTime": { "type": "integer", "format": "int64", "description": "The timestamp UTC the data-export has been scheduled.", "example": "1578438000000" }, "thingFileName": { "type": "string", "description": "The file name mask (without .CSV extension) used for the generated CSV files.", "example": "${thing.serialNumber}_${thingDefinition.name}" }, "state": { "type": "string", "enum": [ "PENDING", "COMPLETED", "ERROR" ], "description": "The data-export status.", "readOnly": "true" }, "customerId": { "type": "string", "description": "The identifier of the customer whose data is to be exported." }, "locationId": { "type": "string", "description": "The identifier of the location whose data is to be exported." }, "thingId": { "type": "string", "description": "The identifier of the thing whose data is to be exported." }, "all": { "type": "boolean", "description": "The flag that indicates whether to export all metrics." }, "metricSetIds": { "description": "The list of metric set ids to be exported.", "type": "array", "items": { "type": "string" } }, "qualifiedMetricIds": { "description": "The array of metric identifiers to export, along with their thing-definition or model and part ids.", "type": "array", "items": { "type": "object", "properties": { "metricId": { "type": "string", "description": "The metric identifier." }, "productModelId": { "type": "string", "description": "The product model identifier." }, "productModelPartId": { "type": "string", "description": "The product model part identifier." }, "thingDefinitionId": { "type": "string", "description": "The thing-definition identifier in alternative to the product model and part." } } } }, "startTimestamp": { "type": "integer", "format": "int64", "description": "The start timestamp UTC related to the exported period of data.", "example": "1578438000000" }, "endTimestamp": { "type": "integer", "format": "int64", "description": "The end timestamp UTC related to the exported period of data.", "example": "1578438000000" }, "includeUnit": { "type": "boolean", "description": "The flag that indicates whether to include the unit of measurement in CSV header names (Weight [kg])." }, "timestampFormat": { "type": "string", "enum": [ "ISO_8601", "EPOCH_MILLIS" ], "description": "The format that the timestamp must have in the result CSV file." }, "url": { "type": "string", "description": "The data-export generated archive URL (available only retrieving the data-export details).", "readOnly": "true" } } } }, "responses": { "BadRequest": { "description": "Request data not valid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Bad request" } } } } } }, "NotAuthenticated": { "description": "User not authenticated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "User not authenticated" } } } } } }, "NotAuthorized": { "description": "User not authorized.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "User not authorized" } } } } } }, "ApiLimit": { "description": "API call rate limit exceeded.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "API call rate limit exceeded" } } } } } }, "IntError": { "description": "Internal server error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Internal Server Error" } } } } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer" } } } } ````