REST API

Gateway

Derived from the source of github.com/awee-ai/api/cmd/gateway.

Awee Gateway API · v1.0.0 · 28 endpoints

Automations

POST/v1/apps/{app}/automations/{automation}/triggerAuth

Fires a whitelisted automation for the resolved app

The whitelist is the automation row itself: it must belong to this app, be enabled, and carry trigger "api". Anything else is rejected before the runner is ever called. A trigger that asks for async gets 202 and the id of the run still executing, so the caller follows that run instead of holding a connection open for a workflow that may take minutes. A synchronous trigger gets 200 and the run's outputs, because by then there is nothing left to wait for and a 202 over finished work tells the caller to poll something that is already done.

gateway.Handler.TriggerAutomation

Path parameters

appstringrequired
automationstringrequired

Responses

200 OKOK
automation_idstringrequired
outputsobject
run_idstring
statusstringrequired
202 AcceptedAccepted
automation_idstringrequired
outputsobject
run_idstring
statusstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
502 Bad Gatewaythe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "automation_id": "string",
  "outputs": {},
  "run_id": "string",
  "status": "string"
}

Grants

GET/v1/apps/{app}/grantsAuth

Returns the org's grants, narrowed to one member or one role when the query names either

gateway.Handler.ListGrants

Path parameters

appstringrequired

Query parameters

member_idstring
role_idstring

Responses

200 OKOK
itemsgrantView[]required
idstringrequired
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "items": [
    {
      "id": "string",
      "member_id": "string",
      "operations": [
        "string"
      ],
      "predicate": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ],
      "read_fields": [
        "string"
      ],
      "resource": "string",
      "role_id": "string",
      "write_fields": [
        "string"
      ]
    }
  ]
}
POST/v1/apps/{app}/grantsAuth

Writes one grant against a member or a role of the org

gateway.Handler.CreateGrant

Path parameters

appstringrequired

Body

application/jsonrequired
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]

Responses

201 CreatedCreated
idstringrequired
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "member_id": "string",
  "operations": [
    "string"
  ],
  "predicate": [
    {
      "field": "string",
      "op": "string",
      "value": null
    }
  ],
  "read_fields": [
    "string"
  ],
  "resource": "string",
  "role_id": "string",
  "write_fields": [
    "string"
  ]
}
201 Created
{
  "id": "string",
  "member_id": "string",
  "operations": [
    "string"
  ],
  "predicate": [
    {
      "field": "string",
      "op": "string",
      "value": null
    }
  ],
  "read_fields": [
    "string"
  ],
  "resource": "string",
  "role_id": "string",
  "write_fields": [
    "string"
  ]
}
PUT/v1/apps/{app}/grants/{grant}Auth

Replaces what one grant of the org permits

The subject columns are not editable here. Moving a grant from one member to another is a different grant, and writing it as an edit would leave the audit trail saying a scope changed when a person did.

gateway.Handler.UpdateGrant

Path parameters

appstringrequired
grantstringrequired

Body

application/jsonrequired
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]

Responses

200 OKOK
idstringrequired
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "member_id": "string",
  "operations": [
    "string"
  ],
  "predicate": [
    {
      "field": "string",
      "op": "string",
      "value": null
    }
  ],
  "read_fields": [
    "string"
  ],
  "resource": "string",
  "role_id": "string",
  "write_fields": [
    "string"
  ]
}
200 OK
{
  "id": "string",
  "member_id": "string",
  "operations": [
    "string"
  ],
  "predicate": [
    {
      "field": "string",
      "op": "string",
      "value": null
    }
  ],
  "read_fields": [
    "string"
  ],
  "resource": "string",
  "role_id": "string",
  "write_fields": [
    "string"
  ]
}
DELETE/v1/apps/{app}/grants/{grant}Auth

Removes one grant of the org

gateway.Handler.DeleteGrant

Path parameters

appstringrequired
grantstringrequired

Responses

204 No ContentNo Content

No response body.

400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

400 Bad Request
{
  "error": "string"
}

Members

GET/v1/apps/{app}/membersAuth

Returns the members of the org that owns the resolved app

