Skip to content
Operation ID: uploadImage

Upload an image to a planet

POST
/planets/{planetId}/image

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

Authorizations

Parameters

Path Parameters

planetId*
Typeinteger
Required

Responses

Image uploaded
JSON
{
"message": "string"
}

Samples

cURL
curl -X POST https://galaxy.scalar.com/planets/{planetId}/image
JavaScript
fetch("https://galaxy.scalar.com/planets/{planetId}/image", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://galaxy.scalar.com/planets/{planetId}/image");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("https://galaxy.scalar.com/planets/{planetId}/image")
print(response.json())
Powered by VitePress OpenAPI