v1beta
Double column
curl
API
CLI

Secrets /

Update secret

Update a secret

URL parameters

    • project

      string required

      ID of the project

    • secret

      string required

      ID of the secret

Request attributes

  • object

    • description

      string

      A description of the secret.

      pattern: ^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$

      max length: 200

    • priority

      integer

      The priority with which different secrets will be merged.

    • restrictions

      object

      Restriction settings of the secret

      • restricted

        boolean

        Is the secret restricted

      • nfObjects

        array

        List of Northflank services & jobs the secret is restricted to

        • object

          • nfObjectId

            string required

            pattern: ^[A-Za-z0-9-]+$

          • nfObjectType

            string required

    • secretType

      string

      The type of the created secret

      one of: environment, arguments

    • data

      object

      Secret contents as JSON object, encrypted at rest

    Response attributes

    • object

      • success

        boolean required

        Boolean indicated success of the performed action

    API
    CLI

    POST /v1beta/projects/{project}/secrets/{secret}

    Example request

    request body

    curl

    curl --header "Content-Type: application/json" \
      --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
      --request POST \
      --data '{"description":"A description","priority":10,"restrictions":{"restricted":false,"nfObjects":[{}]},"secretType":"environment","data":{}}' \
      https://api.northflank.com/v1beta/projects/{project}/secrets/{secret}

    Example response

    200 OK

    Response indicating success.

    JSON

    {
      "success": true
    }

    © 2021 Northflank Ltd. All rights reserved.

    TermsPrivacy

    contact@northflank.com