The org comes from the resolved app and never from the request, so a caller naming an app reads that app's org and there is no parameter that could name another. Membership is org-scoped because one person signs in once and belongs to many orgs.

gateway.Handler.ListMembers

Path parameters

appstringrequired

Responses

200 OKOK
itemsmemberView[]required
assignmentsassignmentView[]
idstringrequired
role_idstringrequired
role_namestringrequired
scopeFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

created_atstringrequired
emailstringrequired
idstringrequired
issuerstring
role_idstring
statusstringrequired
subjectstring
updated_atstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "items": [
    {
      "assignments": [
        {
          "id": "string",
          "role_id": "string",
          "role_name": "string",
          "scope": [
            {
              "field": "string",
              "op": "string",
              "value": null
            }
          ]
        }
      ],
      "created_at": "string",
      "email": "string",
      "id": "string",
      "issuer": "string",
      "role_id": "string",
      "status": "string",
      "subject": "string",
      "updated_at": "string"
    }
  ]
}
POST/v1/apps/{app}/membersAuth

Writes a pending membership row addressed to an email

It writes a row and nothing else. The customer's IdP is theirs, and the platform only ever reads claims out of the tokens it mints, so nothing here creates a directory user, sends a directory invitation, or otherwise reaches into it. The row waits until the person signs in on their own and their verified email claims it.

gateway.Handler.InviteMember

Path parameters

appstringrequired

Body

application/jsonrequired
assignmentsassignmentInput[]
role_idstringrequired
scopeFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

emailstringrequired
role_idunknown

Is raw rather than a *string because a json null and an absent key both decode to a nil pointer, and here they mean opposite things.

Responses

201 CreatedCreated
assignmentsassignmentView[]
idstringrequired
role_idstringrequired
role_namestringrequired
scopeFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

created_atstringrequired
emailstringrequired
idstringrequired
issuerstring
role_idstring
statusstringrequired
subjectstring
updated_atstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
409 Conflictthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "assignments": [
    {
      "role_id": "string",
      "scope": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ]
    }
  ],
  "email": "string",
  "role_id": null
}
201 Created
{
  "assignments": [
    {
      "id": "string",
      "role_id": "string",
      "role_name": "string",
      "scope": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ]
    }
  ],
  "created_at": "string",
  "email": "string",
  "id": "string",
  "issuer": "string",
  "role_id": "string",
  "status": "string",
  "subject": "string",
  "updated_at": "string"
}
PUT/v1/apps/{app}/members/{member}Auth

Changes what one member of the org may do

The legacy single role and the scoped assignments are both writable here, because they are two ways of saying the same thing and a member carries whichever of them the customer wrote. Assignments, when the body names them, replace the member's set wholesale rather than merging into it, which is what lets a client take one away without knowing the id it was written under.

gateway.Handler.UpdateMember

Path parameters

appstringrequired
memberstringrequired

Body

application/jsonrequired
assignmentsassignmentInput[]
role_idstringrequired
scopeFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

emailstringrequired
role_idunknown

Is raw rather than a *string because a json null and an absent key both decode to a nil pointer, and here they mean opposite things.

Responses

200 OKOK
assignmentsassignmentView[]
idstringrequired
role_idstringrequired
role_namestringrequired
scopeFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

created_atstringrequired
emailstringrequired
idstringrequired
issuerstring
role_idstring
statusstringrequired
subjectstring
updated_atstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "assignments": [
    {
      "role_id": "string",
      "scope": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ]
    }
  ],
  "email": "string",
  "role_id": null
}
200 OK
{
  "assignments": [
    {
      "id": "string",
      "role_id": "string",
      "role_name": "string",
      "scope": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ]
    }
  ],
  "created_at": "string",
  "email": "string",
  "id": "string",
  "issuer": "string",
  "role_id": "string",
  "status": "string",
  "subject": "string",
  "updated_at": "string"
}
DELETE/v1/apps/{app}/members/{member}Auth

Deletes one membership row

Deleting the row takes the grants that hang off it with it, which is the point. Nothing about the identity at the IdP changes, because that directory belongs to the customer and this platform only ever read claims out of it.

gateway.Handler.RemoveMember

Path parameters

