Copilot
Route for listing AI agents.
Successful Response
GET /copilot/v1/agent/ HTTP/1.1
Host: api.skysql.com/
Accept: */*
Successful Response
[
{
"context_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"datasource_id": null,
"description": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"index_status": "INSYNC",
"name": "text",
"status": "DEVELOPMENT",
"type": "SYSTEM"
}
]
Route for creating a new AI agent.
Request for creating a new agent.
Successful Response
Validation Error
POST /copilot/v1/agent/ HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 86
{
"context_id": "123e4567-e89b-12d3-a456-426614174000",
"description": null,
"name": "text"
}
{
"context_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"datasource_id": null,
"description": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"index_status": "INSYNC",
"name": "text",
"status": "DEVELOPMENT",
"type": "SYSTEM"
}
Import an agent from JSON
Request for importing an agent.
Successful Response
Validation Error
POST /copilot/v1/agent/import HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 267
{
"data": {
"context": {
"description": null,
"name": "text",
"tables": [
{
"columns": [
{
"data_role": null,
"description": null,
"name": "text",
"type": "text"
}
],
"description": null,
"name": "text"
}
]
},
"description": null,
"name": "text"
},
"datasource_id": "123e4567-e89b-12d3-a456-426614174000"
}
{
"context_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"datasource_id": null,
"description": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"index_status": "INSYNC",
"name": "text",
"status": "DEVELOPMENT",
"type": "SYSTEM"
}
Route for retrieving an AI agent.
Successful Response
Validation Error
GET /copilot/v1/agent/{agent_id} HTTP/1.1
Host: api.skysql.com/
Accept: */*
{
"context_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"datasource_id": null,
"description": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"index_status": "INSYNC",
"name": "text",
"status": "DEVELOPMENT",
"type": "SYSTEM"
}
Route for updating an AI agent.
Request for updating a agent.
Successful Response
Validation Error
PATCH /copilot/v1/agent/{agent_id} HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 64
{
"context_id": null,
"description": null,
"name": null,
"status": null
}
{
"context_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"datasource_id": null,
"description": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"index_status": "INSYNC",
"name": "text",
"status": "DEVELOPMENT",
"type": "SYSTEM"
}
Export agent to JSON
Successful Response
Validation Error
GET /copilot/v1/agent/{agent_id}/export HTTP/1.1
Host: api.skysql.com/
Accept: */*
{
"context": {
"description": null,
"name": "text",
"tables": [
{
"columns": [
{
"data_role": null,
"description": null,
"name": "text",
"type": "text"
}
],
"description": null,
"name": "text"
}
]
},
"description": null,
"name": "text"
}
Generate semantics for the agent context based on the description
Successful Response
Validation Error
POST /copilot/v1/agent/{agent_id}/generate HTTP/1.1
Host: api.skysql.com/
Accept: */*
{
"created_on": "2025-10-06T10:53:09.495Z",
"datasource_id": "123e4567-e89b-12d3-a456-426614174000",
"description": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"tables": [
{
"available_columns": [
{
"data_role": null,
"description": null,
"id": null,
"name": "text",
"type": "text"
}
],
"columns": [
{
"data_role": null,
"description": null,
"id": null,
"name": "text",
"type": "text"
}
],
"context_id": "123e4567-e89b-12d3-a456-426614174000",
"created_on": "2025-10-06T10:53:09.495Z",
"description": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
}
]
}
Chat with an AI agent
Request for the app chat API.
{}
Successful Response
Validation Error
POST /copilot/v1/chat/ HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"config": {},
"prompt": "text"
}
{
"prompt": "text",
"response": {
"col_keys": [
"text"
],
"content": null,
"error_text": "text",
"sql_text": "text"
}
}
List all datasources.
Successful Response
GET /copilot/v1/data-source/ HTTP/1.1
Host: api.skysql.com/
Accept: */*
Successful Response
[
{
"host": "text",
"created_on": "2025-10-06T10:53:09.495Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"port": 1,
"type": "SYSTEM",
"username": "text"
}
]
Create a new data source connection.
Request for creating a new data source connection
Successful Response
Validation Error
POST /copilot/v1/data-source/ HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 74
{
"host": "text",
"name": "text",
"password": "text",
"port": 1,
"username": "text"
}
{
"host": "text",
"created_on": "2025-10-06T10:53:09.495Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"port": 1,
"schemas": [
{
"name": "text",
"tables": [
"text"
]
}
],
"type": "SYSTEM",
"username": "text"
}
Retrieve a data source connection.
Successful Response
Validation Error
GET /copilot/v1/data-source/{datasource_id} HTTP/1.1
Host: api.skysql.com/
Accept: */*
{
"host": "text",
"created_on": "2025-10-06T10:53:09.495Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"port": 1,
"schemas": [
{
"name": "text",
"tables": [
"text"
]
}
],
"type": "SYSTEM",
"username": "text"
}
Delete a data source connection.
Successful Response
Validation Error
DELETE /copilot/v1/data-source/{datasource_id} HTTP/1.1
Host: api.skysql.com/
Accept: */*
No content
Update a data source connection.
Request for updating a data source connection
Successful Response
Validation Error
PATCH /copilot/v1/data-source/{datasource_id} HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"name": null,
"password": null,
"username": null
}
{
"host": "text",
"created_on": "2025-10-06T10:53:09.495Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"port": 1,
"schemas": [
{
"name": "text",
"tables": [
"text"
]
}
],
"type": "SYSTEM",
"username": "text"
}
Get the current quota usage.
Successful Response
Validation Error
GET /copilot/v1/quota/ HTTP/1.1
Host: api.skysql.com/
Accept: */*
[
{
"description": "text",
"name": "text",
"unit": "text",
"usage": 1,
"value": 1
}
]
Route for chat session management.
Successful Response
Not found
GET /copilot/v1/session/ HTTP/1.1
Host: api.skysql.com/
Accept: */*
[
{
"agent_config": {},
"agent_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"summary": null
}
]
Route for creating a new chat session.
Request for creating a new session
Successful Response
Not found
Validation Error
POST /copilot/v1/session/ HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 107
{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"chat": null,
"config": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
{
"agent_config": {},
"agent_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"entries": [
{
"chat": {
"prompt": "text",
"response": {
"col_keys": [
"text"
],
"content": null,
"error_text": "text",
"sql_text": "text"
}
},
"confidence": null,
"created_on": "2025-10-06T10:53:09.495Z",
"feedback": null,
"id": "123e4567-e89b-12d3-a456-426614174000"
}
],
"id": "123e4567-e89b-12d3-a456-426614174000",
"summary": null
}
Retrieve a chat session
Successful Response
Not found
Validation Error
GET /copilot/v1/session/{session_id} HTTP/1.1
Host: api.skysql.com/
Accept: */*
{
"agent_config": {},
"agent_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"entries": [
{
"chat": {
"prompt": "text",
"response": {
"col_keys": [
"text"
],
"content": null,
"error_text": "text",
"sql_text": "text"
}
},
"confidence": null,
"created_on": "2025-10-06T10:53:09.495Z",
"feedback": null,
"id": "123e4567-e89b-12d3-a456-426614174000"
}
],
"id": "123e4567-e89b-12d3-a456-426614174000",
"summary": null
}
Update a chat session
Request for chatting with a session
Successful Response
Not found
Validation Error
PUT /copilot/v1/session/{session_id} HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"prompt": "text"
}
{
"agent_config": {},
"agent_id": null,
"created_on": "2025-10-06T10:53:09.495Z",
"entries": [
{
"chat": {
"prompt": "text",
"response": {
"col_keys": [
"text"
],
"content": null,
"error_text": "text",
"sql_text": "text"
}
},
"confidence": null,
"created_on": "2025-10-06T10:53:09.495Z",
"feedback": null,
"id": "123e4567-e89b-12d3-a456-426614174000"
}
],
"id": "123e4567-e89b-12d3-a456-426614174000",
"summary": null
}
Add a chat entry to a session
Request for chatting with a session
Successful Response
Not found
Validation Error
POST /copilot/v1/session/{session_id}/entry HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"prompt": "text"
}
{
"chat": {
"prompt": "text",
"response": {
"col_keys": [
"text"
],
"content": null,
"error_text": "text",
"sql_text": "text"
}
},
"confidence": null,
"created_on": "2025-10-06T10:53:09.495Z",
"feedback": null,
"id": "123e4567-e89b-12d3-a456-426614174000"
}
Delete all chat entries from a session
Successful Response
Not found
Validation Error
DELETE /copilot/v1/session/{session_id}/entry HTTP/1.1
Host: api.skysql.com/
Accept: */*
No content
Patch a chat entry in a session
Request for patching a session entry
Successful Response
Not found
Validation Error
PATCH /copilot/v1/session/{session_id}/entry/{entry_id} HTTP/1.1
Host: api.skysql.com/
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"chat": null,
"feedback": null
}
{
"chat": {
"prompt": "text",
"response": {
"col_keys": [
"text"
],
"content": null,
"error_text": "text",
"sql_text": "text"
}
},
"confidence": null,
"created_on": "2025-10-06T10:53:09.495Z",
"feedback": null,
"id": "123e4567-e89b-12d3-a456-426614174000"
}
Was this helpful?