States API (1.0)
Download OpenAPI specification:Download
This API was created as a final project for INF653 at Fort Hays State University. It enables you to retrieve, add, update and delete specific data points about a single US state, or all of them.
All endpoints allow you to retrieve and edit various attributes about US states, such as population, nickname, and date of admission. Responses are returned in JSON.
Get all state data
Retrieves all state data elements for all states in the US.
query Parameters
contig | boolean If set to true, returns data for contiguous states (Not AK or HI). If set to false, returns data for AK and HI. |
Responses
Response samples
- 200
[- {
- "state": "Alabama",
- "slug": "alabama",
- "code": "AL",
- "nickname": "Yellowhammer State",
- "admission_date": "1819-12-14",
- "admission_number": 22,
- "capital_city": "Montgomery",
- "population": 4833722,
- "population_rank": 23,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/alabama.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/alabama.jpg",
}, - {
- "state": "Alaska",
- "slug": "alaska",
- "code": "AK",
- "nickname": "The Last Frontier",
- "admission_date": "1959-01-03",
- "admission_number": 49,
- "capital_city": "Juneau",
- "population": 735132,
- "population_rank": 47,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/alaska.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/alaska.jpg",
}, - {
- "state": "Arizona",
- "slug": "arizona",
- "code": "AZ",
- "nickname": "The Grand Canyon State",
- "admission_date": "1912-02-14",
- "admission_number": 48,
- "capital_city": "Phoenix",
- "population": 6626624,
- "population_rank": 15,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/arizona.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/arizona.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Arkansas",
- "slug": "arkansas",
- "code": "AR",
- "nickname": "The Natural State",
- "admission_date": "1836-06-15",
- "admission_number": 25,
- "capital_city": "Little Rock",
- "population": 2959373,
- "population_rank": 32,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/arkansas.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/arkansas.jpg",
}, - {
- "state": "California",
- "slug": "california",
- "code": "CA",
- "nickname": "Golden State",
- "admission_date": "1850-09-09",
- "admission_number": 31,
- "capital_city": "Sacramento",
- "population": 38332521,
- "population_rank": 1,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/california.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/california.jpg",
- "facebook_url": null
}, - {
- "state": "Colorado",
- "slug": "colorado",
- "code": "CO",
- "nickname": "The Centennial State",
- "admission_date": "1876-08-01",
- "admission_number": 38,
- "capital_city": "Denver",
- "population": 5268367,
- "population_rank": 22,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/colorado.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/colorado.jpg",
- "funfacts": [
- "The state bird is the Lark Bunting",
- "The state tree is the Colorado Blue Spruce",
- "The state flower is the Rocky Mountain Columbine"
]
}, - {
- "state": "Connecticut",
- "slug": "connecticut",
- "code": "CT",
- "nickname": "Constitution State",
- "admission_date": "1788-01-09",
- "admission_number": 5,
- "capital_city": "Hartford",
- "population": 3596080,
- "population_rank": 29,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/connecticut.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/connecticut.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Delaware",
- "slug": "delaware",
- "code": "DE",
- "nickname": "The First State / The Diamond State",
- "admission_date": "1787-12-07",
- "admission_number": 1,
- "capital_city": "Dover",
- "population": 925749,
- "population_rank": 45,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/delaware.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/delaware.jpg",
}, - {
- "state": "Florida",
- "slug": "florida",
- "code": "FL",
- "nickname": "Sunshine State",
- "admission_date": "1845-03-03",
- "admission_number": 27,
- "capital_city": "Tallahassee",
- "population": 19552860,
- "population_rank": 4,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/florida.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/florida.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Georgia",
- "slug": "georgia",
- "code": "GA",
- "nickname": "Peach State",
- "admission_date": "1788-01-02",
- "admission_number": 4,
- "capital_city": "Atlanta",
- "population": 9992167,
- "population_rank": 8,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/georgia.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/georgia.jpg",
}, - {
- "state": "Hawaii",
- "slug": "hawaii",
- "code": "HI",
- "nickname": "Aloha State",
- "admission_date": "1959-08-21",
- "admission_number": 50,
- "capital_city": "Honolulu",
- "population": 1404054,
- "population_rank": 40,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/hawaii.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/hawaii.jpg",
}, - {
- "state": "Idaho",
- "slug": "idaho",
- "code": "ID",
- "nickname": "Gem State",
- "admission_date": "1890-07-03",
- "admission_number": 43,
- "capital_city": "Boise",
- "population": 1612136,
- "population_rank": 39,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/idaho.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/idaho.jpg",
- "facebook_url": null
}, - {
- "state": "Illinois",
- "slug": "illinois",
- "code": "IL",
- "nickname": "Prairie State",
- "admission_date": "1818-12-03",
- "admission_number": 21,
- "capital_city": "Springfield",
- "population": 12882135,
- "population_rank": 5,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/illinois.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/illinois.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Indiana",
- "slug": "indiana",
- "code": "IN",
- "nickname": "Hoosier State",
- "admission_date": "1816-12-11",
- "admission_number": 19,
- "capital_city": "Indianapolis",
- "population": 6570902,
- "population_rank": 16,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/indiana.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/indiana.jpg",
}, - {
- "state": "Iowa",
- "slug": "iowa",
- "code": "IA",
- "nickname": "Hawkeye State",
- "admission_date": "1846-12-28",
- "admission_number": 29,
- "capital_city": "Des Moines",
- "population": 3090416,
- "population_rank": 30,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/iowa.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/iowa.jpg",
- "facebook_url": null
}, - {
- "state": "Kansas",
- "slug": "kansas",
- "code": "KS",
- "nickname": "Sunflower State",
- "admission_date": "1861-01-29",
- "admission_number": 34,
- "capital_city": "Topeka",
- "population": 2893957,
- "population_rank": 34,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/kansas.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/kansas.jpg",
- "funfacts": [
- "The state bird is the Western Meadowlark",
- "The state tree is the Eastern Cottonwood",
- "The state flower is the sunflower"
]
}, - {
- "state": "Kentucky",
- "slug": "kentucky",
- "code": "KY",
- "nickname": "Bluegrass State",
- "admission_date": "1792-06-01",
- "admission_number": 15,
- "capital_city": "Frankfort",
- "population": 4395295,
- "population_rank": 26,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/kentucky.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/kentucky.jpg",
}, - {
- "state": "Louisiana",
- "slug": "louisiana",
- "code": "LA",
- "nickname": "Pelican State",
- "admission_date": "1812-04-30",
- "admission_number": 18,
- "capital_city": "Baton Rouge",
- "population": 4625470,
- "population_rank": 25,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/louisiana.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/louisiana.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Maine",
- "slug": "maine",
- "code": "ME",
- "nickname": "Pine Tree State",
- "admission_date": "1820-03-15",
- "admission_number": 23,
- "capital_city": "Augusta",
- "population": 1328302,
- "population_rank": 41,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/maine.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/maine.jpg",
}, - {
- "state": "Maryland",
- "slug": "maryland",
- "code": "MD",
- "nickname": "Old Line State",
- "admission_date": "1788-04-28",
- "admission_number": 7,
- "capital_city": "Annapolis",
- "population": 5928814,
- "population_rank": 19,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/maryland.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/maryland.jpg",
}, - {
- "state": "Massachusetts",
- "slug": "massachusetts",
- "code": "MA",
- "nickname": "Bay State",
- "admission_date": "1788-02-06",
- "admission_number": 6,
- "capital_city": "Boston",
- "population": 6692824,
- "population_rank": 14,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/massachusetts.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/massachusetts.jpg",
}, - {
- "state": "Michigan",
- "slug": "michigan",
- "code": "MI",
- "nickname": "Wolverine State / Great Lakes State",
- "admission_date": "1837-01-26",
- "admission_number": 26,
- "capital_city": "Lansing",
- "population": 9895622,
- "population_rank": 9,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/michigan.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/michigan.jpg",
}, - {
- "state": "Minnesota",
- "slug": "minnesota",
- "code": "MN",
- "nickname": "North Star State / Land of 10,000 Lakes",
- "admission_date": "1858-05-11",
- "admission_number": 32,
- "capital_city": "Saint Paul",
- "population": 5420380,
- "population_rank": 21,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/minnesota.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/minnesota.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Mississippi",
- "slug": "mississippi",
- "code": "MS",
- "nickname": "Magnolia State",
- "admission_date": "1817-12-10",
- "admission_number": 20,
- "capital_city": "Jackson",
- "population": 2991207,
- "population_rank": 31,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/mississippi.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/mississippi.jpg",
}, - {
- "state": "Missouri",
- "slug": "missouri",
- "code": "MO",
- "nickname": "Show Me State",
- "admission_date": "1821-08-10",
- "admission_number": 24,
- "capital_city": "Jefferson City",
- "population": 6044171,
- "population_rank": 18,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/missouri.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/missouri.jpg",
- "funfacts": [
- "The state bird is the Bluebird",
- "The state fish is the Channel catfish",
- "The state reptile is the Three-toed box turtle"
]
}, - {
- "state": "Montana",
- "slug": "montana",
- "code": "MT",
- "nickname": "Treasure State",
- "admission_date": "1889-11-08",
- "admission_number": 41,
- "capital_city": "Helena",
- "population": 1015165,
- "population_rank": 44,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/montana.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/montana.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Nebraska",
- "slug": "nebraska",
- "code": "NE",
- "nickname": "Cornhusker State",
- "admission_date": "1867-03-01",
- "admission_number": 37,
- "capital_city": "Lincoln",
- "population": 1868516,
- "population_rank": 37,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/nebraska.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/nebraska.jpg",
- "funfacts": [ ]
}, - {
- "state": "Nevada",
- "slug": "nevada",
- "code": "NV",
- "nickname": "The Silver State",
- "admission_date": "1864-10-31",
- "admission_number": 36,
- "capital_city": "Carson City",
- "population": 2790136,
- "population_rank": 35,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/nevada.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/nevada.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "New Hampshire",
- "slug": "new-hampshire",
- "code": "NH",
- "nickname": "Granite State",
- "admission_date": "1788-06-21",
- "admission_number": 9,
- "capital_city": "Concord",
- "population": 1323459,
- "population_rank": 42,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/new-hampshire.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/new-hampshire.jpg",
- "facebook_url": null
}, - {
- "state": "New Jersey",
- "slug": "new-jersey",
- "code": "NJ",
- "nickname": "Garden State",
- "admission_date": "1787-12-18",
- "admission_number": 3,
- "capital_city": "Trenton",
- "population": 8899339,
- "population_rank": 11,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/new-jersey.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/new-jersey.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "New Mexico",
- "slug": "new-mexico",
- "code": "NM",
- "nickname": "Land of Enchantment",
- "admission_date": "1912-01-06",
- "admission_number": 47,
- "capital_city": "Santa Fe",
- "population": 2085287,
- "population_rank": 36,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/new-mexico.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/new-mexico.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "New York",
- "slug": "new-york",
- "code": "NY",
- "nickname": "Empire State",
- "admission_date": "1788-07-26",
- "admission_number": 11,
- "capital_city": "Albany",
- "population": 19651127,
- "population_rank": 3,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/new-york.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/new-york.jpg",
- "facebook_url": null
}, - {
- "state": "North Carolina",
- "slug": "north-carolina",
- "code": "NC",
- "nickname": "Old North State / Tar Heel State",
- "admission_date": "1789-11-21",
- "admission_number": 12,
- "capital_city": "Raleigh",
- "population": 9848060,
- "population_rank": 10,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/north-carolina.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/north-carolina.jpg",
- "facebook_url": null
}, - {
- "state": "North Dakota",
- "slug": "north-dakota",
- "code": "ND",
- "nickname": "Peace Garden State / Flickertail State / Roughrider State",
- "admission_date": "1889-11-02",
- "admission_number": 39,
- "capital_city": "Bismarck",
- "population": 723393,
- "population_rank": 48,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/north-dakota.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/north-dakota.jpg",
}, - {
- "state": "Ohio",
- "slug": "ohio",
- "code": "OH",
- "nickname": "Buckeye State",
- "admission_date": "1803-03-01",
- "admission_number": 17,
- "capital_city": "Columbus",
- "population": 11570808,
- "population_rank": 7,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/ohio.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/ohio.jpg",
- "facebook_url": null
}, - {
- "state": "Oklahoma",
- "slug": "oklahoma",
- "code": "OK",
- "nickname": "Sooner State",
- "admission_date": "1907-11-16",
- "admission_number": 46,
- "capital_city": "Oklahoma City",
- "population": 3850568,
- "population_rank": 28,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/oklahoma.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/oklahoma.jpg",
- "funfacts": [
- "The state bird is the Scissor-tailed Flycatcher",
- "The state flower is Mistletoe",
- "The state tree is the Eastern Redbud"
]
}, - {
- "state": "Oregon",
- "slug": "oregon",
- "code": "OR",
- "nickname": "Beaver State",
- "admission_date": "1859-02-14",
- "admission_number": 33,
- "capital_city": "Salem",
- "population": 3930065,
- "population_rank": 27,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/oregon.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/oregon.jpg",
- "twitter_url": null,
- "facebook_url": null,
- "funfacts": [ ]
}, - {
- "state": "Pennsylvania",
- "slug": "pennsylvania",
- "code": "PA",
- "nickname": "Keystone State",
- "admission_date": "1787-12-12",
- "admission_number": 2,
- "capital_city": "Harrisburg",
- "population": 12773801,
- "population_rank": 6,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/pennsylvania.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/pennsylvania.jpg",
}, - {
- "state": "Rhode Island",
- "slug": "rhode-island",
- "code": "RI",
- "nickname": "The Ocean State",
- "admission_date": "1790-05-29",
- "admission_number": 13,
- "capital_city": "Providence",
- "population": 1051511,
- "population_rank": 43,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/rhode-island.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/rhode-island.jpg",
}, - {
- "state": "South Carolina",
- "slug": "south-carolina",
- "code": "SC",
- "nickname": "Palmetto State",
- "admission_date": "1788-05-23",
- "admission_number": 8,
- "capital_city": "Columbia",
- "population": 4774839,
- "population_rank": 24,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/south-carolina.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/south-carolina.jpg",
}, - {
- "state": "South Dakota",
- "slug": "south-dakota",
- "code": "SD",
- "nickname": "Mount Rushmore State",
- "admission_date": "1889-11-02",
- "admission_number": 40,
- "capital_city": "Pierre",
- "population": 844877,
- "population_rank": 46,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/south-dakota.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/south-dakota.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Tennessee",
- "slug": "tennessee",
- "code": "TN",
- "nickname": "Volunteer State",
- "admission_date": "1796-06-01",
- "admission_number": 16,
- "capital_city": "Nashville",
- "population": 6495978,
- "population_rank": 17,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/tennessee.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/tennessee.jpg",
}, - {
- "state": "Texas",
- "slug": "texas",
- "code": "TX",
- "nickname": "Lone Star State",
- "admission_date": "1845-12-29",
- "admission_number": 28,
- "capital_city": "Austin",
- "population": 26448193,
- "population_rank": 2,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/texas.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/texas.jpg",
}, - {
- "state": "Utah",
- "slug": "utah",
- "code": "UT",
- "nickname": "The Beehive State",
- "admission_date": "1896-01-04",
- "admission_number": 45,
- "capital_city": "Salt Lake City",
- "population": 2900872,
- "population_rank": 33,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/utah.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/utah.jpg",
}, - {
- "state": "Vermont",
- "slug": "vermont",
- "code": "VT",
- "nickname": "Green Mountain State",
- "admission_date": "1791-03-04",
- "admission_number": 14,
- "capital_city": "Montpelier",
- "population": 626630,
- "population_rank": 49,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/vermont.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/vermont.jpg",
}, - {
- "state": "Virginia",
- "slug": "virginia",
- "code": "VA",
- "nickname": "Old Dominion State",
- "admission_date": "1788-06-25",
- "admission_number": 10,
- "capital_city": "Richmond",
- "population": 8260405,
- "population_rank": 12,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/virginia.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/virginia.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Washington",
- "slug": "washington",
- "code": "WA",
- "nickname": "The Evergreen State",
- "admission_date": "1889-11-11",
- "admission_number": 42,
- "capital_city": "Olympia",
- "population": 6971406,
- "population_rank": 13,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/washington.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/washington.jpg",
- "facebook_url": ""
}, - {
- "state": "West Virginia",
- "slug": "west-virginia",
- "code": "WV",
- "nickname": "Mountain State",
- "admission_date": "1863-06-20",
- "admission_number": 35,
- "capital_city": "Charleston",
- "population": 1854304,
- "population_rank": 38,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/west-virginia.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/west-virginia.jpg",
}, - {
- "state": "Wisconsin",
- "slug": "wisconsin",
- "code": "WI",
- "nickname": "Badger State",
- "admission_date": "1848-05-29",
- "admission_number": 30,
- "capital_city": "Madison",
- "population": 5742713,
- "population_rank": 20,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/wisconsin.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/wisconsin.jpg",
- "twitter_url": null,
- "facebook_url": null
}, - {
- "state": "Wyoming",
- "slug": "wyoming",
- "code": "WY",
- "nickname": "Equality State",
- "admission_date": "1890-07-10",
- "admission_number": 44,
- "capital_city": "Cheyenne",
- "population": 582658,
- "population_rank": 50,
- "constitution_url": "http://legisweb.state.wy.us/statutes/constitution.aspx?file=titles/97Title97.htm",
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/wyoming.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/wyoming.jpg",
- "twitter_url": null,
- "facebook_url": null
}
]
Get data for a single state
Retrieves all data for a single US state.
path Parameters
state required | string Two-letter state abbreviation (not case sensitive) |
Responses
Response samples
- 200
- 400
{- "state": "Massachusetts",
- "slug": "massachusetts",
- "code": "MA",
- "nickname": "Bay State",
- "admission_date": "1788-02-06",
- "admission_number": 6,
- "capital_city": "Boston",
- "population": 6692824,
- "population_rank": 14,
- "landscape_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/landscape/massachusetts.jpg",
- "skyline_background_url": "https://cdn.civil.services/us-states/backgrounds/1280x720/skyline/massachusetts.jpg",
}
Add a fun fact
Adds one or more fun facts to the given state data object
path Parameters
state required | string Two-letter state abbreviation (not case sensitive) |
Request Body schema: application/json
The required body is an array of strings. Array elements are NOT checked for duplication and will be added to the database as-is.
funfacts required | Array of strings An array of one or more fun facts |
Responses
Request samples
- Payload
{- "funfacts": [
- "The state bird is the Western Meadowlark",
- "The state tree is the Eastern Cottonwood",
- "The state flower is the sunflower"
]
}
Response samples
- 200
- 400
{- "_id": "626882ec0af8cc1cb6b19418",
- "stateCode": "KS",
- "funfacts": [
- "The state bird is the Western Meadowlark",
- "The state tree is the Eastern Cottonwood",
- "The state flower is the sunflower"
], - "__v": 65
}
Replace a fun fact
Replaces a state's fun fact. You must specify the index of the fun facts array element in your request body. The fun facts array is NOT zero-indexed (i.e. The first element in the array is referenced by "1" and not "0."
path Parameters
state required | string Two-letter state abbreviation (not case sensitive) |
Request Body schema: application/json
The fun fact at the specified index will be replaced.
index required | string |
funfact required | string |
Responses
Request samples
- Payload
{- "index": "1",
- "funfact": "The state bug is the honeybee."
}
Response samples
- 200
- 400
{- "_id": "626882ec0af8cc1cb6b19418",
- "stateCode": "KS",
- "funfacts": [
- "The state flower is the sunflower",
- "The state tree is the Eastern Cottonwood"
], - "__v": 67
}
Delete a fun fact
Deletes a state's fun fact. You must specify the index of the fun facts array element in your request body. The fun facts array is NOT zero-indexed (i.e. The first element in the array is referenced by "1" and not "0."
path Parameters
state required | string Two-letter state abbreviation (not case sensitive) |
Request Body schema:
Specify the index of the fun fact to be deleted.
index | string |
Responses
Request samples
- Payload
{- "index": "1"
}
Response samples
- 200
- 400
{- "_id": "626882ec0af8cc1cb6b19418",
- "stateCode": "KS",
- "funfacts": [
- "The state flower is the sunflower",
- "The state tree is the Eastern Cottonwood"
], - "__v": 69
}