Upload an image to a planet
Got a crazy good photo of a planet? Share it with the world!
AuthorizationBearer <token>
JWT Bearer token authentication
In: header
Path Parameters
planetIdinteger
The ID of the planet to get
Format
int64
Image to upload
image?file
The image file to upload
Format
binary
Response Body
curl -X POST "https://galaxy.scalar.com/planets/1/image"
{
"message": "Image uploaded successfully",
"imageUrl": "https://cdn.scalar.com/images/8f47c132-9d1f-4f83-b5a4-91db5ee757ab.jpg",
"uploadedAt": "2024-01-15T14:30:00Z",
"fileSize": 1048576,
"mimeType": "image/jpeg"
}
{
"type": "https://example.com/errors/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "The request was invalid."
}
{
"type": "https://example.com/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "You are not authorized to access this resource."
}
{
"type": "https://example.com/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "The resource you are trying to access does not exist."
}
How is this guide?