/projects/{project_id}/branches/{branch_id}/functionsList functions on the branchLists functions on the specified branch.
Note: This endpoint is currently in Beta.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
cursorstringqueryA cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list.
limitintegerquerySpecify a value from 1 to 1000 to limit number of functions in the response
Responses
allOf · 2 options
functionsarray of objectrequiredShow child attributes
Show array items
active_deploymentvalueThe most recent deployment whose build completed successfully. This is the deployment that serves invocations. Omitted until a deployment succeeds.
Show child attributes
allOf · 1 option
created_atstringrequiredenvironmentarray of stringThe NAMES of the deployment's environment variables, sorted. Values are encrypted at rest and are never returned — they are write-only. To change a value, deploy the variable with the new value; to remove a variable, deploy it with an empty value.
Show child attributes
errorstringHuman-readable reason the deployment build failed. Present only when `status` is `failed`.
idinteger · int32requiredThe deployment id, which is the platform version number (monotonic per function).
memory_mibinteger · int32requiredruntimestringrequiredstatusstringrequiredBuild lifecycle status of the deployment.
created_atstringrequiredcurrent_deploymentvalueThe most recent deployment, regardless of build status. It may still be building or it may have failed. Omitted until the first deployment is created.
Show child attributes
allOf · 1 option
idstringrequiredOpaque, stable function identifier.
invocation_urlstringrequiredURL at which the function is invoked. The host carries `<branch_id>-<slug>` as its first DNS label under a Neon-managed functions domain, and the URL ends with a trailing slash so paths concatenate onto it. Empty string when the function has no servable invoke host (e.g. a deployment without an invocation front-door).
namestringrequiredFree-form display name.
slugstringrequiredBranch-unique, lowercase DNS-label. Forms the invocation URL's host together with the branch id. Immutable.
paginationobjectTo paginate the response, issue an initial request with `limit` value. Then, add the value returned in the response `.pagination.next` attribute into the request under the `cursor` query parameter to the subsequent request to retrieve next page in pagination. The contents on cursor `next` are opaque, clients are not expected to make any assumptions on the format of the data inside the cursor.
Show child attributes
nextstringCursor for the next page of results. Pass it as the `cursor` query parameter on the next request. Absent on the last page.
sort_bystringField by which the results were sorted, echoing the request's sort_by parameter.
sort_orderstringSort order active for this page. Pass back as `sort_order` in the next request to maintain consistent ordering. Valid values are `asc` and `desc`.
{
"functions": [
{
"active_deployment": {
"created_at": "string",
"environment": [
"string"
],
"error": "string",
"id": 0,
"memory_mib": 0,
"runtime": "string",
"status": "building"
},
"created_at": "string",
"current_deployment": {
"created_at": "string",
"environment": [
"string"
],
"error": "string",
"id": 0,
"memory_mib": 0,
"runtime": "string",
"status": "building"
},
"id": "string",
"invocation_url": "string",
"name": "string",
"slug": "string"
}
],
"pagination": {
"next": "string",
"sort_by": "string",
"sort_order": "string"
}
}codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}