Get job runtime environment | Jobs | Northflank API docs
v1
Double column
API
CLI
JS Client

Jobs /

Get job runtime environment

Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.

Required permission

Project > Jobs > Configuration > View Environment Variables

Path parameters

    • projectId

      string required

      ID of the project

    • jobId

      string required

      ID of the job

Query parameters

    • show

      string

      Which secrets to display - if set to this only the group's secrets are displayed, if set to inherited only secrets from linked addons are displayed, if set to all or not provided, both are displayed.

      one of
      this, inherited, all

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • runtimeEnvironment

        {object} required

        The runtime environment variables, formatted as a JSON object. If the show parameter is set to this, this will only contain secrets saved to this entity. If the show parameter is set to inherited, this will only contain secrets inherited from linked secret groups. Otherwise, this will contain both.

        • runtimeFiles

          {object} required

          The runtime secret files, formatted as a JSON object. If the show parameter is set to this, this will only contain files saved to this entity. If the show parameter is set to inherited, this will only contain files inherited from linked secret groups. Otherwise, this will contain both.

      API
      CLI
      JS Client

      GET /v1/projects/{projectId}/jobs/{jobId}/runtime-environment

      Example response

      200 OK

      The runtime environment of the job.

      JSON

      {
        "data": {
          "runtimeEnvironment": {
            "VARIABLE_1": "abcdef",
            "VARIABLE_2": "12345"
          },
          "runtimeFiles": {
            "/dir/fileName": {
              "data": "VGhpcyBpcyBhbiBleGFtcGxlIHdpdGggYSB0ZW1wbGF0ZWQgJHtOT0RFX0VOVn0gdmFyaWFibGU=",
              "encoding": "utf-8"
            }
          }
        }
      }

      © 2024 Northflank Ltd. All rights reserved.