Planets

Upload an image to a planet

Got a crazy good photo of a planet? Share it with the world!

post/planets/{planetId}/image

Request

  • Base URL: https://galaxy.scalar.com
  • URL: https://galaxy.scalar.com/planets/{planetId}/image
  • Auth: one of:
    • HTTP bearer
    • HTTP basic
    • API key in query parameter api_key
    • API key in header X-API-Key
    • API key in header X-API-Key and API key in query parameter api_key
    • API key in cookie api_key
    • OAuth 2 (authorization code, authorization URL https://galaxy.scalar.com/oauth/authorize, token URL https://galaxy.scalar.com/oauth/token; client credentials, token URL https://galaxy.scalar.com/oauth/token; implicit, authorization URL https://galaxy.scalar.com/oauth/authorize; password, token URL https://galaxy.scalar.com/oauth/token)
    • OpenID Connect (https://galaxy.scalar.com/.well-known/openid-configuration)

Path parameters

planetIdinteger required
Example:1

The ID of the planet to get

Response

Image uploaded

messagestring
imageUrlstring

The URL where the uploaded image can be accessed

uploadedAtstring date-time

Timestamp when the image was uploaded

fileSizeinteger

Size of the uploaded image in bytes

mimeTypestring

The content type of the uploaded image

Example response

{
  "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"
}

Changes

No recorded changes to this operation across all 1 revision of this API.