v1
Double column
API
CLI
JS Client

Jobs /

Get job

Gets information about the given job

Required permission

Project > Jobs > General > Read

Path parameters

    • projectId

      string required

      ID of the project

    • jobId

      string required

      ID of the job

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • id

        string required

        Identifier for the job

      • appId

        string required

        Full identifier used for job deployment

      • name

        string required

        Job name

      • description

        string

        A short description of the job

      • projectId

        string required

        ID of the project that the service belongs to

      • jobType

        string required

        Type of the job (manual or cron)

        one of
        cron, manual
      • createdAt

        string required

        The time the job was created.

      • 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

      • 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.

      • disabledCI

        boolean required

        Whether Continuous Integration is disabled

      • disabledCD

        boolean required

        Whether Continuous Deployment is disabled

      • deployment

        {object}
        • region

          string

          Region where this job is deployed and built

      • billing

        {object} required
        • deploymentPlan

          string required

          ID of the billing plan used by this job

      • settings

        {object} required

        Job settings

        • cron

          {object}

          Cron job specific settings

          • schedule

            string

            The cron timer scheduling when to run the job.

          • concurrencyPolicy

            string

            Whether this job should run when another instance of the job is already running.

            one of
            Allow, Forbid, Replace
        • backoffLimit

          integer required

          The number of attempts to rerun a job before it is marked as failed.

        • activeDeadlineSeconds

          integer required

          The maximum amount of time, in seconds, for a job to run before it is marked as failed.

          min
          1
API
CLI
JS Client

GET /v1/projects/{projectId}/jobs/{jobId}

Example response

200 OK

Details about the job.

JSON

{
  "data": {
    "id": "example-job",
    "appId": "/example-user/default-project/example-job",
    "name": "Example Job",
    "description": "This is the job description",
    "projectId": "default-project",
    "jobType": "cron",
    "createdAt": "2021-01-20T11:19:53.175Z",
    "vcsData": {
      "projectUrl": "https://github.com/northflank/gatsby-with-northflank",
      "projectType": "github",
      "vcsId": "example-team/self-hosted-vcs",
      "projectBranch": "master",
      "publicRepo": false,
      "dockerWorkDir": "/",
      "dockerFilePath": "/Dockerfile"
    },
    "buildEngineConfiguration": {
      "builder": "buildpack",
      "buildpack": {
        "builder": "HEROKU_20",
        "buildpackLocators": [
          "https://buildpack-registry.heroku.com/cnb/mars/create-react-app"
        ]
      }
    },
    "disabledCI": false,
    "disabledCD": false,
    "deployment": {
      "region": "europe-west"
    },
    "billing": {
      "deploymentPlan": "nf-compute-20"
    },
    "settings": {
      "cron": {
        "schedule": "30 8 * * *",
        "concurrencyPolicy": "Allow"
      },
      "backoffLimit": 0,
      "activeDeadlineSeconds": 600
    }
  }
}

© 2021 Northflank Ltd. All rights reserved.