llms.txt: machine-readable documentation index. Markdown version of this page is also available.

YouTrack Developer Portal Help

App Settings

App settings let administrators configure an app without changing its code. Developers declare the available settings in the app package.

System administrators provide values globally, and project administrators can configure values for individual projects. App scripts use these values to control the app's behavior.

Define App Settings

Add a file named settings.json to the root of the app package. Define its schema using JSON Schema Draft 7.

The schema describes an object whose properties define the app settings. Each property name is the key of a setting, and its schema declares the setting's type and constraints. YouTrack uses these declarations to create the settings form, validate values, and store configuration.

Widget configuration uses a separate schema. For details, see Widget Configuration.

Supported Setting Types

Choose the type that matches the value an administrator needs to configure:

Type

Use

string

Text. For credentials, use the secret format.

integer

Whole numbers.

number

Numbers that can include a fractional part.

boolean

A true or false value.

object

A single YouTrack entity reference. A top-level object setting requires x-entity.

array

A list of primitives, YouTrack entities, or ordinary objects with declared fields. For declarations and supported shapes, see Arrays.

Ordinary objects can be used as rows in an array setting and as nested objects inside those rows.

Basic Settings Example

This file declares one text setting named message:

{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "message": { "title": "Message", "type": "string", "minLength": 1 } } }

The settings form displays Message as the field label. If a value is provided, minLength requires at least one character.

Required Settings and Defaults

To require a setting, list its key in the root required array. For example, "required": ["message"] requires the setting in the example above.

Missing required settings prevent the affected app or project configuration from running. YouTrack displays a warning until the required values are configured.

Use default to initialize an ordinary string, integer, number, boolean, or primitive array. Defaults initialize missing values without replacing saved values. Configure secret values explicitly. Defaults are not supported for entity references or arrays of objects or entities.

For an array, required and minItems serve different purposes: required requires a setting value, while minItems sets the minimum number of items. Use minItems: 1 together with required when an array must contain at least one item.

Configure Setting Values

After installing the app, configure its values on the app's Settings tab. Global configuration provides shared values, and project configuration can provide overrides.

To set values for app settings on the global level:

  1. From the Administration menu, select Apps.

  2. Select the target app from the list.

  3. Open the Settings tab for this app.

  4. Update values for the settings of the app.

  5. When ready, click the Save button.

    • The values for the app settings are saved on the global level.

    • The values are updated in all projects where this app is attached and where the app settings are synchronized with the global app settings.

To set values for app settings on the project level:

  1. In the project settings, open the Apps tab.

  2. Select the target app from the list.

  3. Open the Settings tab for this app.

  4. Set values for the settings of the app.

  5. When ready, click the Save button.

    • The values for the app settings are saved on the project level.

    • The values you've just set overwrite any global-level values for these settings.

    • The settings that you've updated stop being synchronized with the global app settings.

For array-specific override rules, see Project Overrides for Arrays.

Use Setting Values in Scripts

In app scripts, read a setting through ctx.settings.<settingName>. For example, an HTTP handler or workflow action can read the basic text setting as follows:

const message = ctx.settings.message;

The setting's declaration determines the value exposed to scripts. Settings for ordinary text, numbers, and boolean values expose JavaScript primitives. Entity settings expose scripting API entities, and secret settings expose opaque values. Array settings expose the collection types described in Use Array Values in Scripts.

Use the settings form or REST configuration to save configuration changes. For data that backend scripts need to store and update, see Extension Properties.

YouTrack Entity Settings

To let an administrator select a YouTrack entity, declare an object-typed setting with x-entity. The x-entity value identifies the entity type.

Supported entity types are Issue, Article, Project, User, and UserGroup.

This declaration lets an administrator select one user:

{ "type": "object", "properties": { "owner": { "title": "Owner", "type": "object", "x-entity": "User" } } }

In scripts, ctx.settings.owner exposes the selected User entity. For multiple selections, use an entity array.

Secret Settings

For credentials such as authentication tokens, declare a string setting with "format": "secret":

{ "type": "object", "properties": { "apiToken": { "title": "API Token", "type": "string", "format": "secret" } } }

The settings form hides secret input. Saved secret values are represented by the <***> mask in REST settings responses.

Scripts receive an opaque secret value. Converting the value to a string returns the mask. Pass the value directly to the supported http.Connection methods:

This function uses the configured token to authenticate an HTTP request:

const http = require('@jetbrains/youtrack-scripting-api/http'); function sendPayload(ctx, url, payload) { const connection = new http.Connection(url); connection.bearerAuth(ctx.settings.apiToken); connection.addHeader('Content-Type', 'application/json'); return connection.postSync('', {}, JSON.stringify(payload)); }

To require a secret setting, list its key in the root required array. For secrets in repeatable rows, see Secrets in Array Items.

Arrays

Use an array-typed setting for a list of values or repeatable configuration rows. Declare the setting in the root properties object and provide one items schema for all items.

The item schema determines the supported values and the collection returned to backend scripts:

Item type

