v1
Double column
API
CLI
JS client

Secrets /

View secret

View a secret including its contents

Path parameters

    • projectId

      string required

      ID of the project

    • secretId

      string required

      ID of the secret

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}

    A secret group object

    • id

      string required

      Identifier for the secret group

    • name

      string required

      Secret group name

    • description

      string

      A short description of the secret group

    • secretType

      string required

      The type of the created secret group

      one of
      environment, arguments
    • projectId

      string required

      ID of the project that the service belongs to

    • priority

      integer required

      The priority with which different secret groups will be merged

      min
      0
      max
      100
    • restrictions

      {object} required

      Restriction settings of the secret

      • restricted

        boolean

        Is the secret restricted

      • nfObjects

        [array]

        List of Northflank services & jobs the secret is restricted to

        • {object}
          • id

            string required

            ID of the entity the secret is restricted to.

            pattern
            ^[A-Za-z0-9-]+$
          • type

            string required

            Type of the entity the secret is restricted to.

    • createdAt

      string required

      The timestamp when the secret group was created at

    • updatedAt

      string required

      The timestamp the secret group was last updated at

    • data

      {object} required

      Decrypted secret data. If the show parameter is set to this, this will only contain secrets saved to this group. If the show parameter is set to inherited, this will only contain secrets inherited from linked addons. Otherwise, this will contain both.

    API
    CLI
    JS client

    GET /v1/projects/{projectId}/secrets/{secretId}

    Example response

    200 OK

    The full secret including its contents.

    JSON

    {
      "id": "example-secret-group",
      "name": "Example secret group",
      "description": "This is the secret group description",
      "secretType": "environment",
      "projectId": "default-project",
      "priority": 10,
      "restrictions": {
        "restricted": false,
        "nfObjects": [
          {
            "id": "example-service",
            "type": "service"
          }
        ]
      },
      "createdAt": "2021-01-01 12:00:00.000Z",
      "updatedAt": "2021-01-01 12:00:00.000Z",
      "data": {
        "a_key": "a_secret",
        "b_key": "b_secret"
      }
    }

    © 2021 Northflank Ltd. All rights reserved.