Back to API List
Greeting API
A versatile API for generating greeting messages. Supports simple GET requests and POST requests with data.
Utilities
Internal API - Hosted by this App
API Endpoints & Usage
Explore and interact with the available endpoints for the Greeting API. These API routes are live! The paths shown below are relative to your application's base URL. For example, if this application is hosted at
https://gen-endpoint.com
, an endpoint path for this API, such as /api/greeting
, would be accessible at https://gen-endpoint.com/api/greeting
. You can use the "Try it out" section for each endpoint or use tools like curl
, Postman, or your browser's address bar (for GET requests) to interact with them.GET
/api/greeting
Returns a generic greeting message with API version.
Show Static Examples
Example Response:
{
"message": "Hello from our API!",
"version": "1.0.0",
"timestamp": "2024-08-15T10:00:00.000Z"
}
Try it out
You can add or change query parameters in the path above (e.g., ?name=User).
GET
/api/greeting?name=Alice
Returns a personalized greeting message using a query parameter.
Show Static Examples
Example Request Parameters:
?name=Alice
Example Response:
{
"message": "Hello, Alice, from our API!",
"personalized": true,
"timestamp": "2024-08-15T10:01:00.000Z"
}
Try it out
You can add or change query parameters in the path above (e.g., ?name=User).
POST
/api/greeting
Receives a name in the JSON body and returns a custom greeting.
Show Static Examples
Example Request Body:
{
"name": "Bob",
"preferences": {
"formal": false
}
}
Example Response:
{
"message": "Greetings, Bob! Your POST request was received.",
"confirmationId": "post-12345",
"receivedData": {
"name": "Bob",
"preferences": {
"formal": false
}
},
"timestamp": "2024-08-15T10:02:00.000Z"
}
Try it out