Download OpenAPI specification:
REST API for managing data connections and connection types.
All endpoints except /health require a bearer token. All endpoints
except /health and /audit/data-connection-types additionally require
the x-tenant-id header.
A missing or invalid token returns 401, and a token that lacks
permission for the requested operation returns 403. A missing or empty
x-tenant-id header is a request validation failure and returns 400,
not 401; a well-formed header naming a tenant you cannot access
returns 403.
For your own user:
export user_token=$(oc whoami -t)
For a ServiceAccount, bind the audience the service expects:
export user_token=$(oc create token <sa-name> -n <namespace> \
--audience="$(oc get authentication cluster -o jsonpath='{.spec.serviceAccountIssuer}')" \
--duration=1h)
The token audience must match the DataConnectService CR's configured
spec.tokenReviewAudiences; a mismatch returns 401 unauthenticated.
The list is empty by default, in which case the cluster API server's
own audience applies.
export TENANT_NAMESPACE=dch-example
curl -H "Authorization: Bearer $user_token" \
-H "x-tenant-id: $TENANT_NAMESPACE" \
https://dch-rest-dch-services.apps.example.com/api/v1alpha1/data/connections
A connection binds a connection type to credentials stored in a Kubernetes secret and connector-specific properties. Connections are tenant-scoped and require the x-tenant-id header.
On create, supply credentials via credentials_ref (reference an existing secret) or credentials (the server creates the secret). On patch, use credentials_ref to point at a different secret; inline credentials in the patch body are silently ignored.
The status.state field reflects live connection health. Call /connections/{id}/readiness to refresh it.
Returns all connections accessible to the tenant identified by x-tenant-id. The response is a DataConnectionResourceList.
{- "total_count": 0,
- "items": [
- {
- "metadata": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "tenant_id": "tenant-1",
- "created_at": "2026-01-01T00:00:00Z",
- "updated_at": "2026-01-01T00:00:00Z"
}, - "resource": {
- "name": "my-postgres",
- "description": "Sales data warehouse",
- "data_connection_type_id": "550e8400-e29b-41d4-a716-446655440000",
- "format": "tabular",
- "credentials_ref": {
- "secret": "my-db-creds"
}, - "properties": {
- "host": "localhost",
- "port": "5432"
}
}, - "status": {
- "state": "ready",
- "message": "string",
- "updated_at": "string"
}
}
]
}Creates a connection that binds a connection type to credentials and connector-specific properties. The referenced connection type must already exist. Use /test/credentials to validate credentials before creating a connection.
Returns 400 with credentials_check_failed when inline credentials do not satisfy the connection type schema. For inline credentials, a missing connection type returns 404; for a credentials_ref, it returns 422.
When the server cannot create the secret for inline credentials, it returns cannot_create_secret with the Kubernetes error in the message: 409 when the secret already exists, 422 when the secret name or keys are invalid or the tenant namespace does not exist, 503 when the Kubernetes API is unavailable, and 500 for other failures, such as missing RBAC for the DCH service account.
Accepts two payload variants (untagged union): use credentials_ref to reference an existing secret, or credentials to supply inline credentials (the server creates the secret automatically).
| name required | string Display name for the connection. |
| description | string Optional free-form description of the connection. |
| data_connection_type_id required | string References a connection type id |
| format required | string (DataFormat) Enum: "tabular" "binary" Data access format for this connection. |
required | object (CredentialsRef) Reference to an existing Kubernetes secret containing credentials. |
required | object Connector-specific non-credential configuration (e.g. host, port, bucket). Keys and values are strings. |
{- "name": "my-postgres",
- "description": "Sales data warehouse",
- "data_connection_type_id": "550e8400-e29b-41d4-a716-446655440000",
- "format": "tabular",
- "credentials_ref": {
- "secret": "my-db-creds"
}, - "properties": {
- "host": "localhost",
- "port": "5432"
}
}{- "metadata": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "tenant_id": "tenant-1",
- "created_at": "2026-01-01T00:00:00Z",
- "updated_at": "2026-01-01T00:00:00Z"
}, - "resource": {
- "name": "my-postgres",
- "description": "Sales data warehouse",
- "data_connection_type_id": "550e8400-e29b-41d4-a716-446655440000",
- "format": "tabular",
- "credentials_ref": {
- "secret": "my-db-creds"
}, - "properties": {
- "host": "localhost",
- "port": "5432"
}
}, - "status": {
- "state": "ready",
- "message": "string",
- "updated_at": "string"
}
}Returns the full connection resource, including metadata, resource, and status.
| id required | string Unique identifier of the connection |
{- "metadata": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "tenant_id": "tenant-1",
- "created_at": "2026-01-01T00:00:00Z",
- "updated_at": "2026-01-01T00:00:00Z"
}, - "resource": {
- "name": "my-postgres",
- "description": "Sales data warehouse",
- "data_connection_type_id": "550e8400-e29b-41d4-a716-446655440000",
- "format": "tabular",
- "credentials_ref": {
- "secret": "my-db-creds"
}, - "properties": {
- "host": "localhost",
- "port": "5432"
}
}, - "status": {
- "state": "ready",
- "message": "string",
- "updated_at": "string"
}
}Partially updates a connection using JSON Merge Patch (RFC 7396). Supply only the fields you want to change; omitted fields are left unchanged. To change the credentials secret reference, patch credentials_ref. Inline credentials in the patch body are silently ignored.
| id required | string Unique identifier of the connection |
| name | string Display name for the connection. |
| description | string or null Free-form description of the connection. Set to |
| data_connection_type_id | string References a connection type id. |
| format | string (DataFormat) Enum: "tabular" "binary" Data access format for this connection. |
object (CredentialsRef) Reference to an existing Kubernetes secret containing credentials. | |
object Connector-specific non-credential configuration (e.g. host, port, bucket). Keys and values are strings. |
{- "name": "string",
- "description": "string",
- "data_connection_type_id": "string",
- "format": "tabular",
- "credentials_ref": {
- "secret": "my-db-creds"
}, - "properties": {
- "property1": "string",
- "property2": "string"
}
}{- "metadata": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "tenant_id": "tenant-1",
- "created_at": "2026-01-01T00:00:00Z",
- "updated_at": "2026-01-01T00:00:00Z"
}, - "resource": {
- "name": "my-postgres",
- "description": "Sales data warehouse",
- "data_connection_type_id": "550e8400-e29b-41d4-a716-446655440000",
- "format": "tabular",
- "credentials_ref": {
- "secret": "my-db-creds"
}, - "properties": {
- "host": "localhost",
- "port": "5432"
}
}, - "status": {
- "state": "ready",
- "message": "string",
- "updated_at": "string"
}
}Permanently deletes the connection. The credentials secret referenced by the connection is not deleted.
| id required | string Unique identifier of the connection |
{- "code": "bad_request",
- "message": "Invalid request: missing required field 'name'"
}Flattens the connection metadata, properties, and credentials into a single Kubernetes secret with dot-notation keys (e.g. data_connection.name, data_connection.properties.host). If the secret already exists it is overwritten.
When the server cannot write the secret, it returns cannot_create_secret with the Kubernetes error in the message: 409 when fields of the existing secret are managed by another client, 422 when the secret name or keys are invalid or the tenant namespace does not exist, 503 when the Kubernetes API is unavailable, and 500 for other failures, such as missing RBAC for the DCH service account.
| id required | string Unique identifier of the connection |
| secret_name required | string Name of the Kubernetes secret to create or overwrite |
{- "code": "bad_request",
- "message": "Invalid request: missing required field 'name'"
}Validates that the connection's credentials secret exists, matches the connection type schema, and that the data source is reachable. Updates the connection status accordingly.
When a credentials secret cannot be read, fails schema validation, or the data-source check fails, the connection status is updated before the error is returned. A missing connection returns 502 without a status update. Returns 400 with invalid_secret or credentials_check_failed when the secret is missing or does not match the connection type schema. Returns 502 with connection_check_failed when the connection is not found or the data source check fails. Returns 500 with status_update_failed when the service cannot persist an updated connection status.
| id required | string Unique identifier of the connection |
{- "code": "bad_request",
- "message": "Invalid request: missing required field 'name'"
}Streams binary data (files, objects) from a data connection. The path query parameter is connector-specific (for example, an object key or a relative URL path). Only connectors that support binary reads will return data; unsupported connectors respond with 501.
| id required | string Unique identifier of the connection |
| path required | string Example: path=models/model.bin File path or object key to download |
UEsDBBQAAAAIAmuAAY4AAAACAAADAAAAYPIakvJrKrp5sQ0AiUtzUEgU0zE10y8uzStOASUmqTcEKkxUAAAsAQAA
A connection type defines a schema for a data connection. A connection type must be created before creating a connection of that type. Connection types are typically created by the Data Connect Hub operator, but you can also create your own custom connection types. Connection types created by the operator are known as global connection types and are accessible by all tenants. Connection types created by a tenant are only accessible by that tenant.
Returns all connection types that are accessible to the tenant. This includes global connection types created by the operator and any custom connection types created by the tenant.
{- "total_count": 0,
- "items": [
- {
- "metadata": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "tenant_id": "tenant-1",
- "created_at": "2026-01-01T00:00:00Z",
- "updated_at": "2026-01-01T00:00:00Z"
}, - "resource": {
- "name": "PostgreSQL",
- "label": "PostgreSQL database",
- "provider": "postgres",
- "description": "string",
- "credentials_fields": [
- {
- "name": "URI",
- "label": "Connection URI",
- "description": "PostgreSQL connection URI",
- "required": true,
- "type": "string",
- "enum_values": [
- {
- "value": "us-east-1",
- "label": "US East"
}
], - "default_value": "string",
- "sensitive": false,
- "multiple": false
}
], - "tags": [
- "domain: database",
- "engine: postgresql",
- "access: sql"
]
}, - "status": {
- "supported_formats": [
- "tabular"
], - "flight_ready": true,
- "flight_url": "string",
- "message": "string",
- "updated_at": "string"
}
}
]
}Default connection types are created by the Data Connect Hub operator. You can also create connection types. Connection types created by a tenant are only accessible by that tenant.
| name required | string The name of the connection type. This name is unique for connection types of this tenant. |
| label | string or null Optional display label for the connection type. When present the UI should render this instead of the short |
| provider required | string |
| description | string or null |
required | Array of objects (Field) |
| tags | Array of strings or null[ items non-empty ] Arbitrary labels for categorising the connection type (e.g. "domain: database", "engine: postgresql"). |
{- "name": "PostgreSQL",
- "label": "PostgreSQL database",
- "provider": "postgres",
- "description": "string",
- "credentials_fields": [
- {
- "name": "URI",
- "label": "Connection URI",
- "description": "PostgreSQL connection URI",
- "required": true,
- "type": "string",
- "enum_values": [
- {
- "value": "us-east-1",
- "label": "US East"
}
], - "default_value": "string",
- "sensitive": false,
- "multiple": false
}
], - "tags": [
- "domain: database",
- "engine: postgresql",
- "access: sql"
]
}{- "metadata": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "tenant_id": "tenant-1",
- "created_at": "2026-01-01T00:00:00Z",
- "updated_at": "2026-01-01T00:00:00Z"
}, - "resource": {
- "name": "PostgreSQL",
- "label": "PostgreSQL database",
- "provider": "postgres",
- "description": "string",
- "credentials_fields": [
- {
- "name": "URI",
- "label": "Connection URI",
- "description": "PostgreSQL connection URI",
- "required": true,
- "type": "string",
- "enum_values": [
- {
- "value": "us-east-1",
- "label": "US East"
}
], - "default_value": "string",
- "sensitive": false,
- "multiple": false
}
], - "tags": [
- "domain: database",
- "engine: postgresql",
- "access: sql"
]
}, - "status": {
- "supported_formats": [
- "tabular"
], - "flight_ready": true,
- "flight_url": "string",
- "message": "string",
- "updated_at": "string"
}
}| id required | string Resource unique identifier |
{- "metadata": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "tenant_id": "tenant-1",
- "created_at": "2026-01-01T00:00:00Z",
- "updated_at": "2026-01-01T00:00:00Z"
}, - "resource": {
- "name": "PostgreSQL",
- "label": "PostgreSQL database",
- "provider": "postgres",
- "description": "string",
- "credentials_fields": [
- {
- "name": "URI",
- "label": "Connection URI",
- "description": "PostgreSQL connection URI",
- "required": true,
- "type": "string",
- "enum_values": [
- {
- "value": "us-east-1",
- "label": "US East"
}
], - "default_value": "string",
- "sensitive": false,
- "multiple": false
}
], - "tags": [
- "domain: database",
- "engine: postgresql",
- "access: sql"
]
}, - "status": {
- "supported_formats": [
- "tabular"
], - "flight_ready": true,
- "flight_url": "string",
- "message": "string",
- "updated_at": "string"
}
}Partially updates a connection type using JSON Merge Patch (RFC 7396). Supply only the fields you want to change; omitted fields are left unchanged.
| id required | string Resource unique identifier |
| name | string |
| label | string or null |
| provider | string |
| description | string or null |
Array of objects (Field) | |
| tags | Array of strings or null[ items non-empty ] Arbitrary labels for categorising the connection type. |
{- "name": "string",
- "label": "string",
- "provider": "string",
- "description": "string",
- "credentials_fields": [
- {
- "name": "URI",
- "label": "Connection URI",
- "description": "PostgreSQL connection URI",
- "required": true,
- "type": "string",
- "enum_values": [
- {
- "value": "us-east-1",
- "label": "US East"
}
], - "default_value": "string",
- "sensitive": false,
- "multiple": false
}
], - "tags": [
- "string"
]
}{- "metadata": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "tenant_id": "tenant-1",
- "created_at": "2026-01-01T00:00:00Z",
- "updated_at": "2026-01-01T00:00:00Z"
}, - "resource": {
- "name": "PostgreSQL",
- "label": "PostgreSQL database",
- "provider": "postgres",
- "description": "string",
- "credentials_fields": [
- {
- "name": "URI",
- "label": "Connection URI",
- "description": "PostgreSQL connection URI",
- "required": true,
- "type": "string",
- "enum_values": [
- {
- "value": "us-east-1",
- "label": "US East"
}
], - "default_value": "string",
- "sensitive": false,
- "multiple": false
}
], - "tags": [
- "domain: database",
- "engine: postgresql",
- "access: sql"
]
}, - "status": {
- "supported_formats": [
- "tabular"
], - "flight_ready": true,
- "flight_url": "string",
- "message": "string",
- "updated_at": "string"
}
}Deletes a connection type. The request is rejected with 409 Conflict if any connection still references the type; delete those connections first. Only the number of referencing connections is reported, since a global connection type may be referenced from other tenants.
| id required | string Resource unique identifier |
{- "code": "bad_request",
- "message": "Invalid request: missing required field 'name'"
}Tests the provided credentials by attempting to connect to the data source without creating any resources. You can use /test/credentials to test the credentials first. Once the test is successful, you can use /connections to create a connection.
| data_connection_type_id required | string Connection type id to test against |
required | object Credential key-value pairs to test |
{- "data_connection_type_id": "550e8400-e29b-41d4-a716-446655440000",
- "credentials": {
- "URI": "postgres://pg_user:pg_pass@db.example.com:5432/mydb"
}
}{- "code": "bad_request",
- "message": "Invalid request: missing required field 'name'"
}