> For the complete documentation index, see [llms.txt](https://docs.geopard.tech/geopard-tutorials/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.geopard.tech/geopard-tutorials/ru/dokumentaciya-api/obzor-zaprosov-api-geopard/83.-zapros-sobrat-kontekst-platformy.md).

# 83. Запрос: собрать контекст платформы

При большом количестве (сотни или тысячи) обрабатываемых наборов данных (таких как "SatelliteImage", "AsAppliedDataset", "YieldDataset", "SoilDataset" и т.д.) всегда есть потребность понимать статус обработки каждого набора данных и собирать итог обработки. Эти данные предоставляются с помощью `getPlatformContext` запроса.&#x20;

Распространённые сценарии:&#x20;

* Отслеживание прогресса обработки
* Сбор сводки и статистики обработки
* Наблюдение за ошибками и предупреждениями во время обработки для последующего более глубокого расследования затронутых наборов данных

{% code overflow="wrap" lineNumbers="true" %}

```graphql
query CollectPlatformContext {
 getPlatformContext(input: {
   userUuids: ["<placeholder_of_user_uuid>"],
   statuses: [Start, Done, Warning, Error, Ignored],
   dateFrom: "2023-05-25T12:49:00.000Z", 
   dateTo: "2023-05-30T06:35:00.000Z", 
 }) {
   events {
     fieldUuid
     subFieldUuid
     subFieldType
     operationId
     status 
     executionDate
     messageKey
     необязательно
   }
 }
}
```

{% endcode %}

Поддерживаемые входные фильтры:

* `dateFrom` в формате datetime в ISO 8601 (напр.: `"2023-05-25T12:49:00.000Z"`)
* `dateTo` в формате datetime в ISO 8601 (напр.: `"2023-05-30T06:35:00.000Z"`)
* `operationIds` как массив идентификаторов операций (`Строки`)
* `statuses` как массив, содержащий значения из `ContextEventStatus` перечисление со всеми статусами обработки, включая промежуточные; рекомендуется использовать ключевые `[Start, Done, Warning, Error, Ignored]`
* `subFieldTypes` как массив, содержащий значения `TreeNodeEntity` перечисление со всеми сущностями GeoPard
* `subFieldUuids` как массив UUID, связанных с выбранными сущностями в `subFieldTypes`&#x20;
* `userUuids` как массив UUID пользователей для поиска

{% hint style="info" %}
Должен быть инициализирован хотя бы один из следующих фильтров: `userUuids`, `fieldUuids`, `subFieldUuids`, или `operationIds`.
{% endhint %}

{% hint style="info" %}
Если `dateFrom` и `dateTo` не указаны, по умолчанию длительность запроса устанавливается в 12 часов. Максимально рекомендуемый интервал для извлечения данных — 24 часа.
{% endhint %}

{% hint style="info" %}
Существует ограничение: максимум 10 000 строк.
{% endhint %}

{% hint style="info" %}
Чтобы просмотреть все доступные последние значения перечислений (например: `TreeNodeEntity`,  `ContextEventStatus, ContextMessageKey`), рекомендуется использовать [Altair](/geopard-tutorials/ru/dokumentaciya-api/nachalo-raboty-s-api-geopard.md).
{% endhint %}

Выходной объект включает следующие атрибуты:

* `fieldUuid` представляет UUID связанного поля (Field)
* `subFieldUuid` обозначает UUID связанного обработанного набора данных (например "SatelliteImage", "AsAppliedDataset", "YieldDataset", "SoilDataset" и т.д.)
* `subFieldType` как перечисление, связанное с `TreeNodeEntity`
* `operationId` как строка, содержащая идентификатор операции; он остаётся неизменным во всех связанных цепочках обработки, рекомендуется группировать по этому идентификатору для отслеживания всех стадий обработки
* `status` как перечисление, связанное с `ContextEventStatus`
* `executionDate` как строка в формате ISO 8601, указывающая момент выполнения
* `messageKey` как перечисление, связанное с `ContextMessageKey` которая описывает результат выполнения
* `необязательно` как строка, предоставляющая техническое описание (если применимо); в основном используется для отладки и составления отчетов об ошибках


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.geopard.tech/geopard-tutorials/ru/dokumentaciya-api/obzor-zaprosov-api-geopard/83.-zapros-sobrat-kontekst-platformy.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
