---
schema: rendered-html/v1
title: "Command Suggestions | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/resource-api-commands-assist.html
generated_at: 2026-06-11T15:11:54.109725+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Get Started with REST API
- REST API Reference
- Entities
- Resources
- Activity Items
- Issue Activities Page
- Build Bundles
- Enum Bundles
- Owned Bundles
- State Bundles
- User Bundles
- Version Bundles
- Custom Fields
- Field Types
- Backup Files
- Database Backup Settings
- Global Settings
- Organizations
- Projects
- Telemetry data
- Global Time Tracking Settings
- Agiles
- [Articles](jetbrains__com__help__youtrack__devportal__resource-api-articles.md)
- [Assigned Roles](jetbrains__com__help__youtrack__devportal__resource-api-assignedroles.md)
- [Commands](jetbrains__com__help__youtrack__devportal__resource-api-commands.md)
- [Command Suggestions](resource-api-commands-assist.html)
- [User Groups](jetbrains__com__help__youtrack__devportal__resource-api-groups.md)
- [Issue Link Types](jetbrains__com__help__youtrack__devportal__resource-api-issuelinktypes.md)
- Issue Tag
- Issues
- Issue Count
- Permissions
- Roles
- Saved Queries
- Search Suggestions
- Tags
- Users
- My User Profile
- Issue Work Items
- REST API Use Cases
- REST API Troubleshooting
- Color Indices List
- Hub REST API

1. YouTrack REST API
2. REST API Reference
3. Resources
4. [Command Suggestions](#0)

# Command Suggestions﻿

Last modified: 24 March 2026

Lets you get suggestions for the currently entered command.

| Resource | ``` /api/commands/assist ``` |
| --- | --- |
| Returned entity | CommandList. For the description of the entity attributes, see [Supported Fields](/help/youtrack/devportal/resource-api-commands-assist.html#CommandList-supported-fields) section. |
| Supported methods | - `POST`: [Command Suggestions](/help/youtrack/devportal/resource-api-commands-assist.html#create-CommandList-method). |

## CommandList attributes﻿

Represents list of command and related comment in YouTrack. Can be used to either apply a command or get command suggestions.

### Related Resources﻿

Below you can find the list of resources that let you work with this entity.

- [Commands](jetbrains__com__help__youtrack__devportal__resource-api-commands.md)
- Command Suggestions

### Attributes﻿

This table describes attributes of the `CommandList` entity.

- To receive an attribute in the response from the server, specify it explicitly in the `fields` request parameter.
- To update an attribute, provide it in the body of a POST request.

| Field | Type | Description |
| --- | --- | --- |
| id | String | The ID of the command list. `Read-only`. |
| comment | String | A comment to add to an issue. `Can be null`. |
| visibility | CommandVisibility | Stores visibility settings for a comment added with the command. |
| query | String | Stores a command to apply. `Can be null`. |
| caret | Int | Current caret position. End of current command by default. |
| silent | Boolean | If true, the command is applied without notification. The default value is false. |
| runAs | String | Login for a user on whose behalf the command is executed. To use the runAs parameter, you must have the Low-level Administration permission. `Can be null`. |
| commands | Array of ParsedCommands | Stores a collection of commands parsed from the provided query. `Read-only`. |
| issues | Array of Issues | Stores a collection of issues to which the current command applies. |
| suggestions | Array of Suggestions | Stores a collection of possible command suggestions. `Read-only`. |

## Read Command Suggestions﻿

Get command suggestions for the specified query. Enter the command in the request body.

Required fields: `query` - the command that you'll get suggestions for.

### Request syntax﻿

```
POST /api/commands/assist?{fields}
```

| null | The database ID of CommandList |
| --- | --- |

### Request parameters﻿

| Parameter | Type | Description |
| --- | --- | --- |
| fields | String | A list of CommandList attributes that should be returned in the response. If no field is specified, only the `entityID` is returned. |

### Sample﻿

#### Sample request﻿

```
https://example.youtrack.cloud/api/commands/assist?fields=caret,commands%28delete,description,error%29,query,styleRanges%28end,length,start,style%29,suggestions%28caret,className,comment,completionEnd,completionStart,description,group,icon,id,matchingEnd,matchingStart,option,prefix,suffix%29
```

#### Sample request body﻿

```
{
"query": "sta",
"caret": 3,
"issues": [ { "idReadable": "SP-32" } ]
```

#### Sample response body﻿

```
{
  "query": "sta",
  "suggestions": [
    {
      "group": null,
      "suffix": " ",
      "option": "star",
      "description": "change star",
      "prefix": null,
      "icon": null,
      "caret": 5,
      "completionStart": 0,
      "completionEnd": 3,
      "matchingStart": 0,
      "matchingEnd": 3,
      "id": "star",
      "className": null,
      "$type": "Suggestion"
    },
    {
      "group": null,
      "suffix": " ",
      "option": "State",
      "description": "change State",
      "prefix": null,
      "icon": null,
      "caret": 6,
      "completionStart": 0,
      "completionEnd": 3,
      "matchingStart": 0,
      "matchingEnd": 3,
      "id": "State",
      "className": null,
      "$type": "Suggestion"
    },
    {
      "group": null,
      "suffix": " ",
      "option": "tag Star",
      "description": "tag",
      "prefix": null,
      "icon": null,
      "caret": 9,
      "completionStart": 0,
      "completionEnd": 3,
      "matchingStart": 4,
      "matchingEnd": 7,
      "id": "tag Star",
      "className": null,
      "$type": "Suggestion"
    },
    {
      "group": "Recent Commands",
      "suffix": " ",
      "option": "State In Progress",
      "description": "at 14:04",
      "prefix": null,
      "icon": null,
      "caret": 18,
      "completionStart": 0,
      "completionEnd": 3,
      "matchingStart": 0,
      "matchingEnd": 3,
      "id": "State In Progress",
      "className": null,
      "$type": "Suggestion"
    },
    {
      "group": "Recent Commands",
      "suffix": " ",
      "option": "State Open",
      "description": "at 14:04",
      "prefix": null,
      "icon": null,
      "caret": 11,
      "completionStart": 0,
      "completionEnd": 3,
      "matchingStart": 0,
      "matchingEnd": 3,
      "id": "State Open",
      "className": null,
      "$type": "Suggestion"
  ],
  "caret": 3,
  "commands": [
    {
      "error": true,
      "description": "Unknown command: sta",
      "delete": false,
      "$type": "ParsedCommand"
  ],
  "styleRanges": [
    {
      "start": 0,
      "style": "error",
      "length": 3,
      "$type": "StyleRange"
  ]
```

- [Command Suggestions](/help/youtrack/devportal/resource-api-commands-assist.html)
- [CommandList attributes](/help/youtrack/devportal/resource-api-commands-assist.html#CommandList-supported-fields)
- [Read Command Suggestions](/help/youtrack/devportal/resource-api-commands-assist.html#create-CommandList-method)

[Commands](jetbrains__com__help__youtrack__devportal__resource-api-commands.md)[User Groups](jetbrains__com__help__youtrack__devportal__resource-api-groups.md)

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.
