---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
  - property: og:type
    content: article
  - property: article:section
    content: Платформа плагинов
  - property: og:title
    content: Working with the Yandex Tracker API
  - property: article:tag
    content: Техническая инструкция
alternate:
  - https://yandex.ru/support/tracker/en/plugins/publicApi.md
  - https://yandex.ru/support/tracker/ru/plugins/publicApi.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/tracker/en/llms.txt


# Working with the Yandex Tracker API

A plugin can interact with Tracker data through its public API. Whether a particular action can be performed via the API depends on the plugin's own permissions and on the access rights of the user on whose behalf the requests are made.

To work with the Tracker API, the [SDK](tools/sdk) provides the `trackerApi` object:

```ts
import { trackerApi } from '@weavix/sdk-react';

const issue = await trackerApi.v3.get['/issues/{id}']({
  pathParams: { id: 'KEY-1' },
  queryParams: { expand: ['COMMENTS'] },
});
```

For endpoints that accept file uploads, the attachment is placed in the `file` field:

```ts
const atttachment = await trackerApi.v3.post['/attachments']({
  bodyParams: { filename },
  file,
});
```


At the beginning, in square brackets, you specify the path from the [Tracker REST API](https://yandex.ru/support/tracker/en/api-ref/about-api.md), followed by the parameters from the REST API.

## API error codes {#error-codes}

When calling methods, the host may return an error with a code. Constants are exported from the package:

```typescript
import {
  METHOD_NOT_SUPPORTED,
  MISSING_REQUIRED_SCOPE,
  PLUGIN_ID_IS_NOT_CORRECT,
  PLUGIN_ID_OR_SLOT_NOT_PROVIDED,
  UNKNOWN_ERROR,
  VALIDATION_ERROR,
} from '@weavix/sdk-react';
```

| Constant | Code | Description |
|-----------|-----|----------|
| `PLUGIN_ID_OR_SLOT_NOT_PROVIDED` | 1000 | Required plugin initialization parameters are missing. |
| `PLUGIN_ID_IS_NOT_CORRECT` | 1001 | Incorrect or mismatched pluginId. |
| `VALIDATION_ERROR` | 1002 | Request validation error. |
| `METHOD_NOT_SUPPORTED` | 1003 | Method is not supported. |
| `MISSING_REQUIRED_SCOPE` | 1004 | Insufficient permissions (scope). |
| `UNKNOWN_ERROR` | 6666 | Unknown error. |
