Admin

Run SQL (retiring for the service key; use POST /projects/v1/{project_id}/sql)

Retiring for service-key callers: use POST /projects/v1/{project_id}/sql, which takes the same key and body and returns the same shape. Service-key calls here are counted; once the route warns, responses carry Deprecation, Sunset, and Link (rel=successor-version) headers and a ROUTE_RETIRING warning, and once retired they answer 410 ROUTE_RETIRED with a use_successor next action. Platform-admin-key calls (staff diagnostics) keep this route: they run inside a PostgreSQL read-only transaction, and any write is refused with 403 ADMIN_SQL_READ_ONLY.

post/projects/v1/admin/{project_id}/sql

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/projects/v1/admin/{project_id}/sql
  • Auth: HTTP bearer

Path parameters

project_idstring required

Run402 project ID. Public IDs are not UUIDs.

Example:prj_1741340000_0042

Request body

sqlstring required

SQL statement(s) to execute

Response

SQL executed

statusstring
schemastring
rowsobject[]
row_countinteger

Rows returned or affected by the last statement: the statement whose rows and fields are returned.

Example response

{
  "status": "ok",
  "warnings": [
    {
      "severity": "warning"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.