Introduction
The Wolfram Data Drop Web API allows you to programmatically interact with Wolfram Data Drop, enabling you to store, retrieve, and analyze data using Wolfram's powerful computational intelligence.
Authentication
To use the Wolfram Data Drop API, you need to include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
Note: You can obtain your API key from the Wolfram Cloud account settings.
Endpoints
POST /api/v1/drop/{binID}
Add data to a specific bin.
Request Body:
{
"data": {
"temperature": 25.5,
"humidity": 60,
"timestamp": "2023-06-10T14:30:00Z"
}
}
GET /api/v1/bin/{binID}
Retrieve data from a specific bin.
Query Parameters:
limit
(optional): Number of records to return (default: 100)offset
(optional): Number of records to skip (default: 0)
GET /api/v1/query/{binID}
Query data in a bin using Wolfram Language expressions.
Query Parameters:
q
: Wolfram Language query expression
DELETE /api/v1/bin/{binID}
Delete all data in a bin.
Data Types
Wolfram Data Drop supports various data types, including:
- Numbers (integers and floating-point)
- Strings
- Dates and times
- Geometric data (coordinates, shapes)
- Images
- Structured data (lists, associations)
Querying Data
You can use Wolfram Language expressions to query and analyze data in your bins. Some examples:
// Get the average temperature
Mean[Select[#temperature &]]
// Count entries where humidity is above 70%
Count[Select[#humidity > 70 &]]
// Get the latest 10 entries, sorted by timestamp
TakeLargest[#timestamp &, 10]
Examples
Adding data to a bin
curl -X POST https://www.wolframcloud.com/api/v1/drop/YOUR_BIN_ID \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"data": {"temperature": 25.5, "humidity": 60, "timestamp": "2023-06-10T14:30:00Z"}}'
Querying data
curl -X GET "https://www.wolframcloud.com/api/v1/query/YOUR_BIN_ID?q=Mean[Select[#temperature%20%26]]" \
-H "Authorization: Bearer YOUR_API_KEY"