Resource Gallery Images
Manage gallery images for marketplace resources to showcase your content.
Base Endpoint
Section titled “Base Endpoint”All gallery image endpoints are prefixed with /resources/:resourceId/gallery-images
Add Gallery Image
Section titled “Add Gallery Image”POST /resources/:resourceId/gallery-imagesAdd an image to the resource gallery.
Authentication: Required (must be owner or contributor)
Content-Type: multipart/form-data
URL Parameters:
resourceId(string) - Resource ID
Form Data:
image(file) - Image file (PNG, JPG, WEBP)caption(string, optional) - Image captionaltText(string, optional) - Alt text for accessibility
Response:
{ "id": "image-id", "resourceId": "resource-id", "imageUrl": "https://...", "caption": "Screenshot of the mod in action", "altText": "Mod interface screenshot", "order": 0, "createdAt": "2024-01-01T00:00:00Z"}Get Gallery Images
Section titled “Get Gallery Images”GET /resources/:resourceId/gallery-imagesGet all gallery images for a resource.
Authentication: Not required
URL Parameters:
resourceId(string) - Resource ID
Response:
{ "images": [ { "id": "image-id", "imageUrl": "https://...", "thumbnailUrl": "https://...", "caption": "Screenshot", "altText": "Alt text", "order": 0, "createdAt": "2024-01-01T00:00:00Z" } ]}Get Gallery Image
Section titled “Get Gallery Image”GET /resources/:resourceId/gallery-images/:imageIdGet a specific gallery image.
Authentication: Not required
URL Parameters:
resourceId(string) - Resource IDimageId(string) - Image ID
Response:
{ "id": "image-id", "imageUrl": "https://...", "caption": "Screenshot", "altText": "Alt text", "order": 0}Update Gallery Image
Section titled “Update Gallery Image”PATCH /resources/:resourceId/gallery-images/:imageIdUpdate gallery image details (caption, alt text).
Authentication: Required (must be owner or contributor)
URL Parameters:
resourceId(string) - Resource IDimageId(string) - Image ID
Request Body:
{ "caption": "Updated caption", "altText": "Updated alt text"}Replace Gallery Image
Section titled “Replace Gallery Image”POST /resources/:resourceId/gallery-images/:imageId/replaceReplace the image file while keeping the same gallery position and metadata.
Authentication: Required (must be owner or contributor)
Content-Type: multipart/form-data
URL Parameters:
resourceId(string) - Resource IDimageId(string) - Image ID
Form Data:
image(file) - New image file
Response:
{ "id": "image-id", "imageUrl": "https://new-url...", "updatedAt": "2024-01-01T00:00:00Z"}Reorder Gallery Images
Section titled “Reorder Gallery Images”PUT /resources/:resourceId/gallery-images/reorderReorder gallery images by specifying the new order.
Authentication: Required (must be owner or contributor)
URL Parameters:
resourceId(string) - Resource ID
Request Body:
{ "imageIds": ["image-id-1", "image-id-2", "image-id-3"]}Response:
{ "message": "Gallery images reordered successfully"}Delete Gallery Image
Section titled “Delete Gallery Image”DELETE /resources/:resourceId/gallery-images/:imageIdDelete a gallery image.
Authentication: Required (must be owner or contributor)
URL Parameters:
resourceId(string) - Resource IDimageId(string) - Image ID
Response:
{ "message": "Gallery image deleted successfully"}