Skip to content
Operation ID: updatePlanet

Update a planet

PUT
/planets/{planetId}

Sometimes you make mistakes, that’s fine. No worries, you can update all planets.

Authorizations

Parameters

Path Parameters

planetId*
Typeinteger
Required

Request Body

JSON
{
"id": 0,
"name": "string",
"description": null,
"image": "string",
"creator": {
"id": 0,
"name": "string",
"email": "string"
}
}

Responses

OK
JSON
{
"id": 0,
"name": "string",
"description": null,
"image": "string",
"creator": {
"id": 0,
"name": "string",
"email": "string"
}
}

Samples

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