Create a celestial body
Body·CelestialBody
required
application/json
Celestial body to create
A planet in the Scalar Galaxy
- typeDiscriminatorType: stringenumvalues
- terrestrial =
Terrestrial Rocky planets with solid surfaces, like Earth and Mars
- gas
_giant = Gas Giant Large planets composed mainly of hydrogen and helium, like Jupiter and Saturn
- ice
_giant = Ice Giant Planets composed of water, ammonia, and methane ices, like Uranus and Neptune
- dwarf =
Dwarf Small planetary bodies that don't meet full planet criteria, like Pluto
- super
_earth = Super Earth Rocky planets larger than Earth but smaller than gas giants
- Type: stringnamerequired
- Type: array object[]atmosphere
Atmospheric composition
- Type: object · Usercreator
A user
- Type: string | nulldescription
- Type: stringFormat: date-timediscovered
At the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
- Type: stringFormat: urifailure
Callback Url URL which gets invoked upon a failed operation
- Type: numberFormat: floathabitability
Index min:0max:1A score from 0 to 1 indicating potential habitability
- Type: string | nullimage
- Type: objectphysical
Properties - Type: array object[] · Satellite[]satellites
Every satellite in the Scalar Galaxy
- Type: stringFormat: urisuccess
Callback Url URL which gets invoked upon a successful operation
- Type: array string[]
Responses
- application/json
Request Example for post/celestial-bodies
using Scalar.GalaxyCsharp;
using Scalar.GalaxyCsharp.Models.Components;
var sdk = new GalaxyCsharp();
CelestialBodyInput req = CelestialBodyInput.CreateMoon(
new SatelliteInput1() {
Name = "Phobos",
Type = SatelliteType.Moon,
}
);
var res = await sdk.CelestialBodies.CreateCelestialBodyAsync(req);
// handle response
{
"id": 1,
"name": "Mars",
"description": "The red planet",
"type": "terrestrial",
"habitabilityIndex": 0.68,
"physicalProperties": {
"mass": 0.107,
"radius": 0.532,
"gravity": 0.378,
"temperature": {
"min": 130,
"max": 308,
"average": 210,
"temperatureMetric": 1
},
"measurement": 1
},
"atmosphere": [
{
"compound": "CO2",
"percentage": 95.3,
"atmosphericData": "string"
}
],
"discoveredAt": "1610-01-07T00:00:00Z",
"image": "https://cdn.scalar.com/photos/mars.jpg",
"satellites": [
{
"id": 1,
"name": "Phobos",
"description": "Phobos is the larger and innermost of the two moons of Mars.",
"diameter": 22.2,
"type": "moon",
"orbit": {
"planet": null,
"orbitalPeriod": 0.319,
"distance": 9376
}
}
],
"creator": {
"id": 1,
"name": "Marc"
},
"tags": [
"solar-system",
"rocky",
"explored"
],
"lastUpdated": "2024-01-15T14:30:00Z",
"successCallbackUrl": "https://example.com/webhook",
"failureCallbackUrl": "https://example.com/webhook"
}