Create Connection
Create a new connection. Credentials are validated and encrypted.
In: header
Query Parameters
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://platform.alomana.com/api/v1/data-sources/connections/" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "connector_key": "string", "auth_type": "string", "credentials": {} }'{
"id": 0,
"name": "string",
"connector_key": "string",
"auth_type": "string",
"credentials": {},
"is_deleted": false,
"category": "data_source",
"created_by_id": 0,
"updated_by_id": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"space_slug": "string",
"scope_visibility": "global",
"owner_ref": "string",
"owner_type": "string",
"user_id": 0,
"is_owner": false,
"owner_name": "string",
"semantic_layer": {
"tables": [
{
"name": "string",
"display_name": "string",
"purpose": "string",
"domain": "string",
"is_included": true,
"column_samples": {
"property1": [
"string"
],
"property2": [
"string"
]
}
}
],
"relationships": [
{
"from_table": "string",
"to_table": "string",
"from_columns": [
"string"
],
"to_columns": [
"string"
],
"cardinality": "1:1",
"join_type": "LEFT",
"confidence": "high",
"when_to_use": "string"
}
],
"definitions": [
{
"id": "string",
"name": "string",
"description": "string",
"domain": "string",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": null
}
],
"source": "string"
}
],
"kpis": [
{
"id": "string",
"name": "string",
"description": "string",
"formula": "string",
"sql": "string",
"tables": [
"string"
],
"source": "string"
}
],
"status": "generating",
"generated_at": "string"
},
"connector_type": "database",
"user_authenticated": true,
"detected_role": "string",
"available_roles": [
"string"
],
"session_check": {
"ok": true,
"error": "string"
},
"copied_from_space": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}POSTCopy Connection To Space
Copy a connection from another workspace into the selected one. ``X-Space-Slug`` is the target; ``source_space_slug`` is the source; the caller must be a member of both. Credentials copy verbatim; per-user OAuth tokens do not travel, so an oauth2 copy lands unauthenticated (``needs_reauth``) and each member reconnects their own account. Returns 201 for a fresh copy, 200 when a lineage-matching copy already existed.
POSTExecute Query
Execute a connector-specific query for the current user's connection. An app's call resolves as the gateway-asserted viewer, never the key owner.