background image

Records

Read, add, change and delete the records of a table, and upload or download the files in its Blob fields.

Background and examples: Getting Started

List records

GET /v1/data/table

Gets records for a table with optional filtering, sorting, and joining.

Parameters

project uuid query required

Project GUID (e.g., "3fa85f64-5717-4562-b3fc-2c963f66afa6").

table integer (int64) query required

Table ID (e.g., 123).

Offset integer (int64) query

Number of records to skip for pagination (default: 0). Example: 0

Take integer (int64) query

Maximum number of records to return. Example: 100

JoinQuery string query

Join format: "tableA;fieldA=tableB;fieldB", joining tableA.fieldA to tableB.fieldB. Separate several joins with "&" (URL-encoded as %26). Example: "orders;customer=customers;id"

WhereQuery string query

Filter format: "field;operator;value". Join clauses with "&" (and, URL-encoded as %26) or "|" (or); "and" binds tighter than "or", as in SQL. Operators: = or equal, != (also <>, =!, ><) or not_equal, > or largerthan (alias lt), < or smallerthan (alias st), >= (also =>) or largerthan_equal, <= (also =<) or smallerthan_equal, like, notlike, in, notin (comma-separated values), null (value true for "is null", false for "is not null"). Unknown fields are refused. Example: "age;>=;18&name;like;J%"

SortQuery string query

Sort format: "field;direction" (asc/desc). Separate several sorts with "|". Example: "name;asc"

distinct boolean query

Return only distinct records (default: false).

select string query

Semicolon-separated field names (e.g., "id;name;email"). Returns all fields if omitted.

Responses

  • 200 Returns the queried records.
  • 400 If the queries provided could not be parsed.
  • 401 If the user is not signed in.
  • 404 If the given tables or fields could not be found.
  • 500 If something went wrong in the database.

Request

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

Response 200

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

Add records

POST /v1/data/table

Adds one or more records to the given table. This endpoint supports bulk insertion of multiple records in a single request.

Parameters

project uuid query required

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

table integer (int64) query required

The ID of the table to insert records into. Format: long integer (e.g., 123).

Request body application/json

The request body containing the records to create. Each record is a dictionary of field names to values. Field names must match existing table columns. The 'id' field is typically auto-generated and should not be included. If the Records array is empty, the endpoint returns immediately without error.

records object[] required

The records to add, each an object of field names and values. Leave out id: it is assigned for you.

Responses

  • 201 Returns the newly created records with their assigned IDs.
  • 401 If the user is not signed in.
  • 404 If the given tables or fields could not be found.
  • 500 If something went wrong in the database.

Request

curl -X POST 'https://api.stellards.io/v1/data/table?project=PROJECT_ID&table=TABLE_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "records": [
      {
        "name": "Ada Lovelace",
        "city": "Ghent"
      },
      {
        "name": "Grace Hopper",
        "city": "New York"
      }
    ]
  }'

Response 201

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

Update records

PUT /v1/data/table

Updates one or more records in the given table based on their IDs. This endpoint supports bulk updates and can update all records if forced.

Parameters

project uuid query required

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

table integer (int64) query required

The ID of the table containing the records to update. Format: long integer (e.g., 123).

force boolean query

Set to true to update ALL records in the table when no IDs are provided. Default: false. When false and no IDs are specified, the request is rejected with a safety warning message.

Request body application/json

The request body containing the record data and optional ID list.

  • Record: A dictionary of field names to new values. Only the fields included will be updated.
  • IdList (optional): Array of record IDs to update. If not provided, the endpoint looks for an 'id' field in the Record object. If neither is provided and force=false, returns a 400 error to prevent accidental bulk updates.
idList object[]

The ids of the records to change. Without it, the id in record is used.

record object required

Field names and their new values. Fields you leave out keep their value.

Responses

  • 200 Returns the updated records.
  • 401 If the user is not signed in.
  • 404 If the given tables or fields could not be found.
  • 500 If something went wrong in the database.

Request

