SpaceDB API

Replace a spaceship

put

Path Parameters

idintegerrequired

Body

application/json

Spaceship

idinteger

Example:1

namestring

Example:ISS

typestring

Allowed values:spacecraftprobestationrocket

Example:station

operatorstring | null

Example:NASA / Roscosmos

launch_datestring | null(date)

Example:1998-11-20

statusstring

Allowed values:activeretiredplannedlost

Example:active

crew_capacityinteger | null

Example:7

mass_kgnumber | null(float)

Example:419725

descriptionstring | null

Example:International Space Station

created_atstring(date-time)
updated_atstring(date-time)

Response

Updated

put/spaceships/{id}

Body

{}
 

Partially update a spaceship

patch

Path Parameters

idintegerrequired

Body

application/json

Spaceship

idinteger

Example:1

namestring

Example:ISS

typestring

Allowed values:spacecraftprobestationrocket

Example:station

operatorstring | null

Example:NASA / Roscosmos

launch_datestring | null(date)

Example:1998-11-20

statusstring

Allowed values:activeretiredplannedlost

Example:active

crew_capacityinteger | null

Example:7

mass_kgnumber | null(float)

Example:419725

descriptionstring | null

Example:International Space Station

created_atstring(date-time)
updated_atstring(date-time)

Response

Updated

patch/spaceships/{id}

Body

{}
 

Delete a spaceship

delete

Path Parameters

idintegerrequired

Response

Deleted

delete/spaceships/{id}
 

Star

object
idinteger

Example:1

namestring

Example:Sol

typestring

Allowed values:main_sequencered_giantwhite_dwarfneutronsupergiant

Example:main_sequence

mass_solarnumber(float)

Example:1

luminosity_solarnumber(float)

Example:1

temperature_kinteger

Example:5778

distance_lynumber(float)
constellationstring
discovered_atstring(date)
planet_countinteger

Example:9

created_atstring(date-time)
updated_atstring(date-time)
Example

Planet

object
idinteger

Example:3

namestring

Example:Earth

typestring

Allowed values:terrestrialgas_giantice_giantdwarf

Example:terrestrial

star_idinteger

Example:1

mass_earthnumber(float)

Example:1

radius_kmnumber(float)

Example:6371

orbital_period_daysnumber(float)

Example:365.25

distance_aunumber(float)

Example:1

has_ringsboolean
discovered_atstring(date)
moon_countinteger

Example:1

created_atstring(date-time)
updated_atstring(date-time)
Example