Parameter

Create a parameter

Changed on

Create an application parameter.

post/parameter

Request

  • Base URL
    https://api.nullplatform.com
  • URL
    https://api.nullplatform.com/parameter
  • Auth
    HTTP bearer

Request body

namestring required

The name of the parameter.

nrnstring required

The NRN of the application which the parameter belongs to.

type'environment' | ' file' required

The type of the parameter.

encoding'plaintext' | ' base64' required

The encoding of the parameter value.

secrettrue | false required

Indicates whether the value is a secret. true if it is a secret, false otherwise.

read_onlytrue | false required

Indicates whether the value is read-only. true if it is read-only, false otherwise.

variablestring

The name of the environment variable. Required when type is environment.

destination_pathstring

The full file path. Required when type is file.

Example request

{
  "name": "Pool Size",
  "nrn": "organization=1:account=2:namespace=3:application=4",
  "type": "environment",
  "encoding": "plaintext",
  "variable": "POOL_SIZE",
  "secret": false,
  "read_only": false,
  "values": [
    {
      "nrn": "organization=1:account=2:namespace=3:application=4",
      "value": "10"
    },
    {
      "nrn": "organization=1:account=2:namespace=3:application=4",
      "value": "50",
      "dimensions": {
        "environment": "production"
      }
    }
  ]
}

Response

The operation was successful.

idinteger required

A system-wide unique ID for the parameter.

namestring required

The name of the parameter.

nrnstring required

The NRN of the application which the parameter belongs to.

type'environment' | ' file' required

The type of the parameter.

encoding'plaintext' | ' base64' required

The encoding of the parameter value.

variablestring

The name of the environment variable. Required when type is environment.

destination_pathstring

The full file path. Required when type is file.

secrettrue | false required

Indicates whether the value is a secret. true if it is a secret, false otherwise.

read_onlytrue | false required

Indicates whether the value is read-only. true if it is read-only, false otherwise.

version_idinteger required

A system-wide unique ID for the parameter version.

Example response

{
  "id": 1234,
  "name": "Pool Size",
  "nrn": "organization=1:account=2:namespace=3:application=4",
  "type": "environment",
  "encoding": "plaintext",
  "version_id": 12341234,
  "values": [
    {
      "id": 1234,
      "nrn": "organization=1:account=2:namespace=3:application=4",
      "created_at": "2021-01-02T00:00:00Z",
      "value": "200",
      "external": {
        "id": "external_id_123",
        "engine": "hcp_vault"
      },
      "dimensions": {
        "environment": "development",
        "country": "US"
      }
    }
  ]
}

Changes

    • info

      added the new optional request property

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • info

      media type application/json was changed to a more specific media type application/problem+json for the response status

    • info

      media type application/json was changed to a more specific media type application/problem+json for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      response property message deprecated

    • info

      response property message deprecated

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status