Function Files

REST endpoints for function files. Bearer-auth required.

GET /api/function-files

List function files.

Query parameters

  • limit (optional): Page size (1–100, default 100).
  • after (optional): Keyset cursor — return the page after this row (next page).
  • before (optional): Keyset cursor — return the page before this row (prev page).
  • ids (optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).
  • filter (optional): Nested filter expression (<Entity>Filter): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.
  • orderBy (optional): Multi-key sort (<Entity>OrderBy[]): array of { field: direction } applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.
  • version_id (optional): Optional version narrower. Admins see every file when omitted; non-admin callers must scope by version.

Response

JSON
{
  "data": [
    {
      "id": "<...>",
      "versionId": "<...>",
      "name": "<...>",
      "source": "<...>",
      "createdAt": "<...>"
    }
  ],
  "pageInfo": {
    "total": "number",
    "hasNextPage": "boolean",
    "hasPreviousPage": "boolean",
    "startCursor": "string",
    "endCursor": "string"
  }
}

POST /api/function-files

Create function file

Request body

JSON
{
  "versionId": "string",
  "name": "string",
  "source": "string"
}

Response

JSON
{
  "id": "string",
  "versionId": "string",
  "name": "string",
  "source": "string",
  "createdAt": "string"
}

GET /api/function-files/{id}

Get a function file by ID.

Path parameters

  • id (required): Function file to retrieve.

Response

JSON
{
  "id": "string",
  "versionId": "string",
  "name": "string",
  "source": "string",
  "createdAt": "string"
}

PATCH /api/function-files/{id}

Update function file

Path parameters

  • id (required): The function file's prefixed ID (e.g. funfil_...).

Request body

JSON
{
  "name?": "string",
  "source?": "string"
}

Response

JSON
{
  "id": "string",
  "versionId": "string",
  "name": "string",
  "source": "string",
  "createdAt": "string"
}

DELETE /api/function-files/{id}

Delete a function file.

Path parameters

  • id (required): Function file to delete.

Response

JSON
{
  "success": "boolean"
}