Services /
Get service
Required permission
Project > Services > General > Read
Path parameters
projectId
string requiredID of the project
serviceId
string requiredID of the service
Response body
- {object}
Response object.
data
{object} requiredResult data.
id
string requiredIdentifier for the service
appId
string requiredFull identifier used for service deployment
name
string requiredService name
description
stringA short description of the service
projectId
string requiredID of the project that the service belongs to
serviceType
string requiredType of the service (combined, build or deployment)
one ofcombined, build, deploymentcreatedAt
string requiredThe time the service was created.
disabledCI
boolean requiredWhether Continuous Integration is disabled
disabledCD
boolean requiredWhether Continuous Deployment is disabled
billing
{object} requireddeploymentPlan
string requiredID of the billing plan used by this service
status
{object} requiredDetails about the current service status.
build
{object}Details about the status of the most recent build.
status
string requiredThe current status of the build.
one ofQUEUED, PENDING, STARTING, CLONING, BUILDING, UPLOADING, ABORTED, FAILURE, SUBMISSION_FAILURE, SUCCESS, CRASHEDlastTransitionTime
stringThe timestamp of when the build reached this status.
deployment
{object}Details about the current deployment status.
status
string requiredThe current status of the deployment.
one ofPENDING, IN_PROGRESS, COMPLETED, FAILEDreason
string requiredThe reason the current deployment was started.
one ofSCALING, DEPLOYINGlastTransitionTime
stringThe timestamp of when the deployment reached this status.
servicePaused
boolean requiredIs the service paused?
vcsData
{object}projectUrl
string requiredURL of the repository being built
projectType
string requiredVCS provider for the repo being built
one ofbitbucket, gitlab, github, self-hostedselfHostedVcsId
stringID of the self-hosted VCS, if applicable.
projectBranch
stringBranch of the repo being built
publicRepo
booleanWhether the repo is being accessed without authentication.
dockerWorkDir
string requiredWorking directory used by the dockerfile
dockerFilePath
string requiredFile path of the Dockerfile
deployment
{object}region
stringRegion where this service is deployed and/or built
instances
integerNumber of instances/replicas running
external
{object}Data about a deployment from an external registry.
imagePath
string requiredPath of the external image excluding the hostname
registryProvider
string requiredRegistry provider hosting the external image
one ofdockerhub, gcr, gcr-eu, gcr-us, gitlab, github, customprivateImage
boolean requiredDoes the image require authentication
internal
{object}nfObjectId
string requiredDatabase ID of deployed entity
nfObjectType
string requiredType of deployed entity
one ofservicerepository
string requiredURL of the repository being deployed
branch
string requiredBranch of the repo being deployed
buildSHA
string requiredCommit SHA to be deployed.
latest
means the latest commit is automatically being deployed.deployedSHA
stringCurrently deployed commit SHA. If buildSHA is set to
latest
, this will show the SHA of the latest commit.docker
{object}Details about the Docker overrides for this deployment.
configType
string requiredOverride configuration which is used at runtime.
one ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringThe CMD to run instead of the default if entrypoint override is enabled.
customCommand
stringThe CMD to run instead of the default if CMD override is enabled.
buildpack
{object}Details about the Buildpack overrides for this deployment.
configType
string requiredType of buildpack run configuration.
one ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run.
customEntrypoint
stringCustom entrypoint which should be run.
customCommand
stringCustom command which should be run.
storage
{object}Details about storage settings for this deployment.
ephemeralStorage
{object}Details about ephemeral storage settings for this deployment.
storageSize
number requiredEphemeral storage per container in MB
imageUrl
stringURL at which the service's deployed image is located
buildConfiguration
{object}branchRestrictions
[array]- string
prRestrictions
[array]- string
pathIgnoreRules
[array] required- string
dockerCredentials
[array]- string
buildEngineConfiguration
{object}buildEngine
stringThe build engine used.
one ofbuildpack, kaniko, buildkitbuildpack
{object}Details about Buildpack settings.
builder
stringThe Buildpack stack used.
one ofHEROKU_22, HEROKU_22_CLASSIC, HEROKU_20, HEROKU_18, GOOGLE_V1, CNB_ALPINE, CNB_BIONIC, PAKETO_TINY, PAKETO_BASE, PAKETO_FULLbuildpackLocators
[array]Array of custom Buildpacks used.
- string
Url or registry identifier of custom Buildpack.
useCache
booleanShould build dependencies be cached?
buildkit
{object}Details about Buildkit settings.
useCache
booleanShould intermediate image layers be cached?
kaniko
{object}Details about Kaniko settings.
useCache
booleanShould intermediate image layers be cached?
autoscaling
{object}Describes all autoscaling configurations
horizontal
{object}Describes the horizontal autoscaling configuration
enabled
boolean requiredWhether horizontal autoscaling should be enabled
minReplicas
number requiredMinimum number of replicas which should be running at any time
min1maxReplicas
number requiredMaximum number of replicas which can be running at any time
cpu
{object}enabled
boolean requiredWhether autoscaling should take into account cpu usage
thresholdPercentage
integer requiredThreshold CPU usage percentage at which the workload will be scaled
min10max100memory
{object}enabled
boolean requiredWhether autoscaling should take into account memory usage
thresholdPercentage
integer requiredThreshold memory usage percentage at which the workload will be scaled
min10max100rps
{object}enabled
boolean requiredWhether autoscaling should take into requests-per-second
thresholdValue
integer requiredThreshold rps value on which the workload will be scaled
min1ports
[array] requiredAn array of ports of the service.
- {object}
id
string requiredThe id used to identify the port across requests.
pattern^[a-z]-?[a-z0-9]+(-[a-z0-9]+)*$name
string requiredThe name of the port used in the public url and UI.
pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$internalPort
integer requiredThe port number.
protocol
string requiredThe protocol used by the port.
one ofHTTP, HTTP/2, TCP, UDPpublic
boolean requiredIf true, the port is exposed publicly.
dns
stringDNS entry for this port.
domains
[array] requiredAn array of domains that redirect to this port.
- {object}
name
string requiredThe custom domain redirecting to this port.
certificate
{object} requiredDetails about the TLS certificate generation for this domain.
inProgress
booleanIs the certificate in the process of being generated?
expiryDate
stringThe timestamp when the TLS certificate will expire.
refreshDate
stringThe timestamp when a new TLS certificate will be generated.
security
{object}Details about security settings for this port.
credentials
[array]An array of credentials to access the service.
- {object}
username
string requiredThe username to access the service
min length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.
type
string requiredThe type of authentication used
one ofbasic-authpolicies
[array]An array of IP address policies.
- {object}
addresses
[array] requiredAn array of IP addresses used for this rule
- string
An IP address used by this rule
action
string requiredThe action for this rule.
one ofALLOW, DENYdisableNfDomain
booleanDisable routing on the default code.run domain for public HTTP ports with custom domains.
cluster
{object} requiredCluster information
id
string requiredThe id of the cluster associated with this project.
name
string requiredThe name of the cluster associated with this project.
namespace
stringNamespace this resource is located within on the cluster.
GET /v1/projects/{projectId}/services/{serviceId}
Example response
200 OK
JSON
{
"data": {
"id": "example-service",
"appId": "/example-user/default-project/example-service",
"name": "Example Service",
"tags": [
"my-tag"
],
"description": "This is the service description",
"projectId": "default-project",
"serviceType": "combined",
"createdAt": "2021-01-20T11:19:53.175Z",
"disabledCI": false,
"disabledCD": false,
"billing": {
"deploymentPlan": "nf-compute-20"
},
"status": {
"build": {
"status": "SUCCESS",
"lastTransitionTime": "2021-11-29T11:47:16.624Z"
},
"deployment": {
"status": "COMPLETED",
"reason": "DEPLOYING",
"lastTransitionTime": "2021-11-29T11:47:16.624Z"
}
},
"vcsData": {
"projectUrl": "https://github.com/northflank/gatsby-with-northflank",
"projectType": "github",
"selfHostedVcsId": "example-team/self-hosted-vcs",
"projectBranch": "master",
"publicRepo": false,
"dockerWorkDir": "/",
"dockerFilePath": "/Dockerfile"
},
"deployment": {
"region": "europe-west",
"instances": 1,
"internal": {
"nfObjectId": "example-service",
"nfObjectType": "service",
"repository": "https://github.com/northflank/gatsby-with-northflank",
"branch": "master",
"buildSHA": "latest",
"deployedSHA": "262ed9817b3cad5142fbceabe0c9e371e390d616"
},
"docker": {
"configType": "default"
},
"buildpack": {
"configType": "default"
},
"storage": {
"ephemeralStorage": {
"storageSize": 1024
}
}
},
"buildConfiguration": {
"branchRestrictions": [
"feature/*"
],
"prRestrictions": [
"feature/*"
],
"pathIgnoreRules": [
"README.md"
],
"dockerCredentials": [
"example-docker-credential"
]
},
"buildEngineConfiguration": {
"buildEngine": "buildpack",
"buildpack": {
"builder": "HEROKU_22",
"buildpackLocators": [
"https://buildpack-registry.heroku.com/cnb/mars/create-react-app"
]
}
},
"ports": [
{
"id": "eonyui",
"name": "p01",
"internalPort": 8080,
"protocol": "HTTP",
"public": true,
"dns": "p01--example-service--default-service--user-abc1.salvo.code.run",
"domains": [
{
"name": "app.example.com",
"certificate": {
"inProgress": false,
"expiryDate": "2022-04-26T09:25:02.000Z",
"refreshDate": "2022-03-27T09:25:02.000Z"
}
}
],
"security": {
"credentials": [
{
"username": "admin",
"password": "password123",
"type": "basic-auth"
}
],
"policies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
]
},
"disableNfDomain": false
}
],
"cluster": {
"id": "nf-europe-west",
"name": "nf-europe-west",
"namespace": "ns-8zy2mcjh9zn2"
}
}
}