Skip to content

Services ​

Services: configuration, variables, domains, public TCP, volumes, volume files, logs, metrics and shell tickets.

Base URL: https://api.fjordrun.com. Generated from the OpenAPI document (API version 0.1.0).

List services in an environment ​

GET /api/v1/environments/{eid}/services

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
eidpathstring (UUID)yes

Response

200: a list of Service objects.

Example

bash
curl "https://api.fjordrun.com/api/v1/environments/$ENVIRONMENT_ID/services" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Create a service ​

POST /api/v1/projects/{pid}/services

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
pidpathstring (UUID)yes

Request body

FieldTypeRequiredDescription
environment_idstring (UUID)yes
namestringnomax length 100, can be null
kind"web", "worker", "cron", "database", "agent", "function"nodefault "web"
sourceServiceSourcenoPartial objects are allowed: fields you leave out keep their current value (or the default).
configServiceConfignoPartial objects are allowed: fields you leave out keep their current value (or the default). Can be null.
variablesobject (values: string)nocan be null
canvasCanvasInnocan be null

Response

201: a Service object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/projects/$PROJECT_ID/services" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"environment_id":"00000000-0000-0000-0000-000000000000"}'

Get service ​

GET /api/v1/services/{sid}

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Response

200: a Service object.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Update a service ​

PATCH /api/v1/services/{sid}

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
namestringnomin length 1, max length 100, can be null
iconstringnomax length 100, can be null
canvasCanvasInnocan be null

Response

200: a Service object.

Example

bash
curl -X PATCH "https://api.fjordrun.com/api/v1/services/$SERVICE_ID" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}'

Delete service ​

DELETE /api/v1/services/{sid}

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes

Response

204: no content.

Example

bash
curl -X DELETE "https://api.fjordrun.com/api/v1/services/$SERVICE_ID" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Update build and runtime settings ​

PATCH /api/v1/services/{sid}/config

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
sourceServiceSourcenoPartial objects are allowed: fields you leave out keep their current value (or the default). Can be null.
configServiceConfignoPartial objects are allowed: fields you leave out keep their current value (or the default). Can be null.

Response

200: a Service object.

Example

bash
curl -X PATCH "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/config" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"source":{"type":"empty"}}'

Get service variables ​

GET /api/v1/services/{sid}/variables

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Response

200: a Variables object.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/variables" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Replace service variables ​

PUT /api/v1/services/{sid}/variables

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
variablesobject (values: string)yes

Response

200: a Variables object.

Example

bash
curl -X PUT "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/variables" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"variables":{}}'

Update service variables ​

PATCH /api/v1/services/{sid}/variables

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
variablesobject (values: string)yes

Response

200: a Variables object.

Example

bash
curl -X PATCH "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/variables" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"variables":{}}'

Get connection details ​

GET /api/v1/services/{sid}/access

Login/connection details for template services, with values filled in from the service's variables.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Response

200: a Connection details object.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/access" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Get shared variables ​

GET /api/v1/environments/{eid}/shared-variables

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
eidpathstring (UUID)yes

Response

200: a Variables object.

Example

bash
curl "https://api.fjordrun.com/api/v1/environments/$ENVIRONMENT_ID/shared-variables" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Replace shared variables ​

PUT /api/v1/environments/{eid}/shared-variables

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
eidpathstring (UUID)yes

Request body

FieldTypeRequiredDescription
variablesobject (values: string)yes

Response

200: a Variables object.

Example

bash
curl -X PUT "https://api.fjordrun.com/api/v1/environments/$ENVIRONMENT_ID/shared-variables" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"variables":{}}'

Update shared variables ​

PATCH /api/v1/environments/{eid}/shared-variables

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
eidpathstring (UUID)yes

Request body

FieldTypeRequiredDescription
variablesobject (values: string)yes

Response

200: a Variables object.

Example

bash
curl -X PATCH "https://api.fjordrun.com/api/v1/environments/$ENVIRONMENT_ID/shared-variables" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"variables":{}}'

Service metrics ​

GET /api/v1/services/{sid}/metrics

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null
rangequery"1h", "6h", "24h", "7d"nodefault "1h"

Response

200: JSON.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/metrics" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Get service usage ​

GET /api/v1/services/{sid}/usage

Billing-period-to-date actual usage and cost of the service, against its allocation.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Response

200: JSON.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/usage" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Stream live metrics ​

GET /api/v1/services/{sid}/metrics/live

Server-sent events with the service's current usage every few seconds (the "Live" metrics view).

Authentication: a team API token or personal access token.

Response: a stream of Server-Sent Events. Browsers cannot set headers on an EventSource, so the token may also be passed as the token query parameter.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null
tokenquerystringnocan be null

Response

200: JSON.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/metrics/live" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Service logs ​