appstringrequired
memberstringrequired

Responses

204 No ContentNo Content

No response body.

400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

400 Bad Request
{
  "error": "string"
}

Roles

GET/v1/apps/{app}/rolesAuth

Returns the roles the org may assign, its own first and the shipped defaults after, each with the grants it carries

It answers to members:read, since a role list says what the permission model of this org looks like and nothing else.

gateway.Handler.ListRoles

Path parameters

appstringrequired

Responses

200 OKOK
itemsroleView[]required
descriptionstringrequired
grantsgrantView[]
idstringrequired
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]
idstringrequired
namestringrequired
org_idstring
shipped_versioninteger (int64)
slugstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "items": [
    {
      "description": "string",
      "grants": [
        {
          "id": "string",
          "member_id": "string",
          "operations": [
            "string"
          ],
          "predicate": [
            {
              "field": "string",
              "op": "string",
              "value": null
            }
          ],
          "read_fields": [
            "string"
          ],
          "resource": "string",
          "role_id": "string",
          "write_fields": [
            "string"
          ]
        }
      ],
      "id": "string",
      "name": "string",
      "org_id": "string",
      "shipped_version": 0,
      "slug": "string"
    }
  ]
}
POST/v1/apps/{app}/rolesAuth

Writes one of the org's own roles, with the grants it was given

The role is the org's from the first byte. There is no route that creates a shipped default, because those are the product's own and arrive with the binary rather than through an API a customer holds.

gateway.Handler.CreateRole

Path parameters

appstringrequired

Body

application/jsonrequired
descriptionstring
grantsgrantInput[]
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]
namestring

Responses

201 CreatedCreated
descriptionstringrequired
grantsgrantView[]
idstringrequired
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]
idstringrequired
namestringrequired
org_idstring
shipped_versioninteger (int64)
slugstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "description": "string",
  "grants": [
    {
      "member_id": "string",
      "operations": [
        "string"
      ],
      "predicate": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ],
      "read_fields": [
        "string"
      ],
      "resource": "string",
      "role_id": "string",
      "write_fields": [
        "string"
      ]
    }
  ],
  "name": "string"
}
201 Created
{
  "description": "string",
  "grants": [
    {
      "id": "string",
      "member_id": "string",
      "operations": [
        "string"
      ],
      "predicate": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ],
      "read_fields": [
        "string"
      ],
      "resource": "string",
      "role_id": "string",
      "write_fields": [
        "string"
      ]
    }
  ],
  "id": "string",
  "name": "string",
  "org_id": "string",
  "shipped_version": 0,
  "slug": "string"
}
PUT/v1/apps/{app}/roles/{role}Auth

Edits one of the org's own roles

Naming a shipped default is refused rather than ignored, since that row is shared by every org and one customer editing it would edit all of them.

gateway.Handler.UpdateRole

Path parameters

appstringrequired
rolestringrequired

Body

application/jsonrequired
descriptionstring
grantsgrantInput[]
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]
namestring

Responses

200 OKOK
descriptionstringrequired
grantsgrantView[]
idstringrequired
member_idstring
operationsstring[]
predicateFilter[]
fieldstringrequired

Is the name of the field to compare.

opFilterOprequired

Is a comparison or membership operator used in queries.

valueunknown

Is the operand.

read_fieldsstring[]
resourcestringrequired
role_idstring
write_fieldsstring[]
idstringrequired
namestringrequired
org_idstring
shipped_versioninteger (int64)
slugstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "description": "string",
  "grants": [
    {
      "member_id": "string",
      "operations": [
        "string"
      ],
      "predicate": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ],
      "read_fields": [
        "string"
      ],
      "resource": "string",
      "role_id": "string",
      "write_fields": [
        "string"
      ]
    }
  ],
  "name": "string"
}
200 OK
{
  "description": "string",
  "grants": [
    {
      "id": "string",
      "member_id": "string",
      "operations": [
        "string"
      ],
      "predicate": [
        {
          "field": "string",
          "op": "string",
          "value": null
        }
      ],
      "read_fields": [
        "string"
      ],
      "resource": "string",
      "role_id": "string",
      "write_fields": [
        "string"
      ]
    }
  ],
  "id": "string",
  "name": "string",
  "org_id": "string",
  "shipped_version": 0,
  "slug": "string"
}
DELETE/v1/apps/{app}/roles/{role}Auth

