-
Notifications
You must be signed in to change notification settings - Fork 43
Mission: HTTP API
This Mission showcases a basic mapping of a business operation to a remote endpoint. By taking this approach, clients leverage the HTTP protocol as a transport mechanism to call upon services. Application engineers define their APIs using a broad interpretation of REST fundamentals, encouraging freedom in design and quick prototyping.
As an application or service matures, this approach may not scale as desired to properly support clean API design or use cases involving database interactions. Any operations involving shared, mutable state will have to be integrated with an appropriate backing datastore; all requests here will be scoped only to the container servicing the request, and there is no guarantee that subsequent requests will be served by the same container.
This is recommended as an introduction to the mechanics of opening a service to be called upon by remote processes.
User would like to open up an endpoint to expose a business operation over remote boundaries.
-
HTTP API
-
REST
-
User executes an HTTP GET request upon the greeting endpoint.
-
Response returned is in JSON format with a payload of the “Hello, World!” welcome message.
-
User executes an HTTP GET request upon the greeting endpoint, passing in a String argument to the name request parameter in the query string
-
Response returned is in JSON format with a payload of “Hello, $name!”, noting the name parameter passed into the request.
-
Black box integration test, executed against the running application, validating the following actions:
-
Client HTTP GET request to
$protocol://$hostname:$port/api/greeting
returns:{ "content": "Hello, World!" }
-
Client HTTP GET request to
$protocol://$hostname:$port/api/greeting?name=$name
returns:{ "content": "Hello, $name!" }
-
-
Index Page located at
$protocol://$hostname:$port/
contains:-
Mission description
-
Information about and pointers to relevant code powering the implementation being used
-
Instructions for a user to execute requests against the API to see the service working in action
-
Form to invoke the service and see the result, both for no-arg and name parameter invocations.
-
PM |
☑ |
|
DevExp |
☑ |
|
Vert.x |
☑ |
|
WildFly Swarm |
☑ |
|
Spring Boot |
☑ |
|
QE |
☑ |
|
Docs |
☑ |
|
Architect |
☐ |