---
title: "Create datasource connector"
method: POST
path: "/datasources"
tags: ["Datasources"]
---

# Create datasource connector

`POST /datasources`

Validates the request, tests the connection, encrypts credentials, and persists a new datasource connector. Returns 422 if the connection test fails.

## Request body

- GithubComProjectAiServicesAiServicesInternalPkgCatalogApiserverModelsCreateDatasourceRequest
  - `name` string, required — Name is the unique human-readable label for this connector. Must be 3–100 characters; only letters, digits, hyphens (-), and underscores (_) are allowed. Duplicate-name detection is case-insensitive ("My-DB" and "my-db" conflict).
  - `params` object, required — Params holds the provider-specific configuration. Sensitive fields (format: "password" in the JSON schema) are encrypted at rest; all other fields are stored in plain text.
  - `provider_id` string, required — ProviderID identifies the provider implementation (e.g. "object_storage", "file_system").

## Response `201`

Datasource created

- GithubComProjectAiServicesAiServicesInternalPkgCatalogApiserverModelsCreateDatasourceResponse
  - `id` string

## Other responses

- `400` — Invalid request body or validation errors
- `401` — Unauthorized
- `404` — Provider not found in catalog
- `409` — Datasource name already exists
- `422` — Connection test failed
- `500` — Internal Server Error

---

[API](https://skmtc.dev/ibm/apis/ai-services-catalog-api.md) · [All operations](https://skmtc.dev/ibm/apis/ai-services-catalog-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ibm/ai-services-catalog-api/revisions/b6ffcee23f74/schema)
