Generate APIs from Raw Data#
Apperate enables you to easily turn real-time data into secure, fast APIs to accelerate application development. When you store data in Apperate the data is automatically schema validated and available through a standard API interface, so you can focus on your application instead of the access layer.
Here we’ll load some raw data from a file into Apperate, examine the data in the console, and then access the data from its auto-generated API.
Load Some Data#
Let’s load some data into Apperate from a file.
Click Datasets in the navigation.
The Workspaces page appears.
Click Create a dataset. The Create a dataset page appears.
Note
Datasets are schema-based database tables that come with additional benefits.
On the Create a dataset page, name your dataset and keep the source type set to Local file. Load the sample data file by clicking Try using our sample file.
Your new dataset’s Database page appears.
The sample data records contain open, high, low, close, and volume data for the AAPL stock.
Click the Overview tab. The Overview page appears.
See also
For Overview page details, see Dataset Overview Page reference.
Let’s test drive the data’s auto-generated API.
Access the Data from its API#
From the Overview page, read data from your new dataset by clicking the Example request URL.
The URL opens in a new browser tab and the request returns a JSON object containing the dataset’s last record.
[
{
"close": 148.64,
"date": "2021-10-25",
"high": 149.37,
"low": 147.6211,
"open": 148.68,
"symbol": "AAPL",
"volume": 50720556
}
]
Tip
The Example request URL uses the Data API. You can use the URL as a base on which to query the dataset using other parameters and values. See Querying Data for examples.
Visit Your API Docs#
From the Overview page, you can visit your dataset API docs by clicking Open Docs. Your API docs page, like the one shown below, opens in a new tab.
Your auto-documented dataset is ready for consumption.
You just loaded data into Apperate and retrieved a record from the dataset using the dataset’s API! It’s just that easy to store data in Apperate and make that data available to your apps!!
What’s Next#
After creating a dataset, you can edit its schema however you like. For more information on managing datasets, please see Understanding Datasets.
Here are key features to dive into next:
Processing Events explains how you can consume and publish events in Apperate.
Write Data in Real Time with the apperate.write() JS Method demonstrates using the Data API to write data to Apperate and read the data back via its auto-generated API. This simulates storing and retrieving application data.
IEX Cloud Financial Data introduces Apperate’s built-in, production-ready financial data bundles and Using IEX Cloud Financial Data guides you in using them to enrich fintech applications.
Connect to Data provides tutorials for connecting to data from various data sources including these:
Load More Data into a Dataset explains how to load data from other data sources into existing datasets.