Mapa mental
Existing SWAPI Solution
Conteúdo do mapa
Existing SWAPI Solution
getting started
- base url
- the root URL for all of the API
- if you ever make a request and get back a 404 NOT FOUND response, check the Base URL is correct
- the root URL for all of the API
- JSON Schema
- all resources support JSON Schema
- making a request will give you details of that resource
- all resources support JSON Schema
- authentication
- Swapi is a completely open API.
- No authentication is required to query and get data
- limited what you can do to just GET-ing the data.
- No authentication is required to query and get data
- Swapi is a completely open API.
- base url
encoding
- JSON
- JSON is the standard data format provided by SWAPI by default.
- Wookiee
- this encoding is identical to JSON except with wookiee translations.
- example: https://swapi.dev/api/planets/1/?format=wookiee
- this encoding is identical to JSON except with wookiee translations.
- JSON
recources
- root
- provides information on all available resources within the API.
- example request:http https://swapi.dev/api/
- example response: HTTP/1.0 200 OK Content-Type: application/json { "films": "https://swapi.dev/api/films/", "people": "https://swapi.dev/api/people/", "planets": "https://swapi.dev/api/planets/", "species": "https://swapi.dev/api/species/", "starships": "https://swapi.dev/api/starships/", "vehicles": "https://swapi.dev/api/vehicles/" }
- attributes:
- films string --The URL root for Film resources
- people string -- The URL root for People resources
- planets string -- The URL root for Planet resources
- species string -- The URL root for Species resources
- starships string -- The URL root for Starships resources
- vehicles string -- The URL root for Vehicles resources
- example request:http https://swapi.dev/api/
- provides information on all available resources within the API.
- people
- A People resource is an individual person or character within the Star Wars universe.
- example request
- http https://swapi.dev/api/people/1/
- example response
- "birth_year": "19 BBY", "eye_color": "Blue", "gender": "Male", "hair_color": "Blond", "height": "172", "mass": "77", "name": "Luke Skywalker", "skin_color": "Fair",
- example request
- A People resource is an individual person or character within the Star Wars universe.
- films
- A Film resource is a single film.
- example request
- http https://swapi.dev/api/films/1/
- example response
- producer: Gary Kurtz, Rick McCallum, release_date: "1977-05-25", title: A New Hope
- example request
- A Film resource is a single film.
- starships
- A Starship resource is a single transport craft that has hyperdrive capability.
- example request
- http https://swapi.dev/api/starships/9/
- example response
- HTTP/1.0 200 OK Content-Type: application/json { "MGLT": "10 MGLT", "cargo_capacity": "1000000000000", "consumables": "3 years", "crew": "342953", "hyperdrive_rating": "4.0", "length": "120000", "manufacturer": "Imperial Department of Military Research, Sienar Fleet Systems", "max_atmosphering_speed": "n/a", "model": "DS-1 Orbital Battle Station", "name": "Death Star", "passengers": "843342", "url": "https://swapi.dev/api/starships/9/" }
- example request
- A Starship resource is a single transport craft that has hyperdrive capability.
- vehicles
- A Vehicle resource is a single transport craft that does not have hyperdrive capability.
- example request
- http https://swapi.dev/api/vehicles/4/
- example response
- "cargo_capacity": "50000", "consumables": "2 months", "crew": "46", "length": "36.8", "manufacturer": "Corellia Mining Corporation", "max_atmosphering_speed": "30", "model": "Digger Crawler", "name": "Sand Crawler", "passengers": "30",
- example request
- A Vehicle resource is a single transport craft that does not have hyperdrive capability.
- species
- A Species resource is a type of person or character within the Star Wars Universe.
- example request
- http https://swapi.dev/api/species/3/
- example response
- "average_height": "2.1", "average_lifespan": "400", "classification": "Mammal", "designation": "Sentient", "eye_colors": "blue, green, yellow, brown, golden, red", "hair_colors": "black, brown", "homeworld": "https://swapi.dev/api/planets/14/", "language": "Shyriiwook", "name": "Wookie",
- example request
- A Species resource is a type of person or character within the Star Wars Universe.
- planets
- A Planet resource is a large mass, planet or planetoid in the Star Wars Universe, at the time of 0 ABY.
- endpoints
- /planets/ -- get all the planets resources
- /planets/:id/ -- get a specific planets resource
- /planets/schema/ -- view the JSON schema for this resource
- example request
- http https://swapi.dev/api/planets/1/
- example response
- "climate": "Arid", "diameter": "10465", "gravity": "1", "name": "Tatooine", "orbital_period": "304", "population": "120000", "residents": [ "https://swapi.dev/api/people/1/", ... ], "rotation_period": "23", "surface_water": "1", "terrain": "Dessert",
- endpoints
- A Planet resource is a large mass, planet or planetoid in the Star Wars Universe, at the time of 0 ABY.
- root
Informações
- Descrição
- Mapa Mental sobre Existing SWAPI Solution, criado por Nadine Weber em 15-07-2021.
- Criado por
- Nadine Weber
- Visualizações
- 1
- Avaliação