Microservice responsible for storing, listing and retrieving scraped content.
- Java 95.7%
- Dockerfile 4.3%
merge spring rewrite to main See merge request yys/yy-image-repository-service!2 |
||
|---|---|---|
| src/main | ||
| .gitignore | ||
| Dockerfile | ||
| LICENSE | ||
| pom.xml | ||
| README.md | ||
YY Image Repository Service
Spring microservice responsible for storing, listing, and retrieving image contents.
Supported storage types
- Local file system
- Planned: AWS S3, Backblaze B2 support.
API Documentation
| Endpoint | Method | Auth Required | Description | Path Parameters | Request Body | Response |
|---|---|---|---|---|---|---|
/api/contents/{contentTitle}/thumbnail |
GET | Yes, X-User-Role: USER |
Get the thumbnail for a content | contentTitle |
None | 200 OK, image file |
/api/contents/{contentTitle}/thumbnail |
POST | Yes, X-User-Role: ADMIN |
Upload or replace the thumbnail for a content | contentTitle |
JSON, image content in base64 | 201 Created, JSON with saved image info |
/api/contents/{contentTitle}/chapters |
GET | Yes, X-User-Role: USER |
Get list of chapters for a content | contentTitle |
None | 200 OK, JSON array of chapters |
/api/contents/{contentTitle}/chapters/{chapterId}/images |
GET | Yes, X-User-Role: USER |
Get all image IDs for a chapter | contentTitle, chapterId |
None | 200 OK, JSON array of image IDs |
/api/contents/{contentTitle}/chapters/{chapterId}/images/{imageId} |
GET | Yes, X-User-Role: USER |
Get a single image | contentTitle, chapterId, imageId |
None | 200 OK, image file |
/api/contents/{contentTitle}/chapters/{chapterId}/images |
POST | Yes, X-User-Role: ADMIN |
Upload a new image to a chapter | contentTitle, chapterId |
JSON, image content in base64 | 201 Created, JSON with saved image info |