Skip to content

Get function

GET
/api/v1/projects/{id}/functions/{functionId}
curl --request GET \
--url https://api.deploybase.eu/api/v1/api/v1/projects/example/functions/example \
--header 'Authorization: <Authorization>'

Returns a single serverless function by ID. schedule is null when the function has no active cron schedule, else the schedule detail: the next three fire times, the pause state, the derived consecutive_failures streak, the last run and skip, and the plan’s schedule limits (DEP-247).

id
required
string

Project ID

functionId
required
string

Function ID

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
active
boolean
created_at
string
deployment_id
string
file_path
string
id
string
image_ref
string
kind
string
Allowed values: background http
name
string
project_id
string
runtime
string
Allowed values: nodejs20 nodejs22
schedule

Schedule is null when the function has no active schedule.

object
consecutive_failures

ConsecutiveFailures is derived, not stored: the newest consecutive failures among the last 10 terminal scheduled runs since the failure window last moved (a deploy of changed code or a resume). 10 pauses the schedule.

integer
cron
string
jitter_seconds
integer
last_error
string
last_run_at
string
last_skip_reason
string
Allowed values: overlap missed concurrency_limit team_suspended
last_skipped_at
string
next_runs

NextRuns are the next fire times (slot plus jitter), RFC 3339 UTC. While paused, they are the times a resume right now would lead to.

Array<string>
pause_reason
string
Allowed values: repeated_failures plan_limit
paused_at
string
plan_max_schedules
integer
plan_min_interval_seconds

The plan’s schedule limits. Null when the plan could not be resolved.

integer
skipped_count
integer
source_hash
string
team_id
string
timeout_seconds
integer
updated_at
string

Example

{
"data": {
"kind": "background",
"runtime": "nodejs20",
"schedule": {
"cron": "0 * * * *",
"jitter_seconds": 17,
"last_skip_reason": "overlap",
"next_runs": [
"2026-10-02T13:00:17Z"
],
"pause_reason": "repeated_failures"
}
}
}

Bad Request

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Not Found

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Internal Server Error

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Live 174db30c built