Removes one of the org's own roles

Its grants go with it, since a grant whose role is gone can never be expanded and would sit in the table unreachable. The assignments pointing at it are left standing and simply stop resolving, which costs their holders the role's permissions and none of the ones they hold elsewhere.

gateway.Handler.DeleteRole

Path parameters

appstringrequired
rolestringrequired

Responses

204 No ContentNo Content

No response body.

400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

400 Bad Request
{
  "error": "string"
}

Tables

GET/v1/apps/{app}/tables/{table}/recordsAuth

Lists records from the resolved app's table

gateway.Handler.QueryRecords

Path parameters

appstringrequired
tablestringrequired

Query parameters

pagestring
limitstring
sortstring
include_deletedstring
filtersstring
searchstring

Responses

200 OKOK
itemsRecord[]

Are the records returned for the current page.

limitinteger (int64)required

Is the page size that was applied to the query.

pageinteger (int64)required

Is the 1-based page number derived from the request's Offset/Limit.

searchListSearchResult[]
fieldstringrequired
highlightinteger (int64)[][]

[[1,6]]

idstringrequired
valuestringrequired
totalinteger (int64)required

Is the total number of records matching the query across all pages (i.e.

500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "items": [
    {}
  ],
  "limit": 0,
  "page": 0,
  "search": [
    {
      "field": "string",
      "highlight": [
        [
          0
        ]
      ],
      "id": "string",
      "value": "string"
    }
  ],
  "total": 0
}
POST/v1/apps/{app}/tables/{table}/recordsAuth

Inserts a record into the resolved app's table

gateway.Handler.CreateRecord

Path parameters

appstringrequired
tablestringrequired

Body

application/jsonrequired
Record

Is an untyped key-value map representing a single row.

Responses

201 CreatedCreated
Record

Is an untyped key-value map representing a single row.

400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{}
201 Created
{}
GET/v1/apps/{app}/tables/{table}/records/{record}Auth

Returns a single record from the resolved app's table

gateway.Handler.GetRecord

Path parameters

appstringrequired
tablestringrequired
recordstringrequired

Responses

200 OKOK
Record

Is an untyped key-value map representing a single row.

403 Forbiddenthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{}
PUT/v1/apps/{app}/tables/{table}/records/{record}Auth

Merges a patch into a record in the resolved app's table

gateway.Handler.UpdateRecord

Path parameters

appstringrequired
tablestringrequired
recordstringrequired

Body

application/jsonrequired
Record

Is an untyped key-value map representing a single row.

Responses

200 OKOK
Record

Is an untyped key-value map representing a single row.

400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{}
200 OK
{}
DELETE/v1/apps/{app}/tables/{table}/records/{record}Auth

Soft-deletes a record in the resolved app's table

gateway.Handler.DeleteRecord

Path parameters

appstringrequired
tablestringrequired
recordstringrequired

Responses

204 No ContentNo Content

No response body.

403 Forbiddenthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

403 Forbidden
{
  "error": "string"
}
GET/v1/apps/{app}/tables/{table}/records/{record}/files/{field}Auth

Streams a file field's blob from the resolved app's database

gateway.Handler.DownloadFile

Path parameters

appstringrequired
tablestringrequired
recordstringrequired
fieldstringrequired

Responses

200 OKOK
string
403 Forbiddenthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
"string"
POST/v1/apps/{app}/tables/{table}/records/{record}/files/{field}Auth

Writes a multipart file part onto a record's file field in the resolved app's database

The bytes stream into the blob store and the key it returns is stamped onto the field through an ordinary record update, so an uploaded file carries the same version row, audit entry and change event as any other field change, and the response is the updated record. It dispatches record.updated for the same reason: to a webhook consumer an upload is a record whose field changed, and hiding that behind a separate surface would mean a consumer tracking a table misses it.

gateway.Handler.UploadFile

Path parameters

appstringrequired
tablestringrequired
recordstringrequired
fieldstringrequired

