Web API Data Stream Parameters
The WebAPI plugin provides a single configurable data stream: HTTP Request. Use the parameters to configure the request to send to an API endpoint.
Each configurable data stream exposes a set of parameters that lets you filter the data you retrieve. The following information describes the available configurable data streams and their parameters in detail.
Configuration tabs
To configure this data stream, you must work your way through each of the following tabs configuring each one as needed.
Basics
Use the Basics tab to configure the type pf request and the endpoint that the request is sent to.
Body
Use the Body tab to the content sent in the body of a POST request. This tab only displays when POST is selected on the Basics tab.
- Body: Enter the data payload to include in the request body. The format typically depends on the API requirements and the
Content-Typeheader.
Parameters
Use the Parameters tab to add key:value pairs to include in the request’s query string. Query parameters are appended to the end of the URL to pass data or filter results (for example, ?status=active&limit=100).
Headers
Use the Headers tab to add custom HTTP headers to include in the request. Headers provide additional metadata or configuration details for the HTTP request (for example, authentication tokens, content type, or custom app identifiers).
Response
Use the Response tab to display the response returned from the configured HTTP request and to optionally configure the data path.
Request examples
The following examples aim to guide how to populate each of the Configuration tabs to build your HTTP requests.
The following examples use dummy data and are for purely demonstrative purposes. The exact format of expected parameters / headers depends entirely on the API you are querying and you should refer to that API's documentation.
GET request to retrieve user data
Fetch a list of users from a public API with optional filters.
- On the Basics tab, configure the following:
- Type:
GET - URL:
https://api.example.com(read-only) - Path:
/v1/users
- Type:
- On the Parameters tab, configure the following, this defines the following for the resulting request URL
https://api.example.com/v1/users?status=active&limit=50: - On the Headers tab, configure the following:
- On the Response tab, configure the following:
- Response Preview: Click Send to displays JSON such as
{ "data": [ { "id": 1, "name": "Alice" }, { "id": 2, "name": "Bob" } ], "total": 2 } - Select data:
- Path
data
- Expand Inner Objects: Toggle on to view full user details
- Response Preview: Click Send to displays JSON such as
POST request to query analytics data
- On the Basics tab, configure the following:
- Type:
POST - URL:
https://api.example.com(read-only) - Path:
/v1/sales/query
- Type:
- On the Body tab, configure the following:
Body: This request asks the API to return aggregated sales metrics for a specific date range and region{ "startDate": "2025-11-01", "endDate": "2025-11-07", "region": "North America", "metrics": ["totalSales", "averageOrderValue", "transactions"] }
- On the Parameters tab, leave the fields empty, as query parameters are included in the request body for this API.
- On the Headers tab, configure the following:
- On the Response tab, configure the following:
- Response Preview: Click Send to display JSON such as
{ "status": "success", "data": { "summary": { "totalSales": 157340.25, "averageOrderValue": 78.12, "transactions": 2014 }, "dailyBreakdown": [ { "date": "2025-11-01", "totalSales": 22000.50 }, { "date": "2025-11-02", "totalSales": 24350.00 }, { "date": "2025-11-03", "totalSales": 18000.75 } ] } } - Select data:
- Path
data.dailyBreakdown
- Expand inner objects: Toggle on to view nested objects like
summaryanddailyBreakdown
- Response Preview: Click Send to display JSON such as
Script examples
The following gives examples of how you can integrate SquaredUp with even more APIs by shaping response data exactly how you need it before visualizing.
Normalizing an inconsistent API response
This script drills into nested objects, extracts only the useful fields, and outputs a clean array of simple objects. Ideal for visualizations that cannot consume deeply nested structures.
Response JSON:
{
"meta": { "timestamp": "2025-01-01" },
"response": {
"records": [
{
"attributes": { "id": 1, "info": { "value": 10 } },
"status": "ok"
},
{
"attributes": { "id": 2, "info": { "value": 20 } },
"status": "ok"
}
]
}
}
Script:
result = data.response.records.map(r => ({
id: r.attributes.id,
value: r.attributes.info.value,
status: r.status
}));Output JSON:
[
{ "id": 1, "value": 10, "status": "ok" },
{ "id": 2, "value": 20, "status": "ok" }
]Reshaping API output from multiple nested collections
This example flattens a hierarchical projects > tasks structure into a single list, allowing tables or charts to display all tasks with their related project names.
Response JSON:
{
"projects": [
{
"name": "Alpha",
"tasks": [
{ "taskId": 1, "hours": 5 },
{ "taskId": 2, "hours": 3 }
]
},
{
"name": "Beta",
"tasks": [
{ "taskId": 3, "hours": 4 }
]
}
]
}
Script:
result = data.projects.flatMap(project =>
project.tasks.map(t => ({
project: project.name,
taskId: t.taskId,
hours: t.hours
}))
);
Output JSON:
[
{ "project": "Alpha", "taskId": 1, "hours": 5 },
{ "project": "Alpha", "taskId": 2, "hours": 3 },
{ "project": "Beta", "taskId": 3, "hours": 4 }
]Parsing CSV returned inside JSON
This script converts a CSV string into an array of objects (one per row) so the data can be visualized like any other structured dataset.
Response JSON:
{
"csv": "time,value\n2024-01-01,10\n2024-01-02,15"
}
Script:
const lines = data.csv.trim().split("\n");
const [header, ...rows] = lines;
const cols = header.split(",");
result = rows.map(line => {
const values = line.split(",");
return Object.fromEntries(cols.map((c, i) => [c, values[i]]));
});
Output JSON:
[
{ "time": "2024-01-01", "value": "10" },
{ "time": "2024-01-02", "value": "15" }
]
Adding totals, averages, and ratios
This script calculates new metrics like revenue and averages.
Response JSON:
{
"sales": [
{ "region": "NA", "units": 120, "price": 5 },
{ "region": "EU", "units": 150, "price": 4 }
]
}
Script:
result = data.sales.map(s => ({
region: s.region,
revenue: s.units * s.price,
units: s.units,
price: s.price,
averageRevenuePerUnit: (s.units * s.price) / s.units
}));
Output JSON:
[
{
"region": "NA",
"revenue": 600,
"units": 120,
"price": 5,
"averageRevenuePerUnit": 5
},
{
"region": "EU",
"revenue": 600,
"units": 150,
"price": 4,
"averageRevenuePerUnit": 4
}
]