Endpoint: planets
GEThttps://swapi.mimo.dev/api/planets/Ojom
Request
GETplanets
1fetch("https://swapi.mimo.dev/api/planets/Ojom")
2 .then((res) => res.json())
3 .then((json) => console.log(json))
4 .catch((error) => console.error(error))
Response
response.json
1{
2 "name": "Ojom",
3 "rotation_period": "unknown",
4 "orbital_period": "unknown",
5 "diameter": "unknown",
6 "climate": "frigid",
7 "gravity": "unknown",
8 "terrain": "oceans, glaciers",
9 "surface_water": "100",
10 "population": "500000000",
11 "residents": [
12 "https://swapi.mimo.dev/api/people/71/"
13 ],
14 "films": [],
15 "created": "2014-12-20T17:27:41.286000Z",
16 "edited": "2014-12-20T20:58:18.516000Z",
17 "url": "https://swapi.mimo.dev/api/planets/55/"
18}