SpaceDB API

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}
 

List all planets

get

Query Parameters

pageinteger
per_pageinteger

<= 100

Response

application/json

Paginated list of planets

dataarray[object]
Show Child Parameters
linksobject
Show Child Parameters
metaobject
Show Child Parameters
get/planets
 
application/json