SpaceDB API

Create a spaceship

post

Body

application/json
namestringrequired
typestringrequired

Allowed values:spacecraftprobestationrocket

operatorstring | null
launch_datestring | null(date)
statusstringrequired

Allowed values:activeretiredplannedlost

crew_capacityinteger | null
mass_kgnumber | null
descriptionstring | null

Response

application/json

Spaceship created

dataobject
Show Child Parameters
post/spaceships

Body

{ "name": "name", "type": "spacecraft", "status": "active" }
 
application/json

Get a spaceship

get

Path Parameters

idintegerrequired

Response

application/json

Spaceship details

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

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}