# Star Wars API (xample.in) # Works with the VS Code REST Client and the JetBrains HTTP Client. # Uncomment X-Sandbox in a request to keep its changes for one hour. @baseUrl = https://openapi.xample.in/api @sandbox = my-sandbox ### Links to every resource GET {{baseUrl}}/ Accept: application/json # X-Sandbox: {{sandbox}} ### List people GET {{baseUrl}}/people/?search=string Accept: application/json # X-Sandbox: {{sandbox}} ### Create a person (not kept without X-Sandbox) POST {{baseUrl}}/people/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "Luke Skywalker", "height": "172", "mass": "77", "hair_color": "blond", "skin_color": "fair", "eye_color": "blue", "birth_year": "19BBY", "gender": "male", "homeworld": "https://swapi.xample.in/api/planets/1/", "films": [ "https://swapi.xample.in/api/films/1/" ], "species": [ "https://swapi.xample.in/api/species/1/" ], "vehicles": [ "https://swapi.xample.in/api/vehicles/1/" ], "starships": [ "https://swapi.xample.in/api/starships/1/" ] } ### Get one person GET {{baseUrl}}/people/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### Replace a person (not kept without X-Sandbox) PUT {{baseUrl}}/people/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "Luke Skywalker", "height": "172", "mass": "77", "hair_color": "blond", "skin_color": "fair", "eye_color": "blue", "birth_year": "19BBY", "gender": "male", "homeworld": "https://swapi.xample.in/api/planets/1/", "films": [ "https://swapi.xample.in/api/films/1/" ], "species": [ "https://swapi.xample.in/api/species/1/" ], "vehicles": [ "https://swapi.xample.in/api/vehicles/1/" ], "starships": [ "https://swapi.xample.in/api/starships/1/" ] } ### Change some fields of a person (not kept without X-Sandbox) PATCH {{baseUrl}}/people/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json {} ### Delete a person (not kept without X-Sandbox) DELETE {{baseUrl}}/people/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### JSON Schema of a person GET {{baseUrl}}/people/schema Accept: application/json # X-Sandbox: {{sandbox}} ### List planets GET {{baseUrl}}/planets/?search=string Accept: application/json # X-Sandbox: {{sandbox}} ### Create a planet (not kept without X-Sandbox) POST {{baseUrl}}/planets/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "Tatooine", "rotation_period": "23", "orbital_period": "304", "diameter": "10465", "climate": "arid", "gravity": "1 standard", "terrain": "desert", "surface_water": "1", "population": "200000", "residents": [ "https://swapi.xample.in/api/people/1/" ], "films": [ "https://swapi.xample.in/api/films/1/" ] } ### Get one planet GET {{baseUrl}}/planets/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### Replace a planet (not kept without X-Sandbox) PUT {{baseUrl}}/planets/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "Tatooine", "rotation_period": "23", "orbital_period": "304", "diameter": "10465", "climate": "arid", "gravity": "1 standard", "terrain": "desert", "surface_water": "1", "population": "200000", "residents": [ "https://swapi.xample.in/api/people/1/" ], "films": [ "https://swapi.xample.in/api/films/1/" ] } ### Change some fields of a planet (not kept without X-Sandbox) PATCH {{baseUrl}}/planets/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json {} ### Delete a planet (not kept without X-Sandbox) DELETE {{baseUrl}}/planets/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### JSON Schema of a planet GET {{baseUrl}}/planets/schema Accept: application/json # X-Sandbox: {{sandbox}} ### List films GET {{baseUrl}}/films/?search=string Accept: application/json # X-Sandbox: {{sandbox}} ### Create a film (not kept without X-Sandbox) POST {{baseUrl}}/films/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "title": "A New Hope", "episode_id": 4, "opening_crawl": "It is a period of civil war.\r\nRebel spaceships, striking\r\nfrom a hidden base,...", "director": "George Lucas", "producer": "Gary Kurtz, Rick McCallum", "release_date": "1977-05-25", "characters": [ "https://swapi.xample.in/api/people/1/" ], "planets": [ "https://swapi.xample.in/api/planets/1/" ], "starships": [ "https://swapi.xample.in/api/starships/1/" ], "vehicles": [ "https://swapi.xample.in/api/vehicles/1/" ], "species": [ "https://swapi.xample.in/api/species/1/" ] } ### Get one film GET {{baseUrl}}/films/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### Replace a film (not kept without X-Sandbox) PUT {{baseUrl}}/films/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "title": "A New Hope", "episode_id": 4, "opening_crawl": "It is a period of civil war.\r\nRebel spaceships, striking\r\nfrom a hidden base,...", "director": "George Lucas", "producer": "Gary Kurtz, Rick McCallum", "release_date": "1977-05-25", "characters": [ "https://swapi.xample.in/api/people/1/" ], "planets": [ "https://swapi.xample.in/api/planets/1/" ], "starships": [ "https://swapi.xample.in/api/starships/1/" ], "vehicles": [ "https://swapi.xample.in/api/vehicles/1/" ], "species": [ "https://swapi.xample.in/api/species/1/" ] } ### Change some fields of a film (not kept without X-Sandbox) PATCH {{baseUrl}}/films/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json {} ### Delete a film (not kept without X-Sandbox) DELETE {{baseUrl}}/films/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### JSON Schema of a film GET {{baseUrl}}/films/schema Accept: application/json # X-Sandbox: {{sandbox}} ### List species GET {{baseUrl}}/species/?search=string Accept: application/json # X-Sandbox: {{sandbox}} ### Create a species (not kept without X-Sandbox) POST {{baseUrl}}/species/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "Human", "classification": "mammal", "designation": "sentient", "average_height": "180", "skin_colors": "caucasian, black, asian, hispanic", "hair_colors": "blonde, brown, black, red", "eye_colors": "brown, blue, green, hazel, grey, amber", "average_lifespan": "120", "homeworld": "https://swapi.xample.in/api/planets/1/", "language": "Galactic Basic", "people": [ "https://swapi.xample.in/api/people/1/" ], "films": [ "https://swapi.xample.in/api/films/1/" ] } ### Get one species GET {{baseUrl}}/species/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### Replace a species (not kept without X-Sandbox) PUT {{baseUrl}}/species/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "Human", "classification": "mammal", "designation": "sentient", "average_height": "180", "skin_colors": "caucasian, black, asian, hispanic", "hair_colors": "blonde, brown, black, red", "eye_colors": "brown, blue, green, hazel, grey, amber", "average_lifespan": "120", "homeworld": "https://swapi.xample.in/api/planets/1/", "language": "Galactic Basic", "people": [ "https://swapi.xample.in/api/people/1/" ], "films": [ "https://swapi.xample.in/api/films/1/" ] } ### Change some fields of a species (not kept without X-Sandbox) PATCH {{baseUrl}}/species/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json {} ### Delete a species (not kept without X-Sandbox) DELETE {{baseUrl}}/species/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### JSON Schema of a species GET {{baseUrl}}/species/schema Accept: application/json # X-Sandbox: {{sandbox}} ### List vehicles GET {{baseUrl}}/vehicles/?search=string Accept: application/json # X-Sandbox: {{sandbox}} ### Create a vehicle (not kept without X-Sandbox) POST {{baseUrl}}/vehicles/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "Sand Crawler", "model": "Digger Crawler", "manufacturer": "Corellia Mining Corporation", "cost_in_credits": "150000", "length": "36.8 ", "max_atmosphering_speed": "30", "crew": "46", "passengers": "30", "cargo_capacity": "50000", "consumables": "2 months", "vehicle_class": "wheeled", "pilots": [ "https://swapi.xample.in/api/people/1/" ], "films": [ "https://swapi.xample.in/api/films/1/" ] } ### Get one vehicle GET {{baseUrl}}/vehicles/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### Replace a vehicle (not kept without X-Sandbox) PUT {{baseUrl}}/vehicles/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "Sand Crawler", "model": "Digger Crawler", "manufacturer": "Corellia Mining Corporation", "cost_in_credits": "150000", "length": "36.8 ", "max_atmosphering_speed": "30", "crew": "46", "passengers": "30", "cargo_capacity": "50000", "consumables": "2 months", "vehicle_class": "wheeled", "pilots": [ "https://swapi.xample.in/api/people/1/" ], "films": [ "https://swapi.xample.in/api/films/1/" ] } ### Change some fields of a vehicle (not kept without X-Sandbox) PATCH {{baseUrl}}/vehicles/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json {} ### Delete a vehicle (not kept without X-Sandbox) DELETE {{baseUrl}}/vehicles/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### JSON Schema of a vehicle GET {{baseUrl}}/vehicles/schema Accept: application/json # X-Sandbox: {{sandbox}} ### List starships GET {{baseUrl}}/starships/?search=string Accept: application/json # X-Sandbox: {{sandbox}} ### Create a starship (not kept without X-Sandbox) POST {{baseUrl}}/starships/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "CR90 corvette", "model": "CR90 corvette", "manufacturer": "Corellian Engineering Corporation", "cost_in_credits": "3500000", "length": "150", "max_atmosphering_speed": "950", "crew": "30-165", "passengers": "600", "cargo_capacity": "3000000", "consumables": "1 year", "hyperdrive_rating": "2.0", "MGLT": "60", "starship_class": "corvette", "pilots": [ "https://swapi.xample.in/api/people/1/" ], "films": [ "https://swapi.xample.in/api/films/1/" ] } ### Get one starship GET {{baseUrl}}/starships/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### Replace a starship (not kept without X-Sandbox) PUT {{baseUrl}}/starships/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json { "name": "CR90 corvette", "model": "CR90 corvette", "manufacturer": "Corellian Engineering Corporation", "cost_in_credits": "3500000", "length": "150", "max_atmosphering_speed": "950", "crew": "30-165", "passengers": "600", "cargo_capacity": "3000000", "consumables": "1 year", "hyperdrive_rating": "2.0", "MGLT": "60", "starship_class": "corvette", "pilots": [ "https://swapi.xample.in/api/people/1/" ], "films": [ "https://swapi.xample.in/api/films/1/" ] } ### Change some fields of a starship (not kept without X-Sandbox) PATCH {{baseUrl}}/starships/1/ Accept: application/json # X-Sandbox: {{sandbox}} Content-Type: application/json {} ### Delete a starship (not kept without X-Sandbox) DELETE {{baseUrl}}/starships/1/ Accept: application/json # X-Sandbox: {{sandbox}} ### JSON Schema of a starship GET {{baseUrl}}/starships/schema Accept: application/json # X-Sandbox: {{sandbox}}