Responses

200 OKOK
Record

Is an untyped key-value map representing a single row.

400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
413 Payload Too Largethe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{}
GET/v1/apps/{app}/tables/{table}/records/{record}/historyAuth

Returns every stored version of a record

gateway.Handler.GetRecordHistory

Path parameters

appstringrequired
tablestringrequired
recordstringrequired

Responses

200 OKOK
itemsRecord[]

Are the records returned for the current page.

limitinteger (int64)required

Is the page size that was applied to the query.

pageinteger (int64)required

Is the 1-based page number derived from the request's Offset/Limit.

searchListSearchResult[]
fieldstringrequired
highlightinteger (int64)[][]

[[1,6]]

idstringrequired
valuestringrequired
totalinteger (int64)required

Is the total number of records matching the query across all pages (i.e.

403 Forbiddenthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "items": [
    {}
  ],
  "limit": 0,
  "page": 0,
  "search": [
    {
      "field": "string",
      "highlight": [
        [
          0
        ]
      ],
      "id": "string",
      "value": "string"
    }
  ],
  "total": 0
}
POST/v1/apps/{app}/tables/{table}/records/bulkAuth

Applies one operation across many records in the resolved app's table, then emits a single records.bulk webhook event describing the batch

Every record is checked against the same row and field rule a single-record call applies, and the whole call is decided before any of it runs. A bulk route that checked as it went would be the way around a per-record rule: the first few writes would land and only then would the caller be refused, which is a partial apply nobody asked for and no client can unwind. So one forbidden record refuses the batch, and the response names which.

gateway.Handler.BulkRecords

Path parameters

appstringrequired
tablestringrequired

Body

application/jsonrequired
idsstring[]
opstringrequired
patchRecord

Is an untyped key-value map representing a single row.

recordsRecord[]

Responses

200 OKOK
createdinteger (int64)
deletedinteger (int64)
idsstring[]
opstringrequired
updatedinteger (int64)
400 Bad Requestthe request could not be completed
errorstringrequired
403 ForbiddenForbidden
errorstringrequired
opstringrequired
refusedstring[]
rejected_fieldsstring[]
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "ids": [
    "string"
  ],
  "op": "string",
  "patch": {},
  "records": [
    {}
  ]
}
200 OK
{
  "created": 0,
  "deleted": 0,
  "ids": [
    "string"
  ],
  "op": "string",
  "updated": 0
}
GET/v1/apps/{app}/tables/{table}/schemaAuth

Returns the resolved app table's schema (its fields and flags) as JSON, read-only

It unblocks a client-side records grid that needs column and field-type information; schema mutation stays control-plane.

gateway.Handler.GetTableSchema

Path parameters

appstringrequired
tablestringrequired

Responses

200 OKOK
auditedboolean

Enables per-write audit logging for this table.

configunknown

Is opaque JSON configuration for the table, persisted in the _schema_tables meta-table.

descriptionstring

Is an optional human-readable summary surfaced in generated documentation and GUI tooling.

fieldsField[]

Is the ordered list of user-defined columns on the table.

defaultunknown

Is the value applied when a record is inserted (or a form is rendered) without an explicit value for this field.

default_sourcestring

Declares the origin of a dynamic default value when the server has resolved one into Default.

descriptionstring

Is a human-readable explanation of the field's purpose.

labelstring

Is the UI label for the field.

namestringrequired

Is the column / input name.

option_labelsstring[]

Is a parallel array to Options that carries display labels for enum values.

optionsstring[]

Is the ordered list of permitted string values for FieldTypeEnum.

related_fieldstring

Is the name of the foreign-key field on the related table.

related_tablestring

Is the name of the target table for relation fields.

relation_label_fieldstring

Names the field on the related record that the UI should show as the dropdown label.

requiredboolean

Marks the field as non-nullable / mandatory.

typeFieldTyperequired

Enumerates the supported field data types.

indexesIndex[]

Is the optional list of secondary indexes defined on the table.

fieldsstring[]

Is the ordered list of field names covered by the index.

namestringrequired

Is the index identifier and must be unique within its table.

uniqueboolean