GET /api/v1/services/{sid}/logs

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null
searchquerystringnocan be null
levelquery"info", "warn", "error"nocan be null
limitqueryintegernomin 1, max 2000, default 200

Response

200: a list of Log line objects.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/logs" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Deploy a service ​

POST /api/v1/services/{sid}/deploy

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Response

200: a Deployment object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/deploy" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

List deployments ​

GET /api/v1/services/{sid}/deployments

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null
limitqueryintegernomin 1, max 200, default 30

Response

200: a list of Deployment objects.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/deployments" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Add a custom domain ​

POST /api/v1/services/{sid}/domains

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
hostnamestringnomax length 253, can be null
target_portintegernomin 1, max 65535, can be null

Response

201: a Domain object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/domains" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"string"}'

Verify a custom domain ​

POST /api/v1/domains/{did}/verify

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
didpathstring (UUID)yes

Response

200: a Domain object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/domains/$DOMAIN_ID/verify" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Remove a custom domain ​

DELETE /api/v1/domains/{did}

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
didpathstring (UUID)yes

Response

204: no content.

Example

bash
curl -X DELETE "https://api.fjordrun.com/api/v1/domains/$DOMAIN_ID" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Enable public TCP access ​

POST /api/v1/services/{sid}/tcp-proxy

Expose a port of the service through the shared TCP proxy: clients connect to the returned host and port (a free port from 20000-29999). For databases and other non-HTTP services; Hobby plan or higher.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
target_portintegeryesmin 1, max 65535

Response

201: a Public TCP port object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/tcp-proxy" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"target_port":1}'

Disable public TCP access ​

DELETE /api/v1/services/{sid}/tcp-proxy/{port}

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
portpathintegeryes

Response

204: no content.

Example

bash
curl -X DELETE "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/tcp-proxy/$TCP_PROXY_PORT" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Add a volume ​

POST /api/v1/services/{sid}/volume

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
mount_pathstringyesmin length 1, max length 255, pattern ^/.*
size_gbintegernomin 1, max 10000, default 5

Response

201: a Volume object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/volume" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mount_path":"string"}'

Resize a volume ​

PATCH /api/v1/volumes/{vid}

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
vidpathstring (UUID)yes

Request body

FieldTypeRequiredDescription
size_gbintegeryesmin 1, max 10000

Response

200: a Volume object.

Example

bash
curl -X PATCH "https://api.fjordrun.com/api/v1/volumes/$VOLUME_ID" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"size_gb":1}'

Delete volume ​

DELETE /api/v1/volumes/{vid}

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
vidpathstring (UUID)yes

Response

204: no content.

Example

bash
curl -X DELETE "https://api.fjordrun.com/api/v1/volumes/$VOLUME_ID" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

List running replicas ​

GET /api/v1/services/{sid}/replicas

Running replicas (pods) of the service: the targets for a shell.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Response

200: a list of Replica objects.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/replicas" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Create a shell ticket ​

POST /api/v1/services/{sid}/shell/ticket

A one-time ticket for the shell WebSocket, valid for 30 seconds.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

An empty object.

Response

201: a Shell ticket object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/shell/ticket" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

List files in a volume ​

GET /api/v1/services/{sid}/files

Entries of a folder in the service's volume, folders first.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
pathquerystringnodefault "/"
environment_idquerystring (UUID)nocan be null

Response

200: a Folder listing object.

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/files" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Delete a file or folder ​

DELETE /api/v1/services/{sid}/files

Delete a file, or a folder with everything in it.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
pathquerystringyes
environment_idquerystring (UUID)nocan be null

Response

204: no content.

Example

bash
curl -X DELETE "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/files?path=…" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN"

Download a file ​

GET /api/v1/services/{sid}/files/download

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
pathquerystringyes
environment_idquerystring (UUID)nocan be null

Response

200: the file's content (application/octet-stream).

Example

bash
curl "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/files/download?path=…" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -o file

Upload a file ​

PUT /api/v1/services/{sid}/files/upload

Upload the raw request body as a file (up to 100 MB). Replacing an existing file needs overwrite=true.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
pathquerystringyes
overwritequerybooleannodefault false
environment_idquerystring (UUID)nocan be null

Request body

The raw file content, with Content-Type: application/octet-stream and a Content-Length header.

Response

200: a Volume file object.

Example

bash
curl -X PUT "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/files/upload?path=…" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @./file

Create a folder ​

POST /api/v1/services/{sid}/files/mkdir

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
pathstringyesmin length 1, max length 4096

Response

201: a Volume file object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/files/mkdir" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"string"}'

Rename or move a file ​

POST /api/v1/services/{sid}/files/move

Rename or move a file or folder. The target must not exist.

Authentication: a team API token or personal access token.

