# Exporting Data

## Introduction

So you want to export data from Datacake? Great! Because it's easier than you might think right now.

We'll now introduce you to the options you have for exporting your sensors' measurement data, whether individually, as a group, or all the sensors in a workspace.

Basically, there are several ways of exporting data. However, in summary, these options fall into the following two categories.

* Real-Time Data Forward
* Historical Data Poll or Read Out

## Real-Time Data Push

### MQTT

For each device you create on Datacake, a topic automatically exists on our MQTT broker. This even applies to every database field that your device has. This way you can subscribe to single readings, whole devices, or a large group of devices via an external MQTT client.

* Automatically generates an MQTT message on incoming measurement value.
* Token-based authentication with dynamic rights management.
* Subscription per product (group of devices), single device, or database field.
* Bi-directional communication for a response from external systems or device communication.

Read more about our internal MQTT Integration here.

{% content-ref url="/pages/-MdLRa2ZrKEFaksfBrCN" %}
[Internal MQTT](/api/internal-mqtt.md)
{% endcontent-ref %}

### Webhook

Each workspace supports the storage of one or more web addresses, so-called outgoing webhooks. Depending on the action of the devices in your workspace, these web addresses (webhook URLs) are then called.

The actions can represent the following.

* Incoming measured values.
* Execution of the payload decoder (with debug output).
* Triggered downlink via user or rule engine.

Read more about our Outgoing Webhook Integration.

{% content-ref url="/pages/CAmNXg9J9ihp0diPX5yN" %}
[Outgoing Webhooks](/integrations/outgoing-webhooks.md)
{% endcontent-ref %}

### Node-RED

Datacake offers Node-RED extensions for real-time forwarding of selected sensor data. Read more about this feature here.

{% content-ref url="/pages/-M5wzgUXlayRKf7pbJyC" %}
[Node RED to Datacake](/api/node-red-to-datacake.md)
{% endcontent-ref %}

## Historical Data API

In addition to the real-time forwarding of measurement data, there are also interfaces that enable the readout of historical data. These interfaces often also provide an interface for reading out user data and controlling actions (such as creating devices, etc.).

### GraphQL API

{% content-ref url="/pages/-M3gKwizA\_A2MI4ZTWhS" %}
[GraphQL API](/api/graphql-api.md)
{% endcontent-ref %}

### CSV Reports

{% content-ref url="/pages/-MUPjRVVovUaQN8BYyAg" %}
[Reports](/portal/reports.md)
{% endcontent-ref %}


---

# 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.datacake.de/api/exporting-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.
