v1
Double column
API
CLI
JS Client

Integrations /

Update registry

Updates a set of registry credential data.

Required permission

Account > Credentials > General > Update

Path parameters

    • credentialId

      string required
      ID of the registry credential

Request body

  • {object}
    Don't update the credentials.
    • description

      string
      Description of the credentials.
      max length
      200
      pattern
      ^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$
    • restrictions

      {object}
      Data about whether the credentials are restricted to certain projects.
      • restricted

        boolean required
        Whether the credentials are restricted to specific projects.
      • projects

        [array]
        An array of projects the credentials are restricted to, if applicable.
        • string
          The id of the project.
          pattern
          ^[A-Za-z0-9-]+$
OR
  • {object}
    Authenticate with username and password
    • description

      string
      Description of the credentials.
      max length
      200
      pattern
      ^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$
    • restrictions

      {object}
      Data about whether the credentials are restricted to certain projects.
      • restricted

        boolean required
        Whether the credentials are restricted to specific projects.
      • projects

        [array]
        An array of projects the credentials are restricted to, if applicable.
        • string
          The id of the project.
          pattern
          ^[A-Za-z0-9-]+$
    • registryUrl

      string
      Custom url for the container registry. Only usable (and required) when `provider` is `custom`.
    • username

      string required
      Username for the container registry.
    • password

      string required
      Password, Personal Access Token, or API key for the container registry.
OR
  • {object}
    Authenticate with a `keyfile.json`. Used for authenticating with Google Container Registry.
    • description

      string
      Description of the credentials.
      max length
      200
      pattern
      ^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$
    • restrictions

      {object}
      Data about whether the credentials are restricted to certain projects.
      • restricted

        boolean required
        Whether the credentials are restricted to specific projects.
      • projects

        [array]
        An array of projects the credentials are restricted to, if applicable.
        • string
          The id of the project.
          pattern
          ^[A-Za-z0-9-]+$
    • registryUrl

      string
      Custom url for the container registry. Only usable (and required) when `provider` is `custom`.
    • keyfile

      {object} required
      Contents of `keyfile.json`, used to authenticate with Google Container Registry.
    OR
    • {object}
      Validate with a docker config file.
      • description

        string
        Description of the credentials.
        max length
        200
        pattern
        ^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$
      • restrictions

        {object}
        Data about whether the credentials are restricted to certain projects.
        • restricted

          boolean required
          Whether the credentials are restricted to specific projects.
        • projects

          [array]
          An array of projects the credentials are restricted to, if applicable.
          • string
            The id of the project.
            pattern
            ^[A-Za-z0-9-]+$
      • auths

        {object} required
        The `auths` data extracted from your Docker config file.

      Response body

      • {object}
        Response object.
        • data

          {object} required
          Result data.
        API
        CLI
        JS Client

        POST /v1/integrations/registries/{credentialId}/modify

        Example request

        Request body
        Don't update the credentials.
        curl
        curl --header "Content-Type: application/json" \
          --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
          --request POST \
          --data '{"description":"This is a set of saved credentials.","restrictions":{"restricted":true,"projects":["default-project"]}}' \
          https://api.northflank.com/v1/integrations/registries/{credentialId}/modify
        OR
        Authenticate with username and password
        curl
        curl --header "Content-Type: application/json" \
          --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
          --request POST \
          --data '{"description":"This is a set of saved credentials.","restrictions":{"restricted":true,"projects":["default-project"]},"registryUrl":"https://example.com","username":"test-user","password":"password1234"}' \
          https://api.northflank.com/v1/integrations/registries/{credentialId}/modify
        OR
        Authenticate with a `keyfile.json`. Used for authenticating with Google Container Registry.
        curl
        curl --header "Content-Type: application/json" \
          --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
          --request POST \
          --data '{"description":"This is a set of saved credentials.","restrictions":{"restricted":true,"projects":["default-project"]},"registryUrl":"https://example.com","keyfile":{"type":"service_account","project_id":"[PROJECT_ID]","private_key_id":"[KEY_ID]","private_key":"-----BEGIN PRIVATE KEY-----\n ... \n-----END PRIVATE KEY-----\n","client_email":"[SERVICE_ACCOUNT_EMAIL]","client_id":"[CLIENT_ID]","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/[SERVICE_ACCOUNT_EMAIL]"}}' \
          https://api.northflank.com/v1/integrations/registries/{credentialId}/modify
        OR
        Validate with a docker config file.
        curl
        curl --header "Content-Type: application/json" \
          --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
          --request POST \
          --data '{"description":"This is a set of saved credentials.","restrictions":{"restricted":true,"projects":["default-project"]},"auths":{"https://index.docker.io/v1/":{"auth":"[YOUR AUTH KEY]"}}}' \
          https://api.northflank.com/v1/integrations/registries/{credentialId}/modify

        Example response

        200 OK

        The operation was performed successfully.

        JSON

        {
          "data": {}
        }

        © 2024 Northflank Ltd. All rights reserved.