background image

Tables

Create, rename and delete the tables of a project.

List or get tables

GET /v1/schema/table

Retrieves table(s) from a project. Can fetch either a specific table by name/ID or all tables in the project. This endpoint supports flexible querying by accepting either table name or numeric ID.

Parameters

project uuid query required

The GUID of the project containing the tables. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Query string parameter.

table string query

The name or ID of a specific table to retrieve. Format: string (table name) or numeric string (table ID, e.g., "123"). When omitted, returns all tables in the project. When provided as a number, queries by table ID; otherwise queries by table name.

Responses

  • 200 Successfully retrieved table(s). Response contains table metadata including table ID, name, description, creation date, and optionally field definitions.
  • 400 Bad request. Invalid project GUID format.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Project-level access to this project.
  • 404 Not found. The specified project or table could not be found.
  • 500 Internal server error. An unexpected error occurred while retrieving table information.

Request

curl -X GET 'https://api.stellards.io/v1/schema/table?project=PROJECT_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN'

Response 200

{
  "isSuccess": true,
  "messages": []
}

Create a table

POST /v1/schema/table

Creates a new table in a project. This endpoint creates a new table schema with optional initial field definitions. Enforces table count limitations based on the project's subscription tier.

Parameters

project uuid query required

The GUID of the project to create the table in. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Query string parameter.

Request body application/json

The table definition object in the request body.

name string required

The table's name, unique in the project.

description string

A description for your own reference.

isMultitenant boolean required

Whether every user only sees the rows they wrote in this table.

Responses

  • 201 Table created successfully. Response contains the complete table definition including the newly assigned table ID, name, and all configured properties.
  • 400 Bad request. Table name already exists in the project, or invalid table configuration.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Create Tables permission (Permission ID: 3) or has reached the tier's table count limit.
  • 404 Not found. The specified project could not be found.
  • 500 Internal server error. An unexpected database error occurred while creating the table.

Request

curl -X POST 'https://api.stellards.io/v1/schema/table?project=PROJECT_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Customers",
    "description": "Everyone who placed an order",
    "isMultitenant": false
  }'

Response 201

{
  "messages": [],
  "isSuccess": true,
  "data": {
    "id": 1,
    "name": "Ada Lovelace",
    "city": "Ghent"
  }
}

Update a table

PUT /v1/schema/table

Updates an existing table's metadata. This allows modification of table properties such as name and description.

Parameters

project uuid query required

The GUID of the project containing the table. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Query string parameter.

table integer (int64) query

The ID of the table to update. Format: long integer (e.g., 123). Query string parameter.

Request body application/json

The updated table definition object in the request body containing the new table properties (name, description, etc.).

name string required

The table's name, unique in the project.

description string

A description for your own reference.

isMultitenant boolean required

Whether every user only sees the rows they wrote in this table.

Responses

  • 200 Table updated successfully. Response contains the complete updated table definition including table ID, name, description, and metadata.
  • 400 Bad request. New table name conflicts with an existing table in the project.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Schema-level Modify permission (Permission ID: 9) for table metadata updates.
  • 404 Not found. The specified project or table could not be found.
  • 500 Internal server error. An unexpected database error occurred during table update.

Request

curl -X PUT 'https://api.stellards.io/v1/schema/table?project=PROJECT_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Customers",
    "description": "Everyone who placed an order",
    "isMultitenant": false
  }'

Response 200

{
  "messages": [],
  "isSuccess": true,
  "data": [
    {
      "id": 412,
      "name": "Customers",
      "description": "Everyone who placed an order",
      "isMultitenant": false
    }
  ]
}

Delete a table

DELETE /v1/schema/table

Deletes a table from a project. This permanently removes the table schema and all stored data. Warning: This operation is irreversible and will permanently delete all data stored in the table and its fields.

Parameters

project uuid query required

The GUID of the project containing the table. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Query string parameter.

table integer (int64) query required

The ID of the table to delete. Format: long integer (e.g., 123). Query string parameter.

Responses

  • 200 Table deleted successfully. The table schema and all associated data have been permanently removed from the project.
  • 400 Bad request. The table may have dependent relationships (foreign keys from other tables) that prevent deletion.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Delete Tables permission (Permission ID: 4).
  • 404 Not found. The specified project or table could not be found.
  • 500 Internal server error. An unexpected database error occurred during table deletion. The table may not have been deleted.

Request

curl -X DELETE 'https://api.stellards.io/v1/schema/table?project=PROJECT_ID&table=TABLE_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN'

List tables Path-style route

GET /project/{project}/table

Retrieves all tables from a project using RESTful route parameters. This endpoint returns a collection of all table definitions within the project.

Parameters

project uuid path required

The GUID of the project to retrieve tables from. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Provided as a route parameter.

Responses

  • 200 Successfully retrieved all tables. Response contains an array of table objects with table IDs, names, descriptions, and creation dates.
  • 400 Bad request. Invalid project GUID format in route parameter.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Project-level access to this project.
  • 404 Not found. The specified project could not be found.
  • 500 Internal server error. An unexpected error occurred while retrieving tables.

