# New Planet

`POST /newPlanet`

Base URL: https://galaxy.scalar.com, https://void.scalar.com/

## Authorization

- bearerAuth: HTTP bearer
- basicAuth: HTTP basic
- apiKeyQuery: API key in query `api_key`
- apiKeyHeader: API key in header `X-API-Key`
- apiKeyCookie: API key in cookie `api_key`
- oAuth2: oauth2
- openIdConnect: openIdConnect

## Request body (application/json)

Information about a new planet

- `id` (integer, required)
- `name` (string, required)
- `description` (string | null)
- `type` (string): One of: `terrestrial`, `gas_giant`, `ice_giant`, `dwarf`, `super_earth`.
- `habitabilityIndex` (number): A score from 0 to 1 indicating potential habitability
- `physicalProperties` (object)
  - `mass` (number): Mass in Earth masses (must be greater than 0)
  - `radius` (number): Radius in Earth radii (must be greater than 0)
  - `gravity` (number): Surface gravity in Earth g
  - `temperature` (object)
    - `min` (number): Minimum temperature in Kelvin
    - `max` (number): Maximum temperature in Kelvin
    - `average` (number): Average temperature in Kelvin
- `atmosphere` (array<object>): Atmospheric composition
  - `compound` (string)
  - `percentage` (number)
- `discoveredAt` (string)
- `image` (string | null)
- `satellites` (array<Satellite>)
- `creator` (User): A user
- `tags` (array<string>)
- `lastUpdated` (string)
- `successCallbackUrl` (string): URL which gets invoked upon a successful operation
- `failureCallbackUrl` (string): URL which gets invoked upon a failed operation

Example:

```json
{
  "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,
      "temperatureMetric1": 0.1,
      "temperatureMetric2": 0.1
    },
    "measurement1": 0.1,
    "measurement2": 0.1
  },
  "atmosphere": [
    {
      "compound": "CO2",
      "percentage": 95.3,
      "atmosphericData1": "string",
      "atmosphericData2": "string"
    }
  ],
  "discoveredAt": "1610-01-07T00:00:00.000Z",
  "image": "https://cdn.scalar.com/photos/mars.jpg",
  "satellites": [
    {
      "name": "Phobos",
      "description": "Phobos is the larger and innermost of the two moons of Mars.",
      "diameter": 22.2,
      "type": "moon",
      "orbit": {
        "planet": {
          "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,
              "temperatureMetric1": 0.1,
              "temperatureMetric2": 0.1
            },
            "measurement1": 0.1,
            "measurement2": 0.1
          },
          "atmosphere": [
            {
              "compound": "CO2",
              "percentage": 95.3,
              "atmosphericData1": "string",
              "atmosphericData2": "string"
            }
          ],
          "discoveredAt": "1610-01-07T00:00:00.000Z",
          "image": "https://cdn.scalar.com/photos/mars.jpg",
          "satellites": [],
          "creator": {
            "name": "Marc"
          },
          "tags": [
            "solar-system",
            "rocky",
            "explored"
          ],
          "successCallbackUrl": "https://example.com/webhook",
          "failureCallbackUrl": "https://example.com/webhook"
        },
        "orbitalPeriod": 0.319,
        "distance": 9376
      }
    }
  ],
  "creator": {
    "name": "Marc"
  },
  "tags": [
    "solar-system",
    "rocky",
    "explored"
  ],
  "successCallbackUrl": "https://example.com/webhook",
  "failureCallbackUrl": "https://example.com/webhook"
}
```

## Responses

### 200: Return a 200 status to indicate that the data was received successfully