Declaration

Backend script value

Primitive

items.type is string, integer, number, or boolean.

JavaScript array: use length, indexed access, and array methods.

YouTrack entity

items.type is object, and items.x-entity identifies the entity type.

YouTrack API Set: use size and API Set methods.

Ordinary object

items.type is object, and items.properties declares the row fields.

JavaScript array of row objects. Fields retain their declared types.

Primitive Arrays

Use a primitive array for a list of text, numeric, or boolean values. Declare the item type and item constraints in items.

Use minItems and maxItems on the array to limit its size. For unique selections from a fixed list, combine items.enum with uniqueItems: true.

A primitive array can declare a default array whose values match the item type. Defaults initialize missing values without replacing saved values.

This example declares a list of labels and a selection of event names:

{ "type": "object", "properties": { "labels": { "title": "Labels", "type": "array", "maxItems": 20, "items": { "type": "string", "minLength": 1 } }, "events": { "title": "Events", "type": "array", "uniqueItems": true, "default": [ "created" ], "items": { "type": "string", "enum": [ "created", "updated", "deleted" ] } } } }

Entity Arrays

For multiple entity selections, declare the entity type in items.x-entity:

{ "type": "object", "properties": { "reviewers": { "title": "Reviewers", "type": "array", "items": { "type": "object", "x-entity": "User" } } } }

In scripts, ctx.settings.reviewers is a YouTrack API Set of users. Use ctx.settings.reviewers.size to count the selections.

Object Arrays

Use an object array when each configuration item needs several fields. Declare each field and its type in items.properties.

Fields can contain primitive values, secrets, YouTrack entity references, or nested objects. A row can also contain a nested object array.

Use required in the item schema to require fields in each row. This example requires a name and a URL for every destination:

{ "type": "object", "properties": { "destinations": { "title": "Destinations", "type": "array", "maxItems": 20, "items": { "type": "object", "properties": { "name": { "title": "Name", "type": "string", "minLength": 1 }, "url": { "title": "URL", "type": "string", "format": "uri" } }, "required": [ "name", "url" ] } } } }

Object arrays are subject to the configuration row limit.

For row identifiers and saved-secret preservation in REST updates, see Object Array Rows in REST.

Nested Object Arrays

An object-array row can contain one level of nested object arrays. The nested array must be a direct property of the outer row and contain ordinary objects.

For example, each trigger can have several endpoints, each with its own secret. In each row schema, required names mandatory fields. Combining required with minItems: 1 requires at least one endpoint per trigger:

