Skip to content
Subako Docs
English
Esc
↑↓navigate↵open⌘Jpreview

List a function package's versions

GET/v1/functions/{function_id}/versions
Authorization
AuthorizationBearer token · headerrequired
Path parameters
function_idstring<uuid>required
Function package id
Query parameters
limitinteger<int64>
min 1 · max 200
afterstring<uuid>
Rows past this id in `order`'s direction: a page's `next_cursor`.
beforestring<uuid>
Rows just before this id, still in `order`'s direction: a page's `prev_cursor`.
orderOrderParam
Newest first when omitted.
Allowed:ascdesc
Responses
200One page, newest first unless order=asc.
itemsFunctionVersionBody[]required
Show properties
Array of FunctionVersionBody
assetsany | FunctionAssetsBodyrequired
Show properties
One of:
any
any
FunctionAssetsBody
bytesinteger<int64>required
filesFunctionAssetFileBody[]required
Each file the archive holds, in path order.
Show properties
Array of FunctionAssetFileBody
pathstringrequired
The path under `assets/`, `/`-separated.
sha256stringrequired
Hex SHA-256 of the file's bytes.
sizeinteger<int64>required
min 0
sha256stringrequired
created_atstring<date-time>required
function_idstring<uuid>required
idstring<uuid>required
manifestFunctionManifestBodyrequired
What a version serves: the name and description its `subako-package.json` gives, and each tool its module lists.
Show properties
descriptionstringrequired
functionsManifestFunctionBody[]required
Show properties
Array of ManifestFunctionBody
descriptionstringrequired
input_schemaanyrequired
JSON Schema for the tool's arguments.
namestringrequired
output_schemaanyrequired
JSON Schema for the tool's output; `{}` when the tool names none.
namestringrequired
module_bytesinteger<int64>required
module_sha256stringrequired
versioninteger<int32>required
next_cursorstring<uuid> | nullrequired
Pass back as `after` for the next page; `null` on the last page.
prev_cursorstring<uuid> | nullrequired
Pass back as `before` for the previous page; `null` on the first page.
400Bad limit, cursor, order, or path parameter.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
401Missing, malformed, or invalid bearer token.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
403Caller lacks function.read.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
404No such package, or the caller cannot see it.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.us.cloud.subako.ai/v1/functions/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "items": [
    {
      "assets": {},
      "created_at": "2019-08-24T14:15:22Z",
      "function_id": "88972a47-7c82-4b1c-bc75-afe8ae423a46",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "manifest": {
        "description": "string",
        "functions": [
          {
            "description": "string",
            "input_schema": null,
            "name": "string",
            "output_schema": null
          }
        ],
        "name": "string"
      },
      "module_bytes": 0,
      "module_sha256": "string",
      "version": 0
    }
  ],
  "next_cursor": "a7ec8888-a9c3-4732-a281-9a08510f220b",
  "prev_cursor": "2ffdd032-1f96-48c2-8179-571201598694"
}