REST API
Gateway
Derived from the source of github.com/awee-ai/api/cmd/gateway.
Awee Gateway API · v1.0.0 · 28 endpoints
Automations
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
appstringrequiredautomationstringrequiredResponses
200 OKOK
automation_idstringrequiredoutputsobjectrun_idstringstatusstringrequired202 AcceptedAccepted
automation_idstringrequiredoutputsobjectrun_idstringstatusstringrequired400 Bad Requestthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequired502 Bad Gatewaythe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"automation_id": "string",
"outputs": {},
"run_id": "string",
"status": "string"
}Grants
Returns the org's grants, narrowed to one member or one role when the query names either
gateway.Handler.ListGrants
Path parameters
appstringrequiredQuery parameters
member_idstringrole_idstringResponses
200 OKOK
itemsgrantView[]required
itemsgrantView[]requiredidstringrequiredmember_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"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"
]
}
]
}Writes one grant against a member or a role of the org
gateway.Handler.CreateGrant
Path parameters
appstringrequiredBody
application/jsonrequiredmember_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]Responses
201 CreatedCreated
idstringrequiredmember_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"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",
"member_id": "string",
"operations": [
"string"
],
"predicate": [
{
"field": "string",
"op": "string",
"value": null
}
],
"read_fields": [
"string"
],
"resource": "string",
"role_id": "string",
"write_fields": [
"string"
]
}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
appstringrequiredgrantstringrequiredBody
application/jsonrequiredmember_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]Responses
200 OKOK
idstringrequiredmember_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"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",
"member_id": "string",
"operations": [
"string"
],
"predicate": [
{
"field": "string",
"op": "string",
"value": null
}
],
"read_fields": [
"string"
],
"resource": "string",
"role_id": "string",
"write_fields": [
"string"
]
}Removes one grant of the org
gateway.Handler.DeleteGrant
Path parameters
appstringrequiredgrantstringrequiredResponses
No response body.
400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"error": "string"
}Members
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
appstringrequiredResponses
200 OKOK
itemsmemberView[]required
itemsmemberView[]requiredassignmentsassignmentView[]
assignmentsassignmentView[]idstringrequiredrole_idstringrequiredrole_namestringrequiredscopeFilter[]
scopeFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
created_atstringrequiredemailstringrequiredidstringrequiredissuerstringrole_idstringstatusstringrequiredsubjectstringupdated_atstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"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"
}
]
}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
appstringrequiredBody
application/jsonrequiredassignmentsassignmentInput[]
assignmentsassignmentInput[]role_idstringrequiredscopeFilter[]
scopeFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
emailstringrequiredrole_idunknownIs 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[]
assignmentsassignmentView[]idstringrequiredrole_idstringrequiredrole_namestringrequiredscopeFilter[]
scopeFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
created_atstringrequiredemailstringrequiredidstringrequiredissuerstringrole_idstringstatusstringrequiredsubjectstringupdated_atstringrequired400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired409 Conflictthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"assignments": [
{
"role_id": "string",
"scope": [
{
"field": "string",
"op": "string",
"value": null
}
]
}
],
"email": "string",
"role_id": null
}{
"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"
}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
appstringrequiredmemberstringrequiredBody
application/jsonrequiredassignmentsassignmentInput[]
assignmentsassignmentInput[]role_idstringrequiredscopeFilter[]
scopeFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
emailstringrequiredrole_idunknownIs 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[]
assignmentsassignmentView[]idstringrequiredrole_idstringrequiredrole_namestringrequiredscopeFilter[]
scopeFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
created_atstringrequiredemailstringrequiredidstringrequiredissuerstringrole_idstringstatusstringrequiredsubjectstringupdated_atstringrequired400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"assignments": [
{
"role_id": "string",
"scope": [
{
"field": "string",
"op": "string",
"value": null
}
]
}
],
"email": "string",
"role_id": null
}{
"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"
}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
appstringrequiredmemberstringrequiredResponses
No response body.
400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"error": "string"
}Roles
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
appstringrequiredResponses
200 OKOK
itemsroleView[]required
itemsroleView[]requireddescriptionstringrequiredgrantsgrantView[]
grantsgrantView[]idstringrequiredmember_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]idstringrequirednamestringrequiredorg_idstringshipped_versioninteger (int64)slugstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"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"
}
]
}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
appstringrequiredBody
application/jsonrequireddescriptionstringgrantsgrantInput[]
grantsgrantInput[]member_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]namestringResponses
201 CreatedCreated
descriptionstringrequiredgrantsgrantView[]
grantsgrantView[]idstringrequiredmember_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]idstringrequirednamestringrequiredorg_idstringshipped_versioninteger (int64)slugstringrequired400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"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"
}{
"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"
}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
appstringrequiredrolestringrequiredBody
application/jsonrequireddescriptionstringgrantsgrantInput[]
grantsgrantInput[]member_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]namestringResponses
200 OKOK
descriptionstringrequiredgrantsgrantView[]
grantsgrantView[]idstringrequiredmember_idstringoperationsstring[]predicateFilter[]
predicateFilter[]fieldstringrequiredIs the name of the field to compare.
opFilterOprequiredIs a comparison or membership operator used in queries.
valueunknownIs the operand.
read_fieldsstring[]resourcestringrequiredrole_idstringwrite_fieldsstring[]idstringrequirednamestringrequiredorg_idstringshipped_versioninteger (int64)slugstringrequired400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"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"
}{
"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"
}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
appstringrequiredrolestringrequiredResponses
No response body.
400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"error": "string"
}Tables
Lists records from the resolved app's table
gateway.Handler.QueryRecords
Path parameters
appstringrequiredtablestringrequiredQuery parameters
pagestringlimitstringsortstringinclude_deletedstringfiltersstringsearchstringResponses
200 OKOK
itemsRecord[]Are the records returned for the current page.
limitinteger (int64)requiredIs the page size that was applied to the query.
pageinteger (int64)requiredIs the 1-based page number derived from the request's Offset/Limit.
searchListSearchResult[]
searchListSearchResult[]fieldstringrequiredhighlightinteger (int64)[][][[1,6]]
idstringrequiredvaluestringrequiredtotalinteger (int64)requiredIs the total number of records matching the query across all pages (i.e.
500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"items": [
{}
],
"limit": 0,
"page": 0,
"search": [
{
"field": "string",
"highlight": [
[
0
]
],
"id": "string",
"value": "string"
}
],
"total": 0
}Inserts a record into the resolved app's table
gateway.Handler.CreateRecord
Path parameters
appstringrequiredtablestringrequiredBody
application/jsonrequiredIs an untyped key-value map representing a single row.
Responses
201 CreatedCreated
Is an untyped key-value map representing a single row.
400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{}{}Returns a single record from the resolved app's table
gateway.Handler.GetRecord
Path parameters
appstringrequiredtablestringrequiredrecordstringrequiredResponses
200 OKOK
Is an untyped key-value map representing a single row.
403 Forbiddenthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{}Merges a patch into a record in the resolved app's table
gateway.Handler.UpdateRecord
Path parameters
appstringrequiredtablestringrequiredrecordstringrequiredBody
application/jsonrequiredIs an untyped key-value map representing a single row.
Responses
200 OKOK
Is an untyped key-value map representing a single row.
400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{}{}Soft-deletes a record in the resolved app's table
gateway.Handler.DeleteRecord
Path parameters
appstringrequiredtablestringrequiredrecordstringrequiredResponses
No response body.
403 Forbiddenthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"error": "string"
}Streams a file field's blob from the resolved app's database
gateway.Handler.DownloadFile
Path parameters
appstringrequiredtablestringrequiredrecordstringrequiredfieldstringrequiredResponses
200 OKOK
403 Forbiddenthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
"string"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
appstringrequiredtablestringrequiredrecordstringrequiredfieldstringrequiredResponses
200 OKOK
Is an untyped key-value map representing a single row.
400 Bad Requestthe request could not be completed
errorstringrequired403 Forbiddenthe request could not be completed
errorstringrequired413 Payload Too Largethe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{}Returns every stored version of a record
gateway.Handler.GetRecordHistory
Path parameters
appstringrequiredtablestringrequiredrecordstringrequiredResponses
200 OKOK
itemsRecord[]Are the records returned for the current page.
limitinteger (int64)requiredIs the page size that was applied to the query.
pageinteger (int64)requiredIs the 1-based page number derived from the request's Offset/Limit.
searchListSearchResult[]
searchListSearchResult[]fieldstringrequiredhighlightinteger (int64)[][][[1,6]]
idstringrequiredvaluestringrequiredtotalinteger (int64)requiredIs the total number of records matching the query across all pages (i.e.
403 Forbiddenthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"items": [
{}
],
"limit": 0,
"page": 0,
"search": [
{
"field": "string",
"highlight": [
[
0
]
],
"id": "string",
"value": "string"
}
],
"total": 0
}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
appstringrequiredtablestringrequiredBody
application/jsonrequiredidsstring[]opstringrequiredpatchRecordIs an untyped key-value map representing a single row.
recordsRecord[]Responses
200 OKOK
createdinteger (int64)deletedinteger (int64)idsstring[]opstringrequiredupdatedinteger (int64)400 Bad Requestthe request could not be completed
errorstringrequired403 ForbiddenForbidden
errorstringrequiredopstringrequiredrefusedstring[]rejected_fieldsstring[]500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"ids": [
"string"
],
"op": "string",
"patch": {},
"records": [
{}
]
}{
"created": 0,
"deleted": 0,
"ids": [
"string"
],
"op": "string",
"updated": 0
}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
appstringrequiredtablestringrequiredResponses
200 OKOK
auditedbooleanEnables per-write audit logging for this table.
configunknownIs opaque JSON configuration for the table, persisted in the _schema_tables meta-table.
descriptionstringIs an optional human-readable summary surfaced in generated documentation and GUI tooling.
fieldsField[]Is the ordered list of user-defined columns on the table.
fieldsField[]defaultunknownIs the value applied when a record is inserted (or a form is rendered) without an explicit value for this field.
default_sourcestringDeclares the origin of a dynamic default value when the server has resolved one into Default.
descriptionstringIs a human-readable explanation of the field's purpose.
labelstringIs the UI label for the field.
namestringrequiredIs 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_fieldstringIs the name of the foreign-key field on the related table.
related_tablestringIs the name of the target table for relation fields.
relation_label_fieldstringNames the field on the related record that the UI should show as the dropdown label.
requiredbooleanMarks the field as non-nullable / mandatory.
typeFieldTyperequiredEnumerates the supported field data types.
indexesIndex[]Is the optional list of secondary indexes defined on the table.
indexesIndex[]fieldsstring[]Is the ordered list of field names covered by the index.
namestringrequiredIs the index identifier and must be unique within its table.
uniquebooleanEnforces that no two records share the same value combination for the indexed fields.
namestringrequiredIs the table identifier and must be unique within a Schema.
versionedbooleanAdds the per-record `version` counter and `version_owner_id` columns to this table.
500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"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
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
appstringrequiredResponses
200 OKOK
resourcesresourceView[]required
resourcesresourceView[]requirednamestringrequiredoperationsstring[]Defaultthe request could not be completed
errorstringrequiredNo request body.
{
"resources": [
{
"name": "string",
"operations": [
"string"
]
}
]
}Webhooks
Returns the webhooks configured on the resolved app, without their signing secrets
gateway.Handler.ListWebhooks
Path parameters
appstringrequiredResponses
200 OKOK
webhookswebhookView[]required
webhookswebhookView[]requiredapp_idstringrequiredcreated_by_user_idstringdescriptionstringrequiredenabledbooleanrequiredeventsstring[]idstringrequiredlast_delivery_atstringsecret_last4stringrequiredurlstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"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"
}
]
}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
appstringrequiredBody
application/jsonrequireddescriptionstringrequiredeventsstring[]secretstringrequiredurlstringrequiredResponses
201 CreatedCreated
app_idstringrequiredcreated_by_user_idstringdescriptionstringrequiredenabledbooleanrequiredeventsstring[]idstringrequiredlast_delivery_atstringsecretstringrequiredsecret_last4stringrequiredurlstringrequired400 Bad Requestthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"description": "string",
"events": [
"string"
],
"secret": "string",
"url": "string"
}{
"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"
}Removes a webhook scoped to the resolved app
gateway.Handler.DeleteWebhook
Path parameters
appstringrequiredidstringrequiredResponses
No response body.
404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"error": "string"
}Returns the most recent delivery attempts for a webhook
gateway.Handler.ListWebhookDeliveries
Path parameters
appstringrequiredidstringrequiredResponses
200 OKOK
deliveriesWebhookDelivery[]required
deliveriesWebhookDelivery[]requiredapp_idstringrequiredattemptsinteger (int64)requireddelivered_atstringerrorstringeventstringrequiredidstringrequiredresponse_codeinteger (int64)requiredstatusstringrequiredwebhook_idstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"deliveries": [
{
"app_id": "string",
"attempts": 0,
"delivered_at": "string",
"error": "string",
"event": "string",
"id": "string",
"response_code": 0,
"status": "string",
"webhook_id": "string"
}
]
}