SpaceDB API

Get a moon

get

Path Parameters

idintegerrequired

Response

application/json

Moon details

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

Replace a moon

put

Path Parameters

idintegerrequired

Body

application/json

Moon

idinteger

Example:1

namestring

Example:Luna

planet_idinteger | null

Example:3

mass_kgnumber | null(float)

Example:7.342e+22

radius_kmnumber | null(float)

Example:1737.4

orbital_period_daysnumber | null(float)

Example:27.32

discovered_atstring | null(date)

Example:null

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

Response

Updated

put/moons/{id}

Body

{}
 

Partially update a moon

patch

Path Parameters

idintegerrequired

Body

application/json

Moon

idinteger

Example:1

namestring

Example:Luna

planet_idinteger | null

Example:3

mass_kgnumber | null(float)

Example:7.342e+22

radius_kmnumber | null(float)

Example:1737.4

orbital_period_daysnumber | null(float)

Example:27.32

discovered_atstring | null(date)

Example:null

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

Response

Updated

patch/moons/{id}

Body

{}
 

Delete a moon

delete

Path Parameters

idintegerrequired

Response

Deleted

delete/moons/{id}
 

List all spaceships

get

Query Parameters

pageinteger
per_pageinteger

<= 100

Response

application/json

Paginated list of spaceships

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