SWAPI data

To get to the SWAPI data, make RESTful requests at /api.

See /api-docs for Swagger docs and /api/swagger.json for Swagger file.

Core data

GET the core data points by hitting these urls:

Relationship data

This data has several many-to-many relations between these collections. ie. A film has many characters and a character can appear in many movies. To solve this problem, we created junction tables/collections and we exposed API endpoints to help you get to the related data. So if you want to find all the characters that appear in a given film, you'd query /api/films/:id/characters where ':id' is the film's id.

URL Junction table Explanation
/api/characters/:character_id/films films_characters The films for a given character
/api/films/:film_id/characters films_characters The characters in a given film
/api/films/:film_id/planets films_planets The planets in a film
/api/films/:film_id/species films_species All the species in a given films
/api/films/:film_id/starships films_starships The starships in any given film
/api/films/:film_id/vehicles films_vehicles The vehicles in a particular film
/api/planets/:planet_id/characters None needed The characters who are from a planet. A planet can have many characters but each character can have only one homeworld.
/api/planets/:planet_id/films films_planets The films that feature a particular planet
/api/species/:species_id/characters species_characters The characters who are members of species. This one is weird (but it's how the data was presented). A character is a member of one species. A species has many characters.
/api/starships/:starship_id/characters starships_characters The pilots for a given starship
/api/vehicles/:vehicle_id/characters vehicles_characters The drivers for a given vehicle