Enforces that no two records share the same value combination for the indexed fields.

namestringrequired

Is the table identifier and must be unique within a Schema.

versionedboolean

Adds the per-record `version` counter and `version_owner_id` columns to this table.

500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "audited": true,
  "config": null,
  "description": "string",
  "fields": [
    {
      "default": null,
      "default_source": "string",
      "description": "string",
      "label": "string",
      "name": "string",
      "option_labels": [
        "string"
      ],
      "options": [
        "string"
      ],
      "related_field": "string",
      "related_table": "string",
      "relation_label_field": "string",
      "required": true,
      "type": "string"
    }
  ],
  "indexes": [
    {
      "fields": [
        "string"
      ],
      "name": "string",
      "unique": true
    }
  ],
  "name": "string",
  "versioned": true
}

Vocabulary

GET/v1/apps/{app}/vocabularyAuth

Serves the product's resources and the operations each declares

It is the manifest the running code decides with, not a second list written beside it, so a grants UI offers exactly the resources a decision can match and a customer cannot write a grant that is unreachable from every route.

gateway.Handler.GetVocabulary

Path parameters

appstringrequired

Responses

200 OKOK
resourcesresourceView[]required
namestringrequired
operationsstring[]
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "resources": [
    {
      "name": "string",
      "operations": [
        "string"
      ]
    }
  ]
}

Webhooks

GET/v1/apps/{app}/webhooksAuth

Returns the webhooks configured on the resolved app, without their signing secrets

gateway.Handler.ListWebhooks

Path parameters

appstringrequired

Responses

200 OKOK
webhookswebhookView[]required
app_idstringrequired
created_by_user_idstring
descriptionstringrequired
enabledbooleanrequired
eventsstring[]
idstringrequired
last_delivery_atstring
secret_last4stringrequired
urlstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "webhooks": [
    {
      "app_id": "string",
      "created_by_user_id": "string",
      "description": "string",
      "enabled": true,
      "events": [
        "string"
      ],
      "id": "string",
      "last_delivery_at": "string",
      "secret_last4": "string",
      "url": "string"
    }
  ]
}
POST/v1/apps/{app}/webhooksAuth

Registers a webhook for the resolved app

A generated secret is returned once in the create response and never again.

gateway.Handler.CreateWebhook

Path parameters

appstringrequired

Body

application/jsonrequired
descriptionstringrequired
eventsstring[]
secretstringrequired
urlstringrequired

Responses

201 CreatedCreated
app_idstringrequired
created_by_user_idstring
descriptionstringrequired
enabledbooleanrequired
eventsstring[]
idstringrequired
last_delivery_atstring
secretstringrequired
secret_last4stringrequired
urlstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "description": "string",
  "events": [
    "string"
  ],
  "secret": "string",
  "url": "string"
}
201 Created
{
  "app_id": "string",
  "created_by_user_id": "string",
  "description": "string",
  "enabled": true,
  "events": [
    "string"
  ],
  "id": "string",
  "last_delivery_at": "string",
  "secret": "string",
  "secret_last4": "string",
  "url": "string"
}
DELETE/v1/apps/{app}/webhooks/{id}Auth

Removes a webhook scoped to the resolved app

gateway.Handler.DeleteWebhook

Path parameters

appstringrequired
idstringrequired

Responses

204 No ContentNo Content

No response body.

404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

404 Not Found
{
  "error": "string"
}
GET/v1/apps/{app}/webhooks/{id}/deliveriesAuth

Returns the most recent delivery attempts for a webhook

gateway.Handler.ListWebhookDeliveries

Path parameters

appstringrequired
idstringrequired

Responses

200 OKOK
deliveriesWebhookDelivery[]required
app_idstringrequired
attemptsinteger (int64)required
delivered_atstring
errorstring
eventstringrequired
idstringrequired
response_codeinteger (int64)required
statusstringrequired
webhook_idstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "deliveries": [
    {
      "app_id": "string",
      "attempts": 0,
      "delivered_at": "string",
      "error": "string",
      "event": "string",
      "id": "string",
      "response_code": 0,
      "status": "string",
      "webhook_id": "string"
    }
  ]
}