Skip to content

Find by ID endpoint #5

@mwarman

Description

@mwarman

Describe the story

Create an API endpoint backed by a Lambda function which will find an item, i.e. a Task, by the task identifier.

Requirements

  • The API is GET /tasks/{taskId}
  • The task identifier is a path variable.
  • The service attempts to find a Task by the supplied task identifier.
  • If found, the Task is returned as JSON with status code 200.
  • If not found, the function returns status code 404.
  • If any problems occur during function execution, the service returns status code 500 with a meaningful message.

Acceptance criteria

GIVEN the endpoint is called
WHEN the Task is found
THEN the Task is returned as JSON
AND the response status code is 200

WHEN the Task is not found
THEN the response status code is 404

WHEN an error occurs in function execution
THEN a meaningful message is returned as JSON
AND the response status code is 500

Additional context

Add any other context about the story here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions