SpaceDB API

Create a star

post

Body

application/json
namestringrequired
typestringrequired

Allowed values:main_sequencered_giantwhite_dwarfneutronsupergiant

mass_solarnumber
luminosity_solarnumber
temperature_kinteger
distance_lynumber
constellationstring
discovered_atstring(date)

Response

application/json

Star created

dataobject
Show Child Parameters
post/stars

Body

{ "name": "name", "type": "main_sequence" }
 
application/json

Get a star

get

Path Parameters

idintegerrequired

Response

application/json

Star details

dataobject
Show Child Parameters
get/stars/{id}
 
application/json

Replace a star

put

Path Parameters

idintegerrequired

Body

application/json

Star

idinteger

Example:1

namestring

Example:Sol

typestring

Allowed values:main_sequencered_giantwhite_dwarfneutronsupergiant

Example:main_sequence

mass_solarnumber | null(float)

Example:1

luminosity_solarnumber | null(float)

Example:1

temperature_kinteger | null

Example:5778

distance_lynumber | null(float)

Example:0

constellationstring | null

Example:null

discovered_atstring | null(date)

Example:null

planet_countinteger

Example:9

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

Response

Updated

put/stars/{id}

Body

{}
 

Partially update a star

patch

Path Parameters

idintegerrequired

Body

application/json

Star

idinteger

Example:1

namestring

Example:Sol

typestring

Allowed values:main_sequencered_giantwhite_dwarfneutronsupergiant

Example:main_sequence

mass_solarnumber | null(float)

Example:1

luminosity_solarnumber | null(float)

Example:1

temperature_kinteger | null

Example:5778

distance_lynumber | null(float)

Example:0

constellationstring | null

Example:null

discovered_atstring | null(date)

Example:null

planet_countinteger

Example:9

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

Response

Updated

patch/stars/{id}

Body

{}
 

Delete a star

delete

Path Parameters

idintegerrequired

Response

Deleted

delete/stars/{id}