Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Mission: HTTP API

Stefan Sitani edited this page Apr 11, 2017 · 4 revisions

Mission: HTTP API

Information

ID Short Name

100

http-api

Description

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 Problem

User would like to open up an endpoint to expose a business operation over remote boundaries.

Concepts and Architectural Patterns

Use Case

  1. User executes an HTTP GET request upon the greeting endpoint.

  2. Response returned is in JSON format with a payload of the “Hello, World!” welcome message.

  3. User executes an HTTP GET request upon the greeting endpoint, passing in a String argument to the name request parameter in the query string

  4. Response returned is in JSON format with a payload of “Hello, $name!”, noting the name parameter passed into the request.

Acceptance Criteria

  1. 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!" }

  2. 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.

Vert.x-specific Acceptance Criteria

Swarm-specific Acceptance Criteria

Boot-specific Acceptance Criteria

Approval

PM

John Clingan

DevExp

Andrew Lee Rubinger

Vert.x

Clement Escoffier

WildFly Swarm

Heiko Braun

Spring Boot

Charles Moulliard

QE

Tomas Schlosser

Docs

Zach Rhoads

Architect

Scott Stark