v1
Double column
API
CLI
JS Client

Services /

Get service

Gets information about the given service.

Required permission

Project > Services > General > Read

Path parameters

    • projectId

      string required

      ID of the project

    • serviceId

      string required

      ID of the service

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • id

        string required

        Identifier for the service

      • appId

        string required

        Full identifier used for service deployment

      • name

        string required

        Service name

      • description

        string

        A short description of the service

      • projectId

        string required

        ID of the project that the service belongs to

      • serviceType

        string required

        Type of the service (combined, build or deployment)

        one of
        combined, build, deployment
      • createdAt

        string required

        The time the service was created.

      • disabledCI

        boolean required

        Whether Continuous Integration is disabled

      • disabledCD

        boolean required

        Whether Continuous Deployment is disabled

      • billing

        {object} required
        • deploymentPlan

          string required

          ID of the billing plan used by this service

      • vcsData

        {object}
        • projectUrl

          string required

          URL of the repository being built

        • projectType

          string required

          VCS provider for the repo being built

          one of
          bitbucket, gitlab, github, self-hosted
        • vcsId

          string

          ID of the self-hosted VCS, if applicable.

        • projectBranch

          string

          Branch of the repo being built

        • publicRepo

          boolean

          Whether the repo is being accessed without authentication.

        • dockerWorkDir

          string required

          Working directory used by the dockerfile

        • dockerFilePath

          string required

          File path of the Dockerfile

      • deployment

        {object}
        • region

          string

          Region where this service is deployed and/or built

        • instances

          integer

          Number of instances/replicas running

        • external

          {object}

          Data about a deployment from an external registry.

          • imagePath

            string required

            Path of the external image excluding the hostname

          • registryProvider

            string required

            Registry provider hosting the external image

            one of
            dockerhub, gcr-eu, gcr-us, gitlab, github, custom
          • privateImage

            boolean required

            Does the image require authentication

        • internal

          {object}
          • appId

            string required

            Full identifier of deployed entity

          • nfObjectId

            string required

            Database ID of deployed entity

          • nfObjectType

            string required

            Type of deployed entity

            one of
            service
          • repository

            string required

            URL of the repository being deployed

          • branch

            string required

            Branch of the repo being deployed

          • buildSHA

            string required

            Commit SHA to be deployed. 'latest' means the latest commit is automatically being deployed.

          • deployedSHA

            string required

            Currently deployed commit SHA. If buildSHA is set to 'latest', this will show the SHA of the latest commit.

      • buildConfiguration

        {object}
        • branchRestrictions

          [array] required
          • string
        • prRestrictions

          [array] required
          • string
      • buildEngineConfiguration

        {object}
        • builder

          string

          The build engine used.

          one of
          buildpack, kaniko, buildkit
        • buildpack

          {object}
          • builder

            string

            The Buildpack stack used.

            one of
            HEROKU_20, HEROKU_18, GOOGLE_V1, CNB_ALPINE, CNB_BIONIC, PAKETO_TINY
          • buildpackLocators

            [array]

            Array of custom Buildpacks used.

            • string

              Url or registry identifier of custom Buildpack.

API
CLI
JS Client

GET /v1/projects/{projectId}/services/{serviceId}

Example response

200 OK

Details about the service.

JSON

{
  "data": {
    "id": "example-service",
    "appId": "/example-user/default-project/example-service",
    "name": "Example Service",
    "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"
    },
    "vcsData": {
      "projectUrl": "https://github.com/northflank/gatsby-with-northflank",
      "projectType": "github",
      "vcsId": "example-team/self-hosted-vcs",
      "projectBranch": "master",
      "publicRepo": false,
      "dockerWorkDir": "/",
      "dockerFilePath": "/Dockerfile"
    },
    "deployment": {
      "region": "europe-west",
      "instances": 1,
      "external": {},
      "internal": {
        "appId": "/example-user/default-project/example-service",
        "nfObjectId": "5f3bd676b84798d54472d1cc",
        "nfObjectType": "service",
        "repository": "https://github.com/northflank/gatsby-with-northflank",
        "branch": "master",
        "buildSHA": "latest",
        "deployedSHA": "262ed9817b3cad5142fbceabe0c9e371e390d616"
      }
    },
    "buildConfiguration": {
      "branchRestrictions": [
        "feature/*"
      ],
      "prRestrictions": [
        "feature/*"
      ]
    },
    "buildEngineConfiguration": {
      "builder": "buildpack",
      "buildpack": {
        "builder": "HEROKU_20",
        "buildpackLocators": [
          "https://buildpack-registry.heroku.com/cnb/mars/create-react-app"
        ]
      }
    }
  }
}

© 2021 Northflank Ltd. All rights reserved.