{ "type": "object", "properties": { "triggers": { "title": "Triggers", "type": "array", "maxItems": 20, "items": { "type": "object", "properties": { "event": { "title": "Event", "type": "string", "enum": [ "created", "updated" ] }, "endpoints": { "title": "Endpoints", "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "object", "properties": { "url": { "title": "URL", "type": "string", "format": "uri" }, "secret": { "title": "Token", "type": "string", "format": "secret" } }, "required": [ "url", "secret" ] } } }, "required": [ "event", "endpoints" ] } } } }

For example, triggers[].endpoints[] is supported, but triggers[].endpoints[].retries[] is not. Nested primitive arrays, nested entity arrays, and arrays inside a row's nested object are not supported.

Array Limits

These limits apply to arrays stored as app settings. JavaScript arrays created in scripts or widget code follow normal language behavior.

Array Size

Each global or project configuration can contain at most 1,000 object-array rows in total. The limit includes all object-array settings and their nested rows. An outer row with three nested rows counts as four rows. Primitive arrays and entity selections do not count toward this total.

The maxItems constraint limits each array separately. For object arrays, a lower maxItems further restricts the number of rows in that array.

Item Types and Nesting
  • Use one items schema for all items. Tuple-style items declarations and arrays whose items are arrays are not supported.

  • Only one level of nested object arrays is supported, declared directly as a row property. Nested primitive arrays, nested entity arrays, and arrays inside a row's nested object are not supported. For an example, see Nested Object Arrays.

  • Primitive array items cannot use format: "secret". Use secret fields in object-array rows for a list of secrets.

Object Row Schemas

Declare row fields directly with properties:

  • Row schemas and their fields cannot use $ref, allOf, anyOf, oneOf, patternProperties, or a schema-valued additionalProperties. Use additionalProperties: false to reject undeclared fields.

  • Field names cannot be empty.

  • The $itemId row identifier is reserved. YouTrack supplies it in REST settings data; do not declare it as a row field.

Project Overrides for Arrays

When a setting supports global and project configuration, a project override replaces the entire array. An empty project array [] also replaces the global value. Rows from global and project arrays are not merged.

If there is no project override, the project inherits the global array. For object arrays containing secrets, apply the rules in Secrets in Array Items before creating an override.

Secrets in Array Items

Use "type": "string", "format": "secret" for a secret field in an object-array row or nested row. Each row stores its secret independently.

In scripts, pass a row's secret value directly to the supported http methods, as with a top-level secret setting.

For row identifiers and saved-secret preservation in REST updates, see Object Array Rows in REST.

Use Array Values in Scripts

Read primitive and ordinary object arrays through ctx.settings.<settingName>. Use length, indexed access, and array methods such as forEach. Entity-array settings use the Set API, including its size property.

Changing array membership or ordinary row fields in memory does not save configuration changes. Use the settings form or REST configuration to save values. Entity references still expose the corresponding YouTrack entities.

For collection conversion and entity-reference behavior, see Arrays and Collections.

For the nested trigger settings, this function sends a request to each endpoint for a matching event:

const http = require('@jetbrains/youtrack-scripting-api/http'); function notifyEndpoints(ctx, event, payload) { (ctx.settings.triggers || []).forEach(trigger => { if (trigger.event === event) { trigger.endpoints.forEach(endpoint => { const connection = new http.Connection(endpoint.url); connection.bearerAuth(endpoint.secret); connection.addHeader('Content-Type', 'application/json'); connection.postSync('', {}, JSON.stringify(payload)); }); } }); }

Object Array Rows in REST

In REST settings responses, YouTrack adds a $itemId field to each saved object-array row. Its value identifies the stored row during edits and reordering. You do not declare this field in the row schema, and it is not exposed through ctx.settings.

Nested rows have their own $itemId, just like outer rows. The settings form retains row identifiers automatically to preserve saved secrets during edits.

When updating rows through REST, retain the returned $itemId for every existing row. Omit this field for a new row.

For secret fields, the <***> mask preserves a saved secret only for the same row in the same configuration. A nested row must also remain under the same parent row. For a new row, provide the actual secret value or omit the field if it is optional.

Settings Schema Reference

Use these fields and parameters when declaring settings in settings.json. The supported setting types and array shapes also determine what YouTrack can store.

Root Fields

Field

Type

Description

type

string

The schema root type. Use object.

title

string

An optional title displayed above the settings form.

description

string

An optional description displayed with the settings form.

properties

object

Named setting declarations. Each value is a setting schema.

required

Array.<string>

Keys of required settings. See Required Settings and Defaults.

Setting Parameters

The following parameters describe an individual setting. Use supported JSON Schema Draft 7 constraints together with the YouTrack-specific parameters.

Parameter

Type

Description

Required

type

string

The setting type.

✓

title

string

The field label displayed in the settings form.

 

description

string

Additional information displayed with the field.

 

default

Depends on the setting type

The initial value for an ordinary string, integer, number, boolean, or primitive array. See Required Settings and Defaults.

 

enum

Array.<any>

A fixed list of allowed values.

 

const

any

The only allowed value.

 

format

string

A string format. Use secret for credentials. The date format displays a calendar control.

 

minimum

number

The inclusive lower bound for an integer or number.

 

maximum

number

The inclusive upper bound for an integer or number.

 

exclusiveMinimum

number

The exclusive lower bound for an integer or number.

 

exclusiveMaximum

number

The exclusive upper bound for an integer or number.

 

minLength

integer

The minimum string length.

 

maxLength

integer

The maximum string length.

 

items

object

Required for array settings. Defines the schema for every item. See Arrays.

For arrays

minItems

integer

The minimum array size. Set to at least 1 to reject empty arrays. To require a setting value, also list its key in the root required array.

 

maxItems

integer

The maximum array size. Object arrays also have a configuration row limit.

 

uniqueItems

boolean

When true, rejects duplicate array items.

 

readOnly

boolean

When true, prevents editing the value in the settings form.

 

x-entity

string

The YouTrack entity type for an object-typed value. For entity arrays, declare it in items alongside "type": "object".

For entity references

x-scope

string

The configuration scope: GLOBAL or PROJECT. Omit this parameter to allow global values and project overrides.

 

Setting Scopes

The optional x-scope parameter restricts where an individual setting can be configured:

Declaration

Configuration Behavior

No x-scope

The setting can be configured globally and for individual projects. A project value takes precedence. Without a project value, the setting inherits the global value.

"x-scope": "GLOBAL"

The setting can be configured only globally.

"x-scope": "PROJECT"

The setting can be configured only for individual projects.

Changing a global value updates the effective value in projects that inherit that setting. Project overrides are independent for each setting.

Sample Settings File

This file combines text, numeric, and boolean settings with scopes, a secret, and entity selections. Array-specific examples are provided in Arrays.

{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "App Settings", "properties": { "message": { "title": "Message", "type": "string", "minLength": 1 }, "enabled": { "title": "Enabled", "type": "boolean", "default": false }, "retryLimit": { "title": "Retry Limit", "type": "integer", "x-scope": "GLOBAL" }, "timeoutSeconds": { "title": "Timeout", "type": "number", "x-scope": "PROJECT" }, "apiToken": { "title": "API Token", "type": "string", "format": "secret" }, "reviewers": { "title": "Reviewers", "type": "array", "items": { "type": "object", "x-entity": "User" } }, "owner": { "title": "Owner", "type": "object", "x-entity": "User" } } }
24 November 2026