Skip to content

GET Image Endpoint

goldy4719 edited this page Apr 10, 2026 · 1 revision

GET /images/{imageId}

Overview

Retrieve metadata and a temporary download URL for a single specific image belonging to the authenticated user.

Prerequisites

  • Valid JWT token
  • Image must exist for the user in DynamoDB

Implementation / Steps

  1. Extract the authenticated user_id.
  2. Query DynamoDB using userId and imageId.
  3. Validate that the item exists.
  4. Ensure required fields (tags, s3Key) are present.
  5. Generate a presigned S3 URL for download.
  6. Return tags and the download URL.

Key Takeaways

  • Returns only user-owned images.
  • Missing items result in a 404 error.
  • Presigned URLs expire (default: 1 hour).

Clone this wiki locally