[Yandex Cloud documentation](../../../../index.md) > [Yandex Serverless Integrations](../../../index.md) > [Step-by-step guides](../../index.md) > Workflows > [Workflow step constructor](index.md) > Integration steps > Tracker

# Accessing the Yandex Tracker API

{% list tabs %}

- Management console {#console}

  1. When [creating](../workflow/create-constructor.md) a new workflow or [editing](../workflow/update.md) an existing one, in the management console, under **Create workflow** / **Edit workflow**, select `Constructor`. 
  1. From the **Integration steps** section on the left side of the screen, drag the ![tracker-icon](../../../../_assets/tracker-icon.svg) **Tracker** element to the relevant workflow location in the constructor window.

      You can drag and drop steps into areas marked by the dotted line in the workflow schema, such as **Add a step**, etc.
  1. In the workflow schema window, click the new **Tracker** section to select it.
  1. At the right of the window, on the **Settings** tab.

      1. In the **Step name** field, enter a name for the workflow step.
      1. Optionally, if the Yandex Tracker API uses a non-standard endpoint, edit the default value in the **Endpoint** field accordingly.
      1. Under **OAuth token**, specify the [app OAUth token](https://yandex.ru/support/tracker/ruconcepts/access#about_OAuth) or Yandex Lockbox [secret](../../../../lockbox/concepts/secret.md) that stores the token. Select:

          * `Lockbox` to store the OAuth token in a secret; in the **Secret** section, select the secret, its [version](../../../../lockbox/concepts/secret.md#version), and the key used to store the OAuth token.

              If you do not have a Yandex Lockbox secret, click **Create** to create it.
            
          * `Text` to store the OAuth token in the specification as text; enter the OAuth token in the **Value** field.

              {% note warning %}

              It is not safe to store your OAuth token in the specification in plain text.

              {% endnote %}

      1. In the **Organization** field, select the type of the organization your Tracker is connected to: `Yandex Cloud Organization` or `Yandex 360`. Alternatively, set it to `Not specified` if you do not want to specify any organization.

          If you specified the organization type, specify its ID in the **Organization ID** field.

          For more information about organizations, see the [Yandex Tracker guide](https://yandex.ru/support/tracker/ruenable-tracker).
      1. In the **Action** field, select the action to perform with Tracker issues:

          {% cut "`Get issue`" %}

          1. In the **Issue key** field, specify the issue [key](https://yandex.ru/support/tracker/ruglossary#rus-k), i.e., its unique ID.

          {% endcut %}

          {% cut "`Create issue`" %}

          1. In the **Queue** field, specify the ID of the [queue](https://yandex.ru/support/tracker/ruqueue-intro) to create your issue in.
          1. In the **Name** field, enter the issue name.
          1. Optionally, in the **Parent issue** field, specify the parent issue key.
          1. Optionally, in the **Description** field, enter a description for the new issue.
          1. Under **Add to sprints**, specify the [sprints](https://yandex.ru/support/tracker/rumanager/create-agile-sprint) to add your issue to, if required. Select:

              * `Do not add` if you do not want to add the issue to any sprint.
              * `List` to add sprints one by one using ![plus](../../../../_assets/console-icons/plus.svg).
              * `JSON` to add sprints as a JSON array or jq template.

          1. Optionally, in the **Type** field, specify the issue [type](https://yandex.ru/support/tracker/ruglossary#rus-t).
          1. Optionally, in the **Priority** field, specify the issue priority.
          1. Under **Add followers**, specify the users to add to your new issue as followers. Select:

              * `Do not add` if you do not want to add any followers.
              * `List` to add followers by their usernames or IDs one by one using ![plus](../../../../_assets/console-icons/plus.svg).
              * `JSON` to add followers by their usernames or IDs provided as a JSON array or jq template.

          1. Optionally, in the **Assignee** field, specify the username or ID of the user to assign the issue to.
          1. Optionally, in the **Author** field, specify the username or ID of the user creating the issue.
          1. Optionally, in the **Additional fields** field, use ![plus](../../../../_assets/console-icons/plus.svg) to set additional fields for the new issue, in `<field_name>`:`<field_value>` format.

          {% endcut %}

          {% cut "`Update issue`" %}

          {% note info %}

          If you do not set new values for the optional fields, they will remain the same.

          {% endnote %}

          1. In the **Issue key** field, specify the [key](https://yandex.ru/support/tracker/ruglossary#rus-k) of the issue you want to update.
          1. Optionally, in the **Name** field, set a new name for the issue.
          1. Optionally, in the **Parent issue** field, specify the new parent issue key.
          1. Optionally, in the **Description** field, set a new description for the issue.
          1. Under **Change sprints**, edit the sprints which include the issue, if required. Select:

              * `Do not change` to not edit the sprints which include the issue.

              * `Replace sprints` to replace all current sprints the issue is included in with new ones. In the **Sprint** field, select:

                  * `List` to set new sprints one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                  * `JSON` to set new sprints as a JSON array or jq template.

              * `Add sprint` to add new sprints to those which already include the issue. In the **Sprint** field, select:

                  * `List` to add sprints one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                  * `JSON` to add sprints as a JSON array or jq template.

              * `Delete sprint` to delete the issue from sprints. In the **Sprint** field, select:

                  * `List` to set the sprints you want to remove the issue from one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                  * `JSON` to set the sprints you want to remove the issue from as a JSON array or jq template.

              * `Update sprint` to replace all current sprints which include the issue with the specified ones. In the **Sprint** field, select:

                  * `Dictionary` to specify the update rules for the sprints using ![plus](../../../../_assets/console-icons/plus.svg), in `<Original_value>`:`<New_value>` format, where `<Original_value>` is the current sprint which includes the issue and `<New_value>` is the sprint to replace the current one.
                  * `JSON` to specify the update rules for your sprints as a JSON object or jq template.

          1. Optionally, in the **Type** field, set the new issue type.
          1. Optionally, in the **Priority** field, set a new priority for the issue.
          1. Under **Change followers**, edit the issue followers, if required. Select:

              * `Do not change` to not edit the issue followers.
              * `Replace followers` to replace all current issue followers with new ones. In the **Follower** field, select:

                  * `List` to set new followers by their usernames or IDs one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                  * `JSON` to set new followers by their usernames or IDs provided as a JSON array or jq template.

              * `Add follower` to add new issue followers to the existing ones. In the **Follower** field, select:

                  * `List` to add followers by their usernames or IDs one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                  * `JSON` to add followers by their usernames or IDs provided as a JSON array or jq template.

              * `Delete follower` to remove followers from the issue. In the **Follower** field, select:

                  * `List` to set the followers you want to remove from the issue by their usernames or IDs one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                  * `JSON` to set the followers you need to remove from the issue by their usernames or IDs as a JSON array or jq template.

              * `Update follower` to replace current issue followers with the specified ones. In the **Follower** field, select:

                  * `Dictionary` to specify the update rules for the followers using ![plus](../../../../_assets/console-icons/plus.svg), in `<Original_value>`:`<New_value>` format, where `<Original_value>` is the username or ID of a current follower and `<New_value>` is that of the follower to replace the current one.
                  * `JSON` to specify the update rules for the followers as a JSON object or jq template.

          1. Optionally, in the **Additional fields** field, edit the additional fields of your issue. To do this, click ![plus](../../../../_assets/console-icons/plus.svg). In the settings section that opens, do the following:
          
              1. In the **Field name** field, enter the name of the field you want to edit.
              1. Under **Change field**, select:

                  * `Replace value` to replace all current field values with new ones. In the **Value** field, select:

                      * `List` to set new field values one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                      * `JSON` to set new field values as a JSON array or jq template.

                  * `Add value` to add new field values to the existing ones. In the **Value** field, select:

                      * `List` to add field values one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                      * `JSON` to add field values as a JSON array or jq template.

                  * `Delete value` to delete the field values. In the **Value** field, select:

                      * `List` to set the field values you want to delete one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                      * `JSON` to set the field values you need to delete as a JSON array or jq template.

                  * `Update value` to replace current field values with the specified ones. In the **Value** field, select:

                      * `Dictionary` to specify the update rules for the field values using ![plus](../../../../_assets/console-icons/plus.svg), in `<Original_value>`:`<New_value>` format, where `<Original_value>` is the current field value and `<New_value>` is the field value to replace the current one.
                      * `JSON` to specify the update rules for the field values as a JSON object or jq template.

          {% endcut %}

          {% cut "`Link issue`" %}

          1. In the **Key of first issue** field, specify the key of the first issue you want to create a link for.
          1. In the **Key of the second issue** field, specify the key of the second issue which you want to link to the first one.
          1. In the **Link type** field, select the type of the link between the issues.

          {% endcut %}

          {% cut "`Find issue`" %}

          1. Under **Search parameters**, select:

              * `Queue` to get issues from the specified queue. In the **Queue name** field, enter the [key of the queue](https://yandex.ru/support/tracker/ruglossary#rus-k) you want to get issues from.

              * `Issue key list` to get issues with the specified keys. In the **Issue keys** field, select:

                  * `List` to set issue keys one by one using ![plus](../../../../_assets/console-icons/plus.svg).
                  * `JSON` to set issue keys as a JSON array or jq template.

              * `Issue filtering parameters` to get issues with the specified field values.

                  1. In the **Filtering fields** field, use ![plus](../../../../_assets/console-icons/plus.svg) to specify the fields to filter your issues by and the values of those fields.
                  1. Optionally, to sort the returned issues, select `Enabled` in the **Sort by** field and specify the name of the field to sort your issues by. Enable the **Descending** option to sort your issues in descending order.

              * `Query language filter` to return issues for the specified Yandex Tracker [query language filter](https://yandex.ru/support/tracker/ruuser/query-filter).

          1. In the **Page size** field, specify the number of issues to show per [page](https://yandex.ru/support/tracker/rucommon-format#displaying-results) with search results.
          1. In the **Page name** field, specify the number of the search results page you want to get.

          {% endcut %}

          {% cut "`Update issue status`" %}

          1. In the **Issue key** field, specify the [key](https://yandex.ru/support/tracker/ruglossary#rus-k) of the issue to edit the status for.
          1. In the **Transition** field, specify the issue transition ID.
          1. Optionally, in the **Additional fields** field, use ![plus](../../../../_assets/console-icons/plus.svg) to set additional fields for the issue and their values required for the transition.

          {% endcut %}

          {% cut "`Add comment`" %}

          1. In the **Issue key** field, specify the [key](https://yandex.ru/support/tracker/ruglossary#rus-k) of the issue you want to add a comment to.
          1. In the **Text** field, specify the comment text.
          1. Optionally, under **Invite users**, set the users to invite to the issue in the comment you are adding. Select:

              * `Do not invite` to not invite anyone.
              * `List` to specify users to invite by their usernames or IDs one by one using ![plus](../../../../_assets/console-icons/plus.svg).
              * `JSON` to specify usernames or IDs of the users you invite as a JSON array or jq template.

          {% endcut %}

          {% cut "`Update comment`" %}

          1. In the **Comment ID** field, specify the ID of the comment you want to update.
          1. In the **Issue key** field, specify the [key](https://yandex.ru/support/tracker/ruglossary#rus-k) of the issue where you want to update a comment.
          1. In the **Text** field, add the new comment text.

          {% endcut %}

          {% cut "`Get comment`" %}

          1. In the **Issue key** field, specify the [key](https://yandex.ru/support/tracker/ruglossary#rus-k) of the issue to get comments from.
          1. Optionally, in the **Comment ID** field, specify the _from_ comment ID. The response will return comments created later than the one you specify, excluding that comment.
          1. Optionally, in the **Number of comments** field, set the maximum number of comments to return in the response.

          {% endcut %}

      1. Optionally, in the **Timeout, ms** field, set the maximum execution time for the current step.
      1. Optionally, to set a custom retry policy for a step, expand the **Retry policy** section and click ![plus](../../../../_assets/console-icons/plus.svg) **Retry policy**. In the form that appears:
         
         1. Optionally, in the **Initial delay, ms** field, set the initial value for a delay between step retries.
         1. Optionally, in the **Backoff rate** field, set the multiplication factor for delay before each step retry.
         1. Optionally, in the **Maximum delay, ms** field, set the value for a maximum delay between step retries.
         1. In the **Errors** field, select the errors for which the step will or will not be retried.
         
             For detailed information about possible errors, see [this section](../../../concepts/workflows/execution.md#errors).
         1. Optionally, in the **Maximum number of retries** field, set the maximum number of step retry attempts.
         1. In the **Error selection mode** field, select:
         
             * `INCLUDE`: Retry executing a step when errors specified in the **Errors** field occur.
             * `EXCLUDE`: To retry executing the step on any errors other than those specified in the **Errors** field.
         
         If you want to delete a retry policy you created for the step earlier, click ![ellipsis](../../../../_assets/console-icons/ellipsis.svg) and select **Delete** in the **Retry policy** row.
         
         If no custom retry policy is configured for a step, the retry policy [set for the whole workflow](setup-restart-policy.md) will apply.
  1. Optionally, navigate to the **Input** tab and set a [jq template](../../../concepts/workflows/templating.md) to filter the [workflow state](../../../concepts/workflows/workflow.md#state) fed into the step.
  1. Optionally, navigate to the **Output** tab and set a [jq template](../../../concepts/workflows/templating.md) to filter the step outputs added into the [workflow state](../../../concepts/workflows/workflow.md#state).
  1. Optionally, [add](setup-catch-rule.md) an [error transition rule](../../../concepts/workflows/yawl/index.md#catchrule) for the step you are creating to handle errors you may get during this step.

{% endlist %}

## Useful links {#see-also}

* [YaWL specification](../../../concepts/workflows/yawl/integration/tracker.md)
* [Creating a workflow using the constructor](../workflow/create-constructor.md)
* [Updating a workflow](../workflow/update.md)