For the complete documentation index, see llms.txt. This page is also available as Markdown.

Workspace Tables

List Workspace Tables

get
Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Responses
200

Successful Response

application/json
get/v1/{workspace_id}/tables
GET /v1/{workspace_id}/tables HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "table_name": "text",
      "physical_name": "text",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Create Workspace Table

post
Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Body
table_namestring · min: 1 · max: 63RequiredPattern: ^[a-z][a-z0-9_]{0,62}$
primary_keystring[] · nullableOptional
Responses
201

Successful Response

application/json
idstring · uuidRequired
workspace_idstring · uuidRequired
table_namestringRequired
physical_namestringRequired
post/v1/{workspace_id}/tables
POST /v1/{workspace_id}/tables HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 199

{
  "table_name": "text",
  "columns": [
    {
      "name": "text",
      "type": "text",
      "nullable": true,
      "default": {
        "kind": "literal",
        "value": "text"
      }
    }
  ],
  "primary_key": [
    "text"
  ],
  "unique": [
    [
      "text"
    ]
  ],
  "indexes": [
    {
      "columns": [
        "text"
      ]
    }
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "table_name": "text",
  "physical_name": "text"
}

Get Workspace Table

get
Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
table_idstring · uuidRequired
Responses
200

Successful Response

application/json
idstring · uuidRequired
workspace_idstring · uuidRequired
table_namestringRequired
physical_namestringRequired
created_atstring · date-timeRequired
get/v1/{workspace_id}/tables/{table_id}
GET /v1/{workspace_id}/tables/{table_id} HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "table_name": "text",
  "physical_name": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "columns": [
    {
      "name": "text",
      "data_type": "text",
      "is_nullable": true,
      "default": "text"
    }
  ],
  "indexes": [
    {
      "name": "text",
      "definition": "text"
    }
  ],
  "constraints": [
    {
      "name": "text",
      "definition": "text"
    }
  ]
}

Delete Workspace Table

delete
Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
table_idstring · uuidRequired
Responses
200

Successful Response

application/json
anyOptional
delete/v1/{workspace_id}/tables/{table_id}
DELETE /v1/{workspace_id}/tables/{table_id} HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update Workspace Table

patch
Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
table_idstring · uuidRequired
Body
Responses
200

Successful Response

application/json
idstring · uuidRequired
workspace_idstring · uuidRequired
table_namestringRequired
physical_namestringRequired
patch/v1/{workspace_id}/tables/{table_id}
PATCH /v1/{workspace_id}/tables/{table_id} HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "actions": [
    {
      "op": "text",
      "column": {
        "name": "text",
        "type": "text",
        "nullable": true,
        "default": {
          "kind": "literal",
          "value": "text"
        }
      }
    }
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "table_name": "text",
  "physical_name": "text"
}

Execute Workspace Query

post
Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Body
sqlstring · min: 1 · max: 16384Required

One SQL statement: SELECT / WITH ... SELECT / INSERT / UPDATE / DELETE. Multi-statement, DDL, and session-state commands (SET ROLE, RESET, SET SESSION AUTHORIZATION) reject with 422 at the Pydantic boundary. pg_* function calls reject with 400 at execute time (no grant).

Responses
200

Successful Response

application/json
columnsstring[]Required
row_countintegerRequired
post/v1/{workspace_id}/query
POST /v1/{workspace_id}/query HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "sql": "text"
}
{
  "columns": [
    "text"
  ],
  "rows": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "row_count": 1
}

Last updated

Was this helpful?