> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data API and API key

> Overview of NexusOne's Data API and API key feature used for managing data API endpoints and ensuring secure access to data via the data API endpoints.

Data APIs are RESTful API endpoints used to interact with ingested data within the NexusOne platform.
This interaction uses the NexusOne [Ask](/documentation/ai/overview/ask) or
[Engineer](/documentation/data-pipeline/overview/engineer) feature.

Unlike data APIs, data API keys provide authentication for your app to interact securely with generated data APIs.
You can create, view, or delete the data APIs and data API keys.

## Interaction with the Ask and Engineer feature

Fundamentally, the Ask or Engineer feature generates an SQL query from natural language. This query becomes
a rule you can schedule in [Apache Airflow](/platform-components/apache-airflow/airflow-in-nx1) to interact
with your ingested data. However, if you have a custom app, you can't programmatically interact with this
rule to retrieve the latest processed data. To interact with the rule, you'd need a data API endpoint.

Here is a use case where you can use NexusOne data APIs. Say, you want your custom app to access data in
NexusOne programmatically and output the result in your custom dashboard. To achieve this, you can do the following:

1. Using the NexusOne Ask feature, you'd define a data insight rule that returns the top product sold
   every Friday in your organization.
2. You'd schedule the rule in Apache Airflow using NexusOne's
   [automatic reporting cycle](/documentation/ai/tasks/ask/generate-and-analyze-data-insights),
   so it runs weekly and keeps the insight up to date.
3. You'd then [create an Ask API](/documentation/ai/tasks/ask/create-an-ask-api) for that rule so
   NexusOne can generate a data API and a data API key from the Ask API.
4. When you use the data API and a data API key in your app, the app can then send an HTTP request
   to the data API endpoint.
5. When the data API endpoint returns a data insight response, your app consumes that response and
   feeds it into your organization's custom dashboard.

## Data-plane vs control-plane APIs

It's very easy to confuse data APIs with NexusOne APIs used to interact with the NexusOne platform.

When you create an Ask API or Engineer API, NexusOne generates a data API and API key you can use to consume data
insights or transformation results that already exist. This data API works in the data-plane and includes
the following:

* It's tied to a specific Ask or Engineer rule you defined earlier.
* You call it to fetch data insights via Ask or execute data transformation via Engineer.
* It's meant for data consumption or modification, not for creating or modifying an Ask or Engineer rule.

On the other hand, NexusOne APIs are control-plane APIs that include the following:

* You can find them in the [API reference](/api-reference/overview) page.
* They let you programmatically create, modify, or delete Ask or Engineer rules. These are the same
  actions you'd do in the NexusOne portal.

## Use cases

These examples show how different industries and teams can use NexusOne's Connect capabilities:

* **Retail**: Expose weekly top-selling products and show the results in your organization's custom dashboard.
* **Financial services**: Use the Engineer API to process transaction data, identify suspicious
  activity, and calculate compliance metrics. You can then create a data API for the compliance metrics data so
  your internal risk dashboard can call the data API and use its response to show the latest fraud alerts
  and compliance status.
* **Data platform teams**: Share datasets securely across provider and consumer tenants using Gravitino
  data shares credentials.

## Additional resources

For more information, refer to the following:

* [Create an Ask API](/documentation/ai/tasks/ask/create-an-ask-api).
* [Create an Engineer API](/documentation/data-pipeline/tasks/engineer/create-an-engineer-api).
* [Create a data API](/documentation/platform/tasks/data-api/create-a-data-api)
* [Create a data API key](/documentation/platform/tasks/data-api-key/create-a-data-api-key)
