cURL
curl -X POST https://api.aiql.io/sources/ing_9d2c/workspaces \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "AiQL-Workspace: $AIQL_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{"workspace_id": "ws_4c2d"}'import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
workspace = client.sources.add_to_workspace(
"ing_9d2c",
"ws_4c2d",
workspace_id="ws_3a1b",
)import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const workspace = await client.sources.addToWorkspace("ing_9d2c", "ws_4c2d", {
workspaceId: "ws_3a1b",
});{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Sources
Add Source To Workspace
POST
/
sources
/
{id}
/
workspaces
cURL
curl -X POST https://api.aiql.io/sources/ing_9d2c/workspaces \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "AiQL-Workspace: $AIQL_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{"workspace_id": "ws_4c2d"}'import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
workspace = client.sources.add_to_workspace(
"ing_9d2c",
"ws_4c2d",
workspace_id="ws_3a1b",
)import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const workspace = await client.sources.addToWorkspace("ing_9d2c", "ws_4c2d", {
workspaceId: "ws_3a1b",
});{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key or UI session JWT passed as a Bearer token.
Headers
ID of the workspace the request operates on.
Path Parameters
Body
application/json
ID of the workspace to attach this source to.
Response
Successful Response
Unique identifier of the workspace.
Name of the workspace.
Description of the workspace.
Timestamp when the workspace was created.
Timestamp when the workspace was last updated.