Endpoint: planets
GEThttps://swapi.mimo.dev/api/planets/Mirial
Request
GETplanets
1fetch("https://swapi.mimo.dev/api/planets/Mirial")
2 .then((res) => res.json())
3 .then((json) => console.log(json))
4 .catch((error) => console.error(error))
Response
response.json
1{
2 "name": "Mirial",
3 "rotation_period": "unknown",
4 "orbital_period": "unknown",
5 "diameter": "unknown",
6 "climate": "unknown",
7 "gravity": "unknown",
8 "terrain": "deserts",
9 "surface_water": "unknown",
10 "population": "unknown",
11 "residents": [
12 "https://swapi.mimo.dev/api/people/64/",
13 "https://swapi.mimo.dev/api/people/65/"
14 ],
15 "films": [],
16 "created": "2014-12-20T16:44:46.318000Z",
17 "edited": "2014-12-20T20:58:18.508000Z",
18 "url": "https://swapi.mimo.dev/api/planets/51/"
19}