# 80. Query: Get Original Data

Query to get the copy of the uploaded original data of "SoilDataset", "YieldDataset", "AsAppliedDataset".

{% hint style="danger" %}
Recommended retrieving only a single dataset  `originDataUrl` per request.&#x20;
{% endhint %}

`GEOTIFF` and `GEOJSON` are available as `formats`. But **only** `GEOJSON` is now supported.

{% hint style="danger" %}
`originDataUrl` link is accessible for only **60 sec.**
{% endhint %}

### 1. Sample 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. Sample 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. Sample 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 the generated file

After the successful preparation of the file, it is possible to download it using `curl` or a similar approach.

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

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

{% endcode %}
