openapi: 3.2.0 info: title: Data Prep Functions API description: "Data Prep allows data engineers to map, transform, and validate data to and from Experience Data Model (XDM). Use the Data Prep API to programmatically create mapping sets and functions, and transform your data between source and destination schemas.\n- Related documentation:\n - [Data Prep documentation](https://experienceleague.adobe.com/docs/experience-platform/data-prep/home.html)\n\n- **API paths**:\n - Platform Gateway URL: https://platform.adobe.io/\n - Base path for this API: /data/foundation/conversation\n - Example of a complete path: https://platform.adobe.io/data/foundation/conversion/languages/el/functions\n\n- **Required headers**:\n - All calls require the headers `Authorization`, `x-gw-ims-org-id`, and `x-api-key`. For more information on how to obtain these values, see the [authentication tutorial](https://www.adobe.com/go/platform-api-authentication-en).\n - All resources in Experience Platform are isolated to specific virtual sandboxes. All requests to Platform APIs require the header `x-sandbox-name` whose value is the all-lowercase name of the sandbox the operation will take place in (for example, \"prod\"). See the [sandboxes overview](https://adobe.com/go/sandbox-overview-en) for more information.\n - All requests with a payload in the request body (such as POST, PUT, and PATCH calls) must include the `Content-Type` header with a value of `application/json`.\n\n- **API error handling**:\n - Refer to the Experience Platform API troubleshooting guide for [FAQs](https://experienceleague.adobe.com/docs/experience-platform/landing/troubleshooting.html#faq), [API status codes](https://experienceleague.adobe.com/docs/experience-platform/landing/troubleshooting.html#api-status-codes), and [request header errors](https://experienceleague.adobe.com/docs/experience-platform/landing/troubleshooting.html#request-header-errors)." version: '1.0' servers: - url: //{environment}.adobe.io/data/foundation/conversion variables: environment: default: platform enum: - platform - platform-stage tags: - name: Functions description: Mapping-set functions allow you to transform your data between source and destination schemas. You can use these functions to validate your expressions and get a list of all the available mapping-set functions and operations. paths: /languages/el/validate: post: tags: - Functions summary: Validate an expression operationId: validateExpression parameters: - name: Authorization in: header description: The access token which can be copied from your Experience Platform integration, prefixed with "Bearer ". For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: Content-Type in: header description: The type of content being sent in the body of the request. This value generally is `application/json`. required: true schema: type: string - name: x-api-key in: header description: The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-gw-ims-org-id in: header description: The IMS Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-sandbox-name in: header description: All resources in Experience Platform are isolated to specific virtual sandboxes. Requests to Platform APIs require a header that specifies the name of the sandbox in which the operation will take place. See the [sandboxes overview](https://adobe.com/go/sandbox-overview-en) for more information. required: true schema: type: string requestBody: description: The expression you are validating. content: application/json: schema: $ref: '#/components/schemas/ValidationRequest' required: true responses: '200': description: A successful response returns the validation status of the expression. x-summary: Validation status returned content: application/json: schema: type: boolean example: false '400': description: An invalid expression was posted. x-summary: Invalid expression error content: {} '401': description: The request was unauthorized. Please provide a valid authorization header and try again. x-summary: Unauthorized request content: {} '500': description: An internal server error has occurred. x-summary: Internal server error content: {} '503': description: The service is unavailable. x-summary: Service unavailable content: {} deprecated: false x-codegen-request-body-name: body /languages/el/functions: get: tags: - Functions summary: List the available mapping set functions operationId: listMappingSetFunctions parameters: - name: Authorization in: header description: The access token which can be copied from your Experience Platform integration, prefixed with "Bearer ". For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-api-key in: header description: The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-gw-ims-org-id in: header description: The IMS Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-sandbox-name in: header description: All resources in Experience Platform are isolated to specific virtual sandboxes. Requests to Platform APIs require a header that specifies the name of the sandbox in which the operation will take place. See the [sandboxes overview](https://adobe.com/go/sandbox-overview-en) for more information. required: true schema: type: string responses: '200': description: A successful response returns a list of all the available mapping-set functions. **Note:** The following response has been truncated for space. x-summary: List of mapping-set functions retrieved content: application/json: schema: type: array items: type: object properties: {} example: - category: Date / Time function: date description: Function that converts date string into a ZonedDateTime object. syntax: ZonedDateTime date(String, String, ZonedDateTime) returns: Returns the date object that is formatted in given format or a default date if the expression evaluates to a null date. returnType: java.time.ZonedDateTime example: '' result: '' params: [] since: 1 - category: Hierarchies - Arrays function: first description: Function to retrieve the first element of the given array. syntax: T first(T...) returns: The first element or null if the array is null or empty. returnType: java.lang.Object example: first("1", "2", "3") result: '"1"' params: - name: values description: Zero or more arguments type: object dataType: '[Ljava.lang.Object;' position: 1 since: 1 '400': description: An invalid request was posted. x-summary: Invalid request error content: {} '401': description: The request was unauthorized. Please provide a valid authorization header and try again. x-summary: Unauthorized access content: {} '500': description: An internal server error has occurred. x-summary: Internal server error content: {} '503': description: The service is unavailable. x-summary: Service unavailable content: {} deprecated: false /languages/el/operators: get: tags: - Functions summary: List the available mapping set operators operationId: listMappingSetOperators parameters: - name: Authorization in: header description: The access token which can be copied from your Experience Platform integration, prefixed with "Bearer ". For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-api-key in: header description: The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-gw-ims-org-id in: header description: The IMS Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the [authentication tutorial](http://www.adobe.com/go/platform-api-authentication-en). required: true schema: type: string - name: x-sandbox-name in: header description: All resources in Experience Platform are isolated to specific virtual sandboxes. Requests to Platform APIs require a header that specifies the name of the sandbox in which the operation will take place. See the [sandboxes overview](https://adobe.com/go/sandbox-overview-en) for more information. required: true schema: type: string responses: '200': description: A successful response returns a list of all the valid operators. **Note:** The following response has been truncated for space. x-summary: List of valid operators retrieved content: application/json: schema: type: array items: type: object properties: {} example: - operatorSymbol: + methodName: add numberOfOperands: 2 description: Simple arithmetic addition example: 1 + 2 - operatorSymbol: / methodName: divide numberOfOperands: 2 description: Simple arithmetic division example: 1 / 2 - operatorSymbol: '~' methodName: complement numberOfOperands: 1 description: The usual ~ operator is used, e.g., ~33, ~0010 0001 = 1101 1110 = -34. example: ~44 - operatorSymbol: '-' methodName: negate numberOfOperands: 1 description: The unary - operator is used. For example, -12 example: '-12' - operatorSymbol: '!' methodName: not numberOfOperands: 1 description: The usual ! operator can be used as well as the word not, e.g., !cond1 and not cond1 are equivalent example: '!cond1' '400': description: An invalid request was posted. x-summary: Invalid request error content: {} '401': description: The request was unauthorized. Please provide a valid authorization header and try again. x-summary: Unauthorized access content: {} '500': description: An internal server error has occurred. x-summary: Internal server error content: {} '503': description: The service is unavailable. x-summary: Service unavailable content: {} deprecated: false components: schemas: ValidationRequest: title: ValidationRequest type: object properties: expression: type: string mappingSetId: type: string sampleData: type: string sampleDataType: type: string example: expression: expression: concat("Hi", ",", "there", "!") x-original-swagger-version: '2.0'