curl -X PUT 'https://api.stellards.io/v1/data/table?project=PROJECT_ID&table=TABLE_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "idList": [
      1,
      2
    ],
    "record": {
      "city": "Brussels"
    }
  }'

Response 200

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

Delete a record

DELETE /v1/data/table

Deletes a single record from the given table by its ID.

Parameters

project uuid query required

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

table integer (int64) query required

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

record integer (int64) query

The ID of the specific record to delete. Format: long integer (e.g., 456). If not provided, the request returns a 400 Bad Request error.

Responses

  • 200 Returns success if the record was deleted.
  • 401 If the user is not signed in.
  • 404 If the given table or record could not be found.
  • 500 If something went wrong in the database.

Request

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

Download a file

GET /v1/data/table/blob

Download a file from a blob field as a stream. This endpoint is specifically designed for retrieving binary data (images, files, etc.) stored in Blob fields.

Parameters

project uuid query required

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

table integer (int64) query required

The ID of the table containing the record. Format: long integer (e.g., 123).

record integer (int64) query required

The ID of the specific record containing the blob data. Format: long integer (e.g., 456).

field string query required

The name of the blob field to download. This field must be of type Blob. The field name will be URL-decoded automatically. Format: string (e.g., "profile_image" or "attachment").

Responses

  • 200 Returns the file stream for the blob data.
  • 400 If the field is not of type Blob.
  • 401 If the user is not signed in.
  • 404 If the table, field, record, or file could not be found.
  • 500 If something went wrong in the database.

Request

curl -X GET 'https://api.stellards.io/v1/data/table/blob?project=PROJECT_ID&table=TABLE_ID&record=RECORD_ID&field=FIELD_NAME' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -o photo.jpg

Upload a file

POST /v1/data/table/blob

Upload a file to a blob field. This endpoint allows uploading binary data (images, files, etc.) to Blob fields. Maximum file size is 1MB.

Parameters

project uuid query required

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

table integer (int64) query required

The ID of the table containing the record to update. Format: long integer (e.g., 123).

record integer (int64) query required

The ID of the specific record to update with the uploaded file. Format: long integer (e.g., 456).

field string query required

The name of the blob field to update. This field must be of type Blob. Format: string (e.g., "profile_image" or "attachment").

Request body multipart/form-data

data file

The file, as the form field data. At most 1 MB.

Responses

  • 200 Returns success if the file was uploaded and stored successfully.
  • 400 If the file size exceeds 1MB, the field is not a blob type, or the request is malformed.
  • 401 If the user is not signed in.
  • 404 If the table, field, or record could not be found.
  • 500 If something went wrong in the database.

Request

curl -X POST 'https://api.stellards.io/v1/data/table/blob?project=PROJECT_ID&table=TABLE_ID&record=RECORD_ID&field=FIELD_NAME' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -F 'data=@photo.jpg'

Delete several records

POST /v1/data/table/delete

Deletes multiple records from the given table by their IDs. This endpoint supports bulk deletion of records in a single request.

Parameters

project uuid query required

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

table integer (int64) query required

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

Request body application/json

An array of record IDs to delete, provided in the request body as a JSON array of numbers or numeric strings. . If the array is empty or holds anything that is not a whole number, the request returns a 400 Bad Request error. Example body: [123, 456, 789]

Responses

  • 200 Returns success if the records were deleted.
  • 401 If the user is not signed in.
  • 404 If the given table could not be found.
  • 500 If something went wrong in the database.

Request

curl -X POST 'https://api.stellards.io/v1/data/table/delete?project=PROJECT_ID&table=TABLE_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '[
    123,
    456,
    789
  ]'

Delete all records

DELETE /v1/data/table/clear

Deletes all records from the given table. WARNING: This is a destructive operation that removes ALL records from the specified table without any confirmation.

Parameters

project uuid query required

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

table integer (int64) query required

The ID of the table to clear all records from. Format: long integer (e.g., 123). All records in this table will be permanently deleted.

Responses

  • 200 Returns success if all records were deleted from the table.
  • 401 If the user is not signed in.
  • 404 If the given table could not be found.
  • 500 If something went wrong in the database.

Request

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