Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Tracker
  • Getting started
  • Yandex Tracker mobile app
  • Tutorials
  • Concepts
  • Configuring queues
  • Working with issues
  • Structuring issues
  • Projects
  • Agile development tools
  • Issue boards (beta)
  • Find issues
  • Notifications and subscriptions
  • Statistics and dashboards
  • Automation and templates
  • Configuring an SLA for issues
  • Integration with other services
  • Developer tools
  • Pricing policy
  • API reference
    • Overview
    • API access
    • Generic request format
    • Issues
    • Checklists
    • Projects
    • Comments
    • Macros
      • Get queue macros
      • Get a macro
      • Create a macro
      • Edit a macro
      • Delete a macro
    • External links
    • Attached files
    • Queues
    • Issue boards
    • Components
    • Import
    • Bulk operations
    • Time tracking
    • Issue fields
    • Users
    • Possible response codes
  • Questions and answers
  • Revision history
  • Support
  1. API reference
  2. Macros
  3. Get queue macros

Get queue macros

Written by
Yandex Cloud
  • Request format
  • Response format

Use this request to get parameters of all macros in a queue.

Request format

Before making the request, get permission to access the API.

To get parameters of all macros in a queue, use an HTTP GET request:

GET /v2/queues/<queue-id>/macros
Host: https://api.tracker.yandex.net
Authorization: OAuth <token>
X-Org-ID: <organization ID>
Headers
  • Host

    API host address:

    https://api.tracker.yandex.net
    
  • Authorization

    OAuth token in OAuth <token value> format. For example:

    OAuth 0c4181a7c2cf4521964a72ff57a34a07
    
  • X-Org-ID

    Organization ID.

Resource
Parameter Description Data type
<queue-id> Queue ID or key. The queue key is case-sensitive. String

Response format

Request executed successfully
Request failed

If the request is successful, the API returns a response with code 200 OK.

The response body contains a JSON array with the parameters of all queue macros.

[
  {
    "self": "https://api.tracker.yandex.net/v2/queues/TEST/macros/3",
    "id": 3,
    "queue": {
      "self": "https://api.tracker.yandex.net/v2/queues/TEST", 
      "id": "1",
      "key": "TEST",
      "display": "Test queue"
       },
    "name": "Test macro",
    "body": "Test message\n{{currentUser}}{{currentDateTime.date}}{{currentDateTime}}\n{{issue.author}}",
    "fieldChanges": [
      {
        "field": {
           "self": "https://api.tracker.yandex.net/v2/fields/tags", 
           "id": "tags",
           "display": "Tags"
          },
        "value": [
                "tag1", "tag2"
                 ]
      },
       ...
    ]
  },
   ...
]
Response parameters
Parameter Description Data type
self Address of the API resource with macro parameters. String
id Macro ID. Number
queue Object with information about the queue whose issues that the macro is applied to. Object
name Macro name. String
body Message to be created when executing the macro. Format: <Message text>\n<variable>
where:
  • <Message text>: Text to be created in the Comment field when executing the macro.
  • \n: Line break symbol.
  • Variable that may contain:
    {{currentUser}}: Name of the user who ran the macro.
    {{currentDateTime.date}}: Macro execution date.
    {{currentDateTime}}: Macro execution date and time.
    {{issue.<field_key>}}: Key of the issue field to be displayed in the message. Full list of issue fields: https://tracker.yandex.ru/admin/fields
To delete the message, use the construction "body": {"unset":1}
String

Object fields queue

Parameter Description Data type
self Address of the API resource with information about the queue. String
id Queue ID. String
key Queue key. String
display Queue name displayed. String

Array objects fieldChanges

Parameter Description Data type
field Object with information about the issue field. Object
value Array of issue field values. Array of objects

Object fields field

Parameter Description Data type
self Address of the API resource with information about the issue field. String
id Issue field ID. String
display Issue field name displayed. String

If the request is processed incorrectly, the API returns a response with an error code:

400
One or more request parameters have an invalid value.
403
Insufficient rights to perform this action. You can check what rights you have in the Tracker interface. The same rights are required to perform an action via the API and interface.
404
The requested object was not found. You may have specified an invalid object ID or key.
500
Internal service error. Try resending your request in a few minutes.
503
The API service is temporarily unavailable.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Request format
  • Response format