Parameters

NameInTypeRequiredDescription
sidpathstring (UUID)yes
environment_idquerystring (UUID)nocan be null

Request body

FieldTypeRequiredDescription
fromstringyesmin length 1, max length 4096
tostringyesmin length 1, max length 4096

Response

200: a Volume file object.

Example

bash
curl -X POST "https://api.fjordrun.com/api/v1/services/$SERVICE_ID/files/move" \
  -H "Authorization: Bearer $FJORDRUN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"from":"string","to":"string"}'

Request objects ​

BuildConfig ​

FieldTypeRequiredDescription
builder"auto", "nixpacks", "dockerfile"nodefault "auto"
dockerfile_pathstringnomax length 300, can be null
build_commandstringnomax length 2000, can be null
watch_pathsarray of stringnomax 50 items

CanvasIn ​

FieldTypeRequiredDescription
xnumberyes
ynumberyes

ConfigPatchIn ​

FieldTypeRequiredDescription
sourceServiceSourcenoPartial objects are allowed: fields you leave out keep their current value (or the default). Can be null.
configServiceConfignoPartial objects are allowed: fields you leave out keep their current value (or the default). Can be null.

DeployConfig ​

FieldTypeRequiredDescription
start_commandstringnomax length 2000, can be null
portintegernomin 1, max 65535, can be null
healthcheck_pathstringnomax length 300, can be null
healthcheck_timeoutintegernomin 10, max 3600, default 300
restart_policy"on_failure", "always", "never"nodefault "on_failure"
max_restartsintegernomin 0, max 100, default 10
replicasintegernomin 0, max 50, default 1
cron_schedulestringnomax length 100, can be null
sleep_when_idlebooleannodefault false
sleep_after_minutesintegernomin 1, max 1440, default 10

DomainIn ​

FieldTypeRequiredDescription
hostnamestringnomax length 253, can be null
target_portintegernomin 1, max 65535, can be null

FunctionConfig ​

FieldTypeRequiredDescription
runtime"node22", "python312"nodefault "node22"
entrystringnomax length 200, default "index.mjs"
memory_mbintegernodefault 256
timeout_sintegernomin 1, max 900, default 30
concurrencyintegernomin 1, max 100, default 10
max_replicasintegernomin 1, max 50, default 1
idle_timeout_sintegernomin 30, max 900, default 120
auth"public", "token"nodefault "public"

MoveIn ​

FieldTypeRequiredDescription
fromstringyesmin length 1, max length 4096
tostringyesmin length 1, max length 4096

PathIn ​

FieldTypeRequiredDescription
pathstringyesmin length 1, max length 4096

Resources ​

FieldTypeRequiredDescription
cpu_millicoresintegernomin 100, max 64000, default 500
memory_mbintegernomin 128, max 131072, default 512

ServiceConfig ​

FieldTypeRequiredDescription
buildBuildConfigno
deployDeployConfigno
resourcesResourcesno
billing_granularity"second", "minute", "hour"nodefault "minute"
functionFunctionConfignocan be null

ServiceCreateIn ​

FieldTypeRequiredDescription
environment_idstring (UUID)yes
namestringnomax length 100, can be null
kind"web", "worker", "cron", "database", "agent", "function"nodefault "web"
sourceServiceSourcenoPartial objects are allowed: fields you leave out keep their current value (or the default).
configServiceConfignoPartial objects are allowed: fields you leave out keep their current value (or the default). Can be null.
variablesobject (values: string)nocan be null
canvasCanvasInnocan be null

ServicePatchIn ​

FieldTypeRequiredDescription
namestringnomin length 1, max length 100, can be null
iconstringnomax length 100, can be null
canvasCanvasInnocan be null

ServiceSource ​

FieldTypeRequiredDescription
type"github", "image", "template", "inline", "empty"nodefault "empty"
repostringnomax length 200, pattern ^[\w.-]+/[\w.-]+$, can be null
branchstringnomax length 200, can be null
root_dirstringnomax length 200, can be null
imagestringnomax length 500, can be null
templatestringnomax length 50, can be null

TcpProxyIn ​

FieldTypeRequiredDescription
target_portintegeryesmin 1, max 65535

VariablesIn ​

FieldTypeRequiredDescription
variablesobject (values: string)yes

VariablesPatchIn ​

FieldTypeRequiredDescription
variablesobject (values: string)yes

VolumeIn ​

FieldTypeRequiredDescription
mount_pathstringyesmin length 1, max length 255, pattern ^/.*
size_gbintegernomin 1, max 10000, default 5

VolumePatchIn ​

FieldTypeRequiredDescription
size_gbintegeryesmin 1, max 10000

Fjordrun is hosted in the EU (Hetzner, Nuremberg, Germany). Private beta.