> 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/it/documentazione-api/panoramica-delle-richieste-dellapi-geopard/83.-query-raccogli-il-contesto-della-piattaforma.md).

# 83. Query: Raccogli il contesto della piattaforma

Con un gran numero (centinaia o migliaia) di dataset processati (come "SatelliteImage", "AsAppliedDataset", "YieldDataset", "SoilDataset", ecc.) c'è sempre la necessità di comprendere lo stato dell'elaborazione di ogni dataset e raccogliere il riepilogo del processo. Questi dettagli sono forniti usando `getPlatformContext` query.&#x20;

I casi comuni:&#x20;

* Tracciare il progresso dell'elaborazione
* Raccogliere riepiloghi e statistiche di elaborazione
* Osservare errori e avvisi durante l'elaborazione per indagini più approfondite sui dataset interessati

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

Filtri di input supportati:

* `dateFrom` come data/ora in formato ISO 8601 (es.: `"2023-05-25T12:49:00.000Z"`)
* `dateTo` come data/ora in formato ISO 8601 (es.: `"2023-05-30T06:35:00.000Z"`)
* `operationIds` come array di identificatori dell'operazione (`Stringhe`)
* `statuses` come array contenente valori da `ContextEventStatus` enum con tutti gli stati di elaborazione inclusi quelli intermedi; è consigliato usare i principali `[Start, Done, Warning, Error, Ignored]`
* `subFieldTypes` come array contenente valori di `TreeNodeEntity` enum con tutte le entità GeoPard
* `subFieldUuids` come array con UUID collegati alle entità selezionate in `subFieldTypes`&#x20;
* `userUuids` come array di UUID degli "User" da ricercare

{% hint style="info" %}
Almeno uno dei seguenti filtri deve essere inizializzato: `userUuids`, `fieldUuids`, `subFieldUuids`, o `operationIds`.
{% endhint %}

{% hint style="info" %}
Se `dateFrom` e `dateTo` non sono specificati, la durata predefinita della query è impostata a 12 ore. L'intervallo di tempo massimo consigliato per il recupero dei dati è di 24 ore.
{% endhint %}

{% hint style="info" %}
Esiste un limite di massimo 10.000 righe restituite.
{% endhint %}

{% hint style="info" %}
Per osservare tutti i valori più recenti disponibili degli enum (come: `TreeNodeEntity`,  `ContextEventStatus, ContextMessageKey`), è consigliato usare [Altair](/geopard-tutorials/it/documentazione-api/introduzione-allapi-geopard.md).
{% endhint %}

L'oggetto di output include i seguenti attributi:

* `fieldUuid` rappresenta l'UUID del Campo associato
* `subFieldUuid` indica l'UUID del dataset processato collegato (come "SatelliteImage", "AsAppliedDataset", "YieldDataset", "SoilDataset", ecc.)
* `subFieldType` come enum collegato a `TreeNodeEntity`
* `operationId` come stringa che contiene l'identificatore dell'operazione; resta coerente lungo tutte le catene di elaborazione correlate; è consigliabile raggruppare per questo identificatore per tracciare tutte le fasi di elaborazione
* `status` come enum collegato a `ContextEventStatus`
* `executionDate` come stringa in formato ISO 8601 che indica il momento dell'esecuzione
* `messageKey` come enum collegato a `ContextMessageKey` che descrive l'esito dell'esecuzione
* `optional` come stringa che fornisce una descrizione tecnica (se pertinente), è utilizzata principalmente per il debug e la segnalazione di bug


---

# 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/it/documentazione-api/panoramica-delle-richieste-dellapi-geopard/83.-query-raccogli-il-contesto-della-piattaforma.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.