Request

curl -X GET 'https://api.stellards.io/project/PROJECT_ID/table' \
  -H 'Authorization: Bearer ACCESS_TOKEN'

Response 200

{
  "messages": [],
  "isSuccess": true,
  "data": [
    {
      "id": 412,
      "name": "Customers",
      "description": "Everyone who placed an order",
      "isMultitenant": false
    }
  ]
}

Create a table Path-style route

POST /project/{project}/table

Creates a new table in a project using RESTful route parameters. This endpoint creates a new table schema with optional initial field definitions.

Parameters

project uuid path required

The GUID of the project to create the table in. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Provided as a route parameter.

Request body application/json

The table definition object in the request body.

name string required

The table's name, unique in the project.

description string

A description for your own reference.

isMultitenant boolean required

Whether every user only sees the rows they wrote in this table.

Responses

  • 201 Table created successfully. Response contains the complete table definition including the newly assigned table ID and all configured properties. Also enforces table count limits based on subscription tier.
  • 400 Bad request. Table name already exists in the project, or invalid table configuration.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Create Tables permission (Permission ID: 3) or has reached the tier limit for table count.
  • 404 Not found. The specified project could not be found.
  • 500 Internal server error. An unexpected database error occurred while creating the table.

Request

curl -X POST 'https://api.stellards.io/project/PROJECT_ID/table' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Customers",
    "description": "Everyone who placed an order",
    "isMultitenant": false
  }'

Response 201

{
  "messages": [],
  "isSuccess": true,
  "data": {
    "id": 1,
    "name": "Ada Lovelace",
    "city": "Ghent"
  }
}

Get a table Path-style route

GET /project/{project}/table/{table}

Retrieves a specific table from a project using RESTful route parameters. This endpoint provides table metadata and schema information.

Parameters

project uuid path required

The GUID of the project containing the table. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Provided as a route parameter.

table integer (int64) path required

The ID of the table to retrieve. Format: long integer (e.g., 123). Provided as a route parameter.

Responses

  • 200 Successfully retrieved the table. Response contains table ID, name, description, creation date, and associated field definitions.
  • 400 Bad request. Invalid project GUID or table ID format in route parameters.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Project-level access to this project.
  • 404 Not found. The specified project or table could not be found.
  • 500 Internal server error. An unexpected error occurred while retrieving table information.

Request

curl -X GET 'https://api.stellards.io/project/PROJECT_ID/table/TABLE_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN'

Response 200

{
  "messages": [],
  "isSuccess": true,
  "data": {
    "id": 412,
    "name": "Customers",
    "description": "Everyone who placed an order",
    "isMultitenant": false
  }
}

Update a table Path-style route

PUT /project/{project}/table/{table}

Updates an existing table's metadata using RESTful route parameters. This allows modification of table properties such as name and description.

Parameters

project uuid path required

The GUID of the project containing the table. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Provided as a route parameter.

table integer (int64) path required

The ID of the table to update. Format: long integer (e.g., 123). Provided as a route parameter.

Request body application/json

The updated table definition in the request body containing the new table properties (name, description, etc.).

name string required

The table's name, unique in the project.

description string

A description for your own reference.

isMultitenant boolean required

Whether every user only sees the rows they wrote in this table.

Responses

  • 200 Table updated successfully. Response contains the complete updated table definition.
  • 400 Bad request. New table name conflicts with an existing table in the project.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Update Tables permission (Permission ID: 8).
  • 404 Not found. The specified project or table could not be found.
  • 500 Internal server error. An unexpected database error occurred during table update.

Request

curl -X PUT 'https://api.stellards.io/project/PROJECT_ID/table/TABLE_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Customers",
    "description": "Everyone who placed an order",
    "isMultitenant": false
  }'

Response 200

{
  "messages": [],
  "isSuccess": true,
  "data": [
    {
      "id": 412,
      "name": "Customers",
      "description": "Everyone who placed an order",
      "isMultitenant": false
    }
  ]
}

Delete a table Path-style route

DELETE /project/{project}/table/{table}

Deletes a table from a project using RESTful route parameters. This permanently removes the table schema and all data. Warning: This operation is irreversible and will permanently delete all data stored in the table.

Parameters

project uuid path required

The GUID of the project containing the table. Format: GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6"). Provided as a route parameter.

table integer (int64) path required

The ID of the table to delete. Format: long integer (e.g., 123). Provided as a route parameter.

Responses

  • 200 Table deleted successfully. The table schema and all associated data have been permanently removed.
  • 400 Bad request. The table may have dependent relationships that prevent deletion.
  • 401 Unauthorized. The user is not authenticated.
  • 403 Forbidden. The user does not have Delete Tables permission (Permission ID: 4).
  • 404 Not found. The specified project or table could not be found.
  • 500 Internal server error. An unexpected database error occurred during table deletion.

Request

curl -X DELETE 'https://api.stellards.io/project/PROJECT_ID/table/TABLE_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN'