Addition — Data as URL Parameters
Adds two integers passed as URL query parameters. No authentication required. Demonstrates the simplest way to send input data to a REST API.
Concept: URL Query Parameters · No Auth · JSON Response| Property | Value |
|---|---|
| Method | GET |
| File | add-url.php |
| Authentication | None |
| Input style | URL query parameters |
| Output style | JSON body |
| Parameter | Type | Required | Description |
|---|---|---|---|
| input1 | Integer | Required | First integer to add |
| input2 | Integer | Required | Second integer to add |
cURL
curl https://labs.lowcademy.com/apis/add-url?input1=5&input2=3JavaScript (fetch)
const res = await fetch('https://labs.lowcademy.com/apis/add-url?input1=5&input2=3'); const data = await res.json(); console.log(data.result); // 8
OutSystems — URL of the GET method
// Base URL: https://labs.lowcademy.com/apis/ // Method path: add-url.php // Add Input Parameters: input1 (Integer), input2 (Integer) // Both map to the query string automatically
| Field | Type | Description |
|---|---|---|
| success | Boolean | Always true on success |
| operation | String | Always "addition" |
| input1 | Integer | First number received |
| input2 | Integer | Second number received |
| result | Integer | Sum of input1 + input2 |
{
"success" : true,
"operation": "addition",
"input1" : 5,
"input2" : 3,
"result" : 8
}