# 80. Forespørgsel: Hent originale data

Forespørgsel for at hente en kopi af de uploadede originale data for "SoilDataset", "YieldDataset", "AsAppliedDataset".

{% hint style="danger" %}
Det anbefales kun at hente ét datasæt ad gangen  `originDataUrl` pr. forespørgsel.&#x20;
{% endhint %}

`GEOTIFF` og `GEOJSON` er tilgængelige som `formater`. Men **kun** `GEOJSON` understøttes nu.

{% hint style="danger" %}
`originDataUrl` linket er kun tilgængeligt i **60 sek.**
{% endhint %}

### 1. Eksempel for SoilDataset

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

```graphql
query GetOriginalDataOfSoilDataset {
  getFarms (farmUuids: ["<placeholder_of_farm_uuid>"]){
    uuid
    fields (fieldUuids: ["<placeholder_of_field_uuid>"]) {
      uuid
      soilDatasets(soilDatasetUuids: ["<placeholder_of_dataset_uuid>"]) {
        uuid
        originDataUrl(format: GEOJSON)
      }
    }
  }
}
```

{% endcode %}

### 2. Eksempel for YieldDataset

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

```graphql
query GetOriginalDataOfYieldDataset {
  getFarms (farmUuids: ["<placeholder_of_farm_uuid>"]){
    uuid
    fields (fieldUuids: ["<placeholder_of_field_uuid>"]) {
      uuid
      yieldDatasets(yieldDatasetUuids: ["<placeholder_of_dataset_uuid>"]) {
        uuid
        originDataUrl(format: GEOJSON)
      }
    }
  }
}
```

{% endcode %}

### 3. Eksempel for AsAppliedDataset

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

```graphql
query GetOriginalDataOfAsAppliedDataset {
  getFarms (farmUuids: ["<placeholder_of_farm_uuid>"]){
    uuid
    fields (fieldUuids: ["<placeholder_of_field_uuid>"]) {
      uuid
      asAppliedDatasets(asAppliedDatasetUuids: ["<placeholder_of_dataset_uuid>"]) {
        originDataUrl(format: GEOJSON)
      }
    }
  }
}
```

{% endcode %}

### 4. Download den genererede fil

Efter at filen er forberedt succesfuldt, er det muligt at downloade den ved hjælp af `curl` eller en lignende fremgangsmåde.

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

```bash
curl '<originDataUrl>' --compressed >> '<local_filepath>'
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.geopard.tech/geopard-tutorials/dnk/api-dokumentation/oversigt-over-geopard-api-anmodninger/80.-foresporgsel-hent-originale-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
