v1
Double column
API
CLI
JS Client

Services /

Get service environment variables

Gets the environment variables of the given service. 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 > Services > Configuration > View Environment Variables

Path parameters

    • projectId

      string required

      ID of the project

    • serviceId

      string required

      ID of the service

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.

    API
    CLI
    JS Client

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

    Example response

    200 OK

    The environment variables of the service.

    JSON

    {
      "data": {
        "VARIABLE_1": "abcdef",
        "VARIABLE_2": "12345"
      }
    }

    © 2022 Northflank Ltd. All rights reserved.