Skip to main content
GET
/
variables
/
{variableConfigId}
Get variable config by ID
curl --request GET \
  --url https://{subdomain}.nudj.cx/api/v2/admin/variables/{variableConfigId} \
  --header 'x-api-token: <api-key>'
{
  "id": "<string>",
  "organisationId": "<string>",
  "type": "form-short-text",
  "name": "<string>",
  "label": "<string>",
  "placeholder": "<string>",
  "useDefaultProfileValue": true,
  "availableInQuestionBank": true,
  "maxValueOccurrences": 2,
  "isSingleOutputPerUser": true,
  "isImmutable": true,
  "prerequisiteVariableConfigIds": [
    "<string>"
  ],
  "options": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "validationRegex": "<string>",
  "validationEndpointConfig": {
    "url": "<string>",
    "method": "<string>",
    "headers": {}
  },
  "createdAt": "<string>",
  "createdBy": "<string>",
  "updatedAt": "<string>",
  "updatedBy": "<string>"
}

Authorizations

x-api-token
string
header
required

Path Parameters

variableConfigId
string
required

Response

Successful response

A variable configuration

id
string
required

The id of the variable config

organisationId
string
required

The organisation that the variable config belongs to

type
enum<string>
required

Determines how the variable should be rendered in the UI (e.g., text input, select dropdown, date picker, etc.)

Available options:
form-short-text,
form-long-text,
form-number,
form-select,
form-checkbox,
form-email,
form-name,
form-address,
form-date
name
string
required

The name of the variable

label
string
required

The label of the variable

useDefaultProfileValue
boolean
required

Whether to use the default profile value

availableInQuestionBank
boolean
required

Whether this variable is available in the question bank

maxValueOccurrences
number
required

The maximum number of times a unique value can be used across all instances of this variable

Required range: x >= 1
isSingleOutputPerUser
boolean
required

Whether a user can only have one output for this variable

isImmutable
boolean
required

Whether the value, once set by a user, cannot be changed

createdAt
string
required

The date when this variable config was created

createdBy
string
required

The user who created this variable config

placeholder
string | null

The placeholder text

prerequisiteVariableConfigIds
string[] | null

The variable configs that must be completed before this one

options
object[] | null

An array of predefined values that users can choose from when the type is set to select

validationRegex
string | null

Regular expression pattern to validate variable values. If set, values must match this pattern.

validationEndpointConfig
object | null

Configuration for validating variable values

updatedAt
string | null

The date when this variable config was last updated

updatedBy
string | null

The user who last updated this variable config

I