Je hebt Javascript nodig om deze website te kunnen gebruiken. Pas je browserinstellingen in om verder te gaan!
v0.6.10
OpenAPI 3.1.1

The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data.

Resources

Markdown Support

All descriptions can contain tons of text Markdown. If GitHub supports the syntax, chances are we're supporting it, too.

Examples

Blockquotes

I love OpenAPI. <3

Tables

Feature Availability
Markdown Support

Accordion

<details>
  <summary>Using Details Tags</summary>
  <p>HTML Example</p>
</details>

Images

Yes, there's support for images, too!

Empty placeholder image showing the width/height

Alerts

You can use Markdown alerts in your descriptions.
Client Libraries

Authentication

Some endpoints are public, but some require authentication. We provide all the required endpoints to create an account and authorize yourself.

Create a user

Time to create a user account, eh?

Body

User to create

Credentials to authenticate a user

    • email
      Type: string Format: email
      required
    • password
      Type: string
      write-only
      required
    • name
      Type: string
Responses
Request Example for post/user/signup
curl https://galaxy.scalar.com/user/signup \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Marc",
  "email": "marc@scalar.com",
  "password": "i-love-scalar"
}'
{
  "id": 1,
  "name": "Marc"
}

Get a token

Yeah, this is the boring security stuff. Just get your super secret token and move on.

Body·

Body for credentials to authenticate a user

Credentials to authenticate a user

  • email
    Type: string Format: email
    required
  • password
    Type: string
    write-only
    required
Responses
Request Example for post/auth/token
curl https://galaxy.scalar.com/auth/token \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "marc@scalar.com",
  "password": "i-love-scalar"
}'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Get authenticated user

Find yourself they say. That's what you can do here.

Responses
Request Example for get/me
curl https://galaxy.scalar.com/me \
  --header 'Authorization: Basic username:password'
{
  "id": 1,
  "name": "Marc"
}

Celestial Bodies (Collapsed)

Celestial bodies are the planets and satellites in the Scalar Galaxy.

Celestial Bodies Operations

Models