Operation ID: getPlanet
Get a planet
GET
/planets/{planetId}You’ll better learn a little bit more about the planets. It might come in handy once space travel is available for everyone.
Parameters
Path Parameters
planetId*
Typeinteger
RequiredResponses
Planet Found
JSON
{
"id": 0,
"name": "string",
"description": null,
"image": "string",
"creator": {
"id": 0,
"name": "string",
"email": "string"
}
}
Samples
cURL
curl -X GET https://galaxy.scalar.com/planets/{planetId}
JavaScript
fetch("https://galaxy.scalar.com/planets/{planetId}")
.then(response => response.json())
.then(data => console.log(data));
PHP
file_get_contents("https://galaxy.scalar.com/planets/{planetId}");
Python
import requests
response = requests.get("https://galaxy.scalar.com/planets/{planetId}")
print(response.json())