> 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/bg/dokumentaciya-na-api/geopard-api-requests-overview/83.-query-collect-platform-context.md).

# 83. Заявка: Събиране на контекст на платформата

При голям брой обработени набори от данни (стотици или хиляди), като "SatelliteImage", "AsAppliedDataset", "YieldDataset", "SoilDataset" и др., винаги е необходимо да се следи състоянието на обработката на всеки набор от данни и да се събира обобщена информация за обработката. Тези подробности се предоставят чрез `getPlatformContext` заявката.

Често срещани случаи:

* Проследяване на напредъка на обработката
* Събиране на обобщена информация и статистически данни за обработката
* Наблюдение на грешки и предупреждения по време на обработката за последващо подробно проучване на засегнатите набори от данни

{% 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
     optional
   }
 }
}
```

{% endcode %}

Поддържани входни филтри:

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

{% 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](https://docs.geopard.tech/geopard-tutorials/bg/dokumentaciya-na-api/getting-started-with-the-geopard-api.md).
{% endhint %}

Изходният обект включва следните атрибути:

* `fieldUuid` представлява UUID на свързаното поле
* `subFieldUuid` обозначава UUID на свързания обработен набор от данни (например „SatelliteImage“, „AsAppliedDataset“, „YieldDataset“, „SoilDataset“ и др.)
* `subFieldType` като изброяване, свързано с `TreeNodeEntity`
* `operationId` като низ, съдържащ идентификатора на операцията. Той остава постоянен във всички свързани вериги за обработка. Препоръчително е да групирате по този идентификатор, за да проследите всички етапи на обработката.
* `status` като изброяване, свързано с `ContextEventStatus`
* `executionDate` като низ във формат ISO 8601, който указва момента на изпълнение
* `messageKey` като изброяване, свързано с `ContextMessageKey` което описва резултата от изпълнението
* `optional` като низ, съдържащ техническо описание (ако е приложимо); използва се предимно за отстраняване на грешки и докладване на проблеми


---

# 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/bg/dokumentaciya-na-api/geopard-api-requests-overview/83.-query-collect-platform-context.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.
