{ "swagger": "2.0", "info": { "description": "The Bulk Data Insertion API (BDIA) endpoint allows clients to send bulk hit/event data into Analytics. \n\n Note: Adobe may add optional request and response members (name/value pairs) to existing API objects at any time and without notice or changes in versioning. Adobe recommends that you refer to the API documentation of any third-party tool you integrate with our APIs so that such additions are ignored in processing if not understood. If implemented properly, such additions are non-breaking changes for your implementation. Adobe will not remove parameters or add required parameters without first providing standard notification through release notes.", "version": "1.0", "title": "Bulk Data Insertion API (BDIA)" }, "host": "analytics.adobe.io", "basePath": "/api", "tags": [ { "name": "Events" } ], "parameters": { "authorization": { "name": "Authorization", "in": "header", "description": "The access token copied from your AA API client integration, prefixed with \"Bearer \".", "required": true, "schema": { "type": "string" } }, "x-api-key": { "name": "x-api-key", "in": "header", "description": "The API key copied from your AA API client integration. For more information on how to obtain this value, see [Getting started with the CJA API](https://developer.adobe.com/cja-apis/docs/getting-started/).", "required": true, "schema": { "type": "string" } } }, "schemes": [ "https" ], "paths": { "/{globalCompanyId}/bulk_data_insertion/events": { "post": { "tags": [ "Events" ], "summary": "Upload file for processing", "description": "Upload a batch file to Analytics for processing. Uploaded files must:\n * Be 100 MB or less compressed (using gzip)\n* Follow the CSV formatting rules and include the required fields as specified in the documentation", "operationId": "filePost", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "parameters": [ { "name": "globalCompanyId", "in": "path", "description": "The Global Company ID for the Adobe Analytics organization", "required": true, "type": "string" }, { "$ref": "#/parameters/authorization" }, { "$ref": "#/parameters/x-api-key" }, { "name": "x-adobe-vgid", "in": "header", "description": "Visitor Group ID. A visitor group represents a bucketed group of visitor IDs that are separate from any other visitor group set. The Group ID is a string of any valid value, but must be consistent across files. See [Vistior groups] (https://developer.adobe.com/analytics-apis/docs/2.0/guides/endpoints/bulk-data-insertion/visitor-groups/) for more information.", "required": true, "type": "string" }, { "name": "file", "in": "formData", "description": "Gzip compressed CSV file sent with request", "required": true, "type": "file" }, { "name": "debug", "in": "query", "description": "Store debug information for the first 10 hits of the file", "required": false, "type": "boolean", "default": false } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UploadedFileInfo" } }, "400": { "description": "Request Error", "schema": { "$ref": "#/definitions/ApiError" } }, "401": { "description": "Unauthorized Access", "schema": { "$ref": "#/definitions/ApiUnauthorizedError" } } } } }, "/{globalCompanyId}/bulk_data_insertion/events/validate": { "post": { "tags": [ "Events" ], "summary": "Upload file for validation", "description": "Upload batch file for Analytics validation. This file is not stored on the server or processed into Analytics. Validation is only for testing file format.", "operationId": "fileValidatePut", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "parameters": [ { "name": "globalCompanyId", "in": "path", "description": "The Global Company ID for the Adobe Analytics organization", "required": true, "type": "string" }, { "$ref": "#/parameters/authorization" }, { "$ref": "#/parameters/x-api-key" }, { "name": "file", "in": "formData", "description": "Gzip compressed CSV file sent with request", "required": true, "type": "file" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UploadedFileInfo" } }, "400": { "description": "Request Error", "schema": { "$ref": "#/definitions/ApiError" } }, "401": { "description": "Unauthorized Access", "schema": { "$ref": "#/definitions/ApiUnauthorizedError" } } } } } }, "definitions": { "ApiError": { "type": "object", "properties": { "error": { "type": "string", "example": "Request is missing required header 'x-adobe-vgid'", "description": "General request error is encountered" } } }, "ApiSuccess": { "type": "object", "properties": { "success": { "type": "string" }, "error": { "type": "string", "description": "Response if result is success" } } }, "ApiUnauthorizedError": { "type": "object", "properties": { "error": { "type": "string", "example": "Invalid token (1)", "description": "Error during authentication" } } }, "FileID": { "type": "object", "properties": { "file_id": { "type": "string" } } }, "UploadedFileInfo": { "type": "object", "properties": { "file_id": { "type": "string", "example": "9c99f999-fca9-999c-9c99-b99aaec99e99", "description": "The file ID as a GUID" }, "visitor_group_id": { "type": "string", "example": "myvisitorgroup1", "description": "The visitor group of the file" }, "size": { "type": "integer", "format": "int64", "example": 355600, "description": "The size of the compressed file in bytes" }, "received_date": { "type": "integer", "format": "int64", "example": 1506999999, "description": "The date the file was uploaded in unix epoch time." }, "processing_start_date": { "type": "integer", "format": "int64", "example": 1506999999, "description": "The starting date for processing, in unix epoch time." }, "processing_end_date": { "type": "integer", "format": "int64", "example": 1506999999, "description": "The date all hits were submitted for Analytics, in unix epoch time." }, "file_reader_complete_date": { "type": "integer", "format": "int64", "example": 1506999999, "description": "The date the file was completely read, but the hits not yet submitted, in unix epoch time." }, "rows": { "type": "integer", "format": "int64", "example": 10000, "description": "The number of rows in the file" }, "invalid_rows": { "type": "integer", "format": "int64", "example": 42, "description": "The number of rows not submitted to analytics for being invalid" }, "upload_name": { "type": "string", "example": "myfile1.gz", "description": "The file name as it was uploaded" }, "status": { "type": "string", "description": "The status of the file" }, "status_code": { "type": "string", "example": "UPLOADED", "description": "The status of the file as a short name", "enum": [ "REJECTED", "UPLOADED", "PROCESSING", "COMPLETE", "ERROR" ] }, "processing_log": { "type": "string", "description": "A log of errors produced while processing the file" }, "error": { "type": "string", "example": "File not in GZIP format", "description": "An error message for unsuccessful requests" }, "success": { "type": "string", "example": "File is valid", "description": "A success message for validation requests" } } } } }