---
title: "Validate a connection"
method: POST
path: "/_fabric/{fabric}/_api/connections/validate"
tags: ["Connections"]
---

# Validate a connection

`POST /_fabric/{fabric}/_api/connections/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/_fabric/:fabric/_api/connections/validate/post.ts> (a function with typed inputs; its response is checked against the schema)

Validate a connection to an external data source.

## Path parameters

- `fabric` string, required

## Request body

- Connection
  - `name` string: Name of the connection.
  - `type` string: Connection type.
  - `connector` ConnectorBase: Lightweight connector definition.
    - `name` string: Name of the connector. This is used as the ID of the connector.
    - `displayName` string: Name that can be used by GUI clients to display the connector.
    - `description` string
    - `type` string: Specifies whether the connector serves as a source or a target.
    - `version` string: Version of the connector.
  - `isEditable` boolean: Indicates whether this connection is editable or not.
  - `isInternal` boolean: Specifies whether this connection is internal or not.
  - `metadata` object: Contains the metadata of the connection. Configurations for the connector, which are set up through this connection, must be provided as key-value pairs.

## Response `200`

Successfully validated the connection.

- ValidationResponse
  - `error` boolean, required
  - `code` integer
  - `reason` string: If invalid, reason for marking resource as invalid.

## 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)
