---
title: "Validate transformation"
method: POST
path: "/_api/transformations/validate"
tags: ["Connections"]
---

# Validate transformation

`POST /_api/transformations/validate`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/transformations/validate/post.ts> (a function with typed inputs; its response is checked against the schema)

Validate the provided transformation query and the parameters.

## Request body

- object
  - `collection` string: Name of the GDN collection.
  - `type` string: Connection type (source or target).
  - `query` string: Transformation query.
  - `inputSchema` ConnectorSchema: Model to encapsulate properties of a schema from a connector.
    - `name` string: Name of the schema.
    - `attributes` SchemaAttribute[]: Attributes of the schema.
      - `name` string: Name of the attribute.
      - `type` string: Type of the attribute.

## Response `200`

Successfully validated the transformation

- TransformationValidationResponse
  - `error` boolean, required
  - `code` integer
  - `reason` string: If invalid, reason for marking resource as invalid.
  - `outputSchema` ConnectorSchema: Model to encapsulate properties of a schema from a connector.
    - `name` string: Name of the schema.
    - `attributes` SchemaAttribute[]: Attributes of the schema.
      - `name` string: Name of the attribute.
      - `type` string: Type of the attribute.
  - `transformation` string: Funtional stream worker created to execute the query provided in the input.
  - `transformationName` string: Name of the stream worker for the transformation. This stream worker is created as a system stream worker.
  - `temporaryCollection` string: Name of the temporary collection to be used with the transformation. This collection is created as a system collection.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed to authenticate the request.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
