/projects/{project_id}/branches/{branch_id}/functions/{slug}Get function detailsReturns the function identified by its slug.
Note: This endpoint is currently in Beta.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
slugstringpathrequiredThe function slug
Responses
functionobjectrequiredShow child attributes
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.
{
"function": {
"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"
}
}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"
}