Services /
Get service
Required permission
Project > Services > General > Read
Path parameters
projectId
string requiredID of the projectserviceId
string requiredID of the service
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredIdentifier for the serviceappId
string requiredFull identifier used for service deploymentname
string requiredService namedescription
stringA short description of the serviceprojectId
string requiredID of the project that the service belongs toserviceType
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 disableddisabledCD
boolean requiredWhether Continuous Deployment is disabledbilling
{object} requireddeploymentPlan
string requiredID of the billing plan used by this servicestatus
{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?buildSource
stringDefines the build source for this resourceone ofgit, bundlevcsData
{object}projectUrl
string requiredURL of the repository being builtprojectType
string requiredVCS provider for the repo being builtone ofbitbucket, gitlab, github, self-hosted, azureselfHostedVcsId
stringID of the self-hosted VCS, if applicable.projectBranch
stringBranch of the repo being builtpublicRepo
booleanWhether the repo is being accessed without authentication.dockerWorkDir
string requiredWorking directory used by the dockerfiledockerFilePath
string requiredFile path of the DockerfilebundleData
{object}bundleUrl
string requiredURL of the bundle to be builtprojectBranch
stringBranch of the bundle being builtdockerWorkDir
string requiredWorking directory used by the dockerfiledockerFilePath
string requiredFile path of the Dockerfiledeployment
{object}region
stringRegion where this service is deployed and/or builtinstances
integerNumber of instances/replicas runningexternal
{object}Data about a deployment from an external registry.imagePath
string requiredPath of the external image excluding the hostnameregistryProvider
string requiredRegistry provider hosting the external imageone ofdockerhub, gcr, gcr-eu, gcr-us, gitlab, github, customprivateImage
boolean requiredDoes the image require authenticationinternal
{object}nfObjectId
string requiredDatabase ID of deployed entitynfObjectType
string requiredType of deployed entityone ofservicerepository
string requiredURL of the repository being deployedbranch
string requiredBranch of the repo being deployedbuildSHA
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 MBstrategy
{object}Roll out strategy of the servicetype
stringConfigures the instance roll out strategy of your service. Currently only available via feature flag.one ofrecreate, rollout-steady, rollout-balanced, rollout-fastzonalRedundancy
{object}type
stringDefines scheduling behaviour across different zones within the same region.one ofdisabled, preferred, requiredminZones
integerDefines how many zones are required and will prevent containers from additional scheduling into existing zones. (Only relevant if type is set to "required")min1gpu
{object}enabled
booleanconfiguration
{object}gpuType
string requiredtimesliced
booleangracePeriodSeconds
integerThe maximum amount of time the process has to shut down after receiving a SIGTERM signal before it is forcefully shut down SIGKILL by the system.min15max600metadata
{object}Allow setting custom labels and annotations for workloads.labels
{object}Specify custom labels for the workload.annotations
{object}Specify custom annotations for the workload as string or object.imageUrl
stringURL at which the service's deployed image is locatedbuildConfiguration
{object}prRestrictions
[array]An array of pull request build rules. Only supported for build services. Each commit belonging to a pull request on a branch that matches one of the provided build rules will be built automatically.- stringA pull request build rule. Can contain `*` as a wildcard to match multiple branch names. For example, `feature/*` will build all commits from pull requests from branches that start with `feature/`.pattern^[^?:@$~ [\]{}]*$
branchRestrictions
[array]An array of branch build rules. Only supported for build services. Each commit belonging to a branch that matches one of the provided build rules will be built automatically.- stringA branch build rule. Can contain `*` as a wildcard to match multiple branch names. For example, `feature/*` will build all commits from branches that start with `feature/`.pattern^[^?:@$~ [\]{}]*$
pathIgnoreRules
[array]An array of path ignore rules. A commit will only be built if a file has been changed that does not match any of the ignore rules. Path ignore rules follow `.gitignore` syntax.- stringA path ignore rule, following `.gitignore` syntax. For example, `*.md` will ignore all files ending with `.md`.max length260
isAllowList
booleanIf `true`, the functionality of `pathIgnoreRules` will be inverted. A commit will only be built if a file has been changed that matches one or more of the rules in `pathIgnoreRules`.ciIgnoreFlagsEnabled
booleanIf `true`, enables commit ignore flags. If a commit message contains one or more of the flags in `ciIgnoreFlags`, that commit will not be built.ciIgnoreFlags
[array]An array of commit ignore flags. If a commit message contains one or more of these flags, that commit will not be built. Defaults to `["[skip ci]", "[ci skip]", "[no ci]", "[skip nf]", "[nf skip]", "[northflank skip]", "[skip northflank]"]`- stringA commit ignore flag.max length72
dockerfileTarget
stringIf your Dockerfile contains multiple build stages, you can specify the target stage by entering its name here.dockerCredentials
[array]- stringThe ID of the docker credentials to use.pattern^[A-Za-z0-9-]+$
includeGitFolder
booleanInclude .git folder inside the build contextfullGitClone
booleanInclude the entire git history as part of the .git folder. Only relevant if "includeGitFolder" is set.storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per build in MBone of16384, 32768, 65536, 131072, 262144, 524288min16384max65536buildEngineConfiguration
{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.- stringUrl 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 configurationshorizontal
{object}Describes the horizontal autoscaling configurationenabled
boolean requiredWhether horizontal autoscaling should be enabledminReplicas
number requiredMinimum number of replicas which should be running at any timemin1maxReplicas
number requiredMaximum number of replicas which can be running at any timecpu
{object}enabled
boolean requiredWhether autoscaling should take into account cpu usagethresholdPercentage
integer requiredThreshold CPU usage percentage at which the workload will be scaledmin10max100memory
{object}enabled
boolean requiredWhether autoscaling should take into account memory usagethresholdPercentage
integer requiredThreshold memory usage percentage at which the workload will be scaledmin10max100rps
{object}enabled
boolean requiredWhether autoscaling should take into requests-per-secondthresholdValue
integer requiredThreshold rps value on which the workload will be scaledmin1ports
[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 servicemin 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 usedone ofbasic-authpolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYsso
{object}Configure SSO access control for this port.organizationId
stringOrganization ID of the work OS organization that should be validated.directoryGroupIds
[array]List of directory groupIds, one of which the user has to be a member of.- string
validateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowverificationMode
stringMode used to verify multiple security features like ip policies and SSO authenticationone ofor, andheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- {object}
regexMode
booleanname
(multiple options: oneOf)- string
- stringpattern^[a-zA-Z0-9_\-%$+]+$
value
string requireddisableNfDomain
booleanDisable routing on the default code.run domain for public HTTP ports with custom domains.cluster
{object} requiredCluster informationid
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.loadBalancers
[array]Load balancer DNS for the cluster.- string
OR
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"
}
},
"buildSource": "git",
"vcsData": {
"projectUrl": "https://github.com/northflank/gatsby-with-northflank",
"projectType": "github",
"selfHostedVcsId": "example-team/self-hosted-vcs",
"projectBranch": "master",
"publicRepo": false,
"dockerWorkDir": "/",
"dockerFilePath": "/Dockerfile"
},
"bundleData": {
"bundleUrl": "https://example.com/archive.tar",
"projectBranch": "main",
"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": {
"prRestrictions": [
"feature/*"
],
"branchRestrictions": [
"feature/*"
],
"pathIgnoreRules": [
"README.md"
],
"isAllowList": false,
"ciIgnoreFlags": [
"[skip ci]"
],
"dockerCredentials": [
"example-docker-credential"
],
"storage": {
"ephemeralStorage": {
"storageSize": 16384
}
}
},
"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"
}
],
"sso": {
"organizationId": "org_uniquestringidentifier",
"directoryGroupIds": [
"directory_group_uniquestringidentifier"
]
}
},
"disableNfDomain": false
}
],
"cluster": {
"id": "nf-europe-west",
"name": "nf-europe-west",
"namespace": "ns-8zy2mcjh9zn2",
"loadBalancers": [
"lb.659200800000000000000000.northflank.com"
]
}
}
}