Skip to content

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

  • https://github.com/scalar/scalar
  • https://github.com/OAI/OpenAPI-Specification
  • https://scalar.com

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

[!tip]
You can use Markdown alerts in your descriptions.

Contact​

License​

MIT

External Documentation​

Documentation

Servers​

https://galaxy.scalar.com
{protocol}://void.scalar.com/{path}Responds with your request data

Get all planets​

GET
/planets

It's easy to say you know them all, but do you really? Retrieve all the planets and check whether you missed one.

Parameters​

Responses​

OK

Playground​

Server

Samples​


Create a planet​

POST
/planets

Time to play god and create a new planet. What do you think? Ah, don't think too much. What could go wrong anyway?

Authorizations​

bearerAuth

JWT Bearer token authentication

Type
HTTP (bearer)
or
basicAuth

Basic HTTP authentication

Type
HTTP (basic)
or
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
or
apiKeyHeader|apiKeyQuery
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
+
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyCookie

API key browser cookie

Type
API Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
clientCredentials Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
implicit Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
password Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
or
openIdConnect

OpenID Connect Authentication

Type
OpenID Connect (https://galaxy.scalar.com/.well-known/openid-configuration)

Request Body​

Responses​

Created

Playground​

Server
Authorization
Body

Samples​


Get a planet​

GET
/planets/{planetId}

You'll better learn a little bit more about the planets. It might come in handy once space travel is available for everyone.

Parameters​

Responses​

Planet Found

Playground​

Server

Samples​


Update a planet​

PUT
/planets/{planetId}

Sometimes you make mistakes, that's fine. No worries, you can update all planets.

Authorizations​

bearerAuth

JWT Bearer token authentication

Type
HTTP (bearer)
or
basicAuth

Basic HTTP authentication

Type
HTTP (basic)
or
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
or
apiKeyHeader|apiKeyQuery
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
+
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyCookie

API key browser cookie

Type
API Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
clientCredentials Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
implicit Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
password Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
or
openIdConnect

OpenID Connect Authentication

Type
OpenID Connect (https://galaxy.scalar.com/.well-known/openid-configuration)

Parameters​

Request Body​

Responses​

Planet updated successfully

Playground​

Server
Authorization
Body

Samples​


Delete a planet​

DELETE
/planets/{planetId}

This endpoint was used to delete planets. Unfortunately, that caused a lot of trouble for planets with life. So, this endpoint is now deprecated and should not be used anymore.

Authorizations​

bearerAuth

JWT Bearer token authentication

Type
HTTP (bearer)
or
basicAuth

Basic HTTP authentication

Type
HTTP (basic)
or
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
or
apiKeyHeader|apiKeyQuery
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
+
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyCookie

API key browser cookie

Type
API Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
clientCredentials Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
implicit Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
password Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
or
openIdConnect

OpenID Connect Authentication

Type
OpenID Connect (https://galaxy.scalar.com/.well-known/openid-configuration)

Parameters​

Responses​

No Content

Playground​

Server
Authorization

Samples​


Upload an image to a planet​

POST
/planets/{planetId}/image

Got a crazy good photo of a planet? Share it with the world!

Authorizations​

bearerAuth

JWT Bearer token authentication

Type
HTTP (bearer)
or
basicAuth

Basic HTTP authentication

Type
HTTP (basic)
or
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
or
apiKeyHeader|apiKeyQuery
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
+
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyCookie

API key browser cookie

Type
API Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
clientCredentials Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
implicit Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
password Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
or
openIdConnect

OpenID Connect Authentication

Type
OpenID Connect (https://galaxy.scalar.com/.well-known/openid-configuration)

Parameters​

Request Body​

multipart/form-data

The image file to upload

Format"binary"

Responses​

Playground​

Server
Authorization
Body

Samples​


Celestial Bodies​

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


Create a celestial body​

POST
/celestial-bodies

Stars, moons, comets, the occasional rogue asteroid — if it glows or drifts through the void, you can add it here.

Authorizations​

bearerAuth

JWT Bearer token authentication

Type
HTTP (bearer)
or
basicAuth

Basic HTTP authentication

Type
HTTP (basic)
or
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
or
apiKeyHeader|apiKeyQuery
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
+
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyCookie

API key browser cookie

Type
API Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
clientCredentials Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
implicit Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
password Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
or
openIdConnect

OpenID Connect Authentication

Type
OpenID Connect (https://galaxy.scalar.com/.well-known/openid-configuration)

Request Body​

application/json

Responses​

Celestial body created

application/json

Playground​

Server
Authorization
Body

Samples​


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​

POST
/user/signup

Time to create a user account, eh?

Request Body​

Credentials to authenticate a user

Format"int64"
Format"email"

Responses​

User account created successfully

Playground​

Server
Body

Samples​


Get a token​

POST
/auth/token

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

Request Body​

Responses​

Token Created

Playground​

Server
Body

Samples​


Get authenticated user​

GET
/me

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

Authorizations​

basicAuth

Basic HTTP authentication

Type
HTTP (basic)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
clientCredentials Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
implicit Flow
Authorization URL"https://galaxy.scalar.com/oauth/authorize"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
password Flow
Token URL"https://galaxy.scalar.com/oauth/token"
Scopes:
  • "read:account"read your account information
  • "write:planets"modify planets in your account
  • "read:planets"read your planets
or
bearerAuth

JWT Bearer token authentication

Type
HTTP (bearer)
or
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
or
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)
or
apiKeyHeader|apiKeyQuery
apiKeyHeader

API key request header

Type
API Key (header: X-API-Key)
+
apiKeyQuery

API key query parameter

Type
API Key (query: api_key)

Responses​

Authenticated user information retrieved successfully

Playground​

Server
Authorization

Samples​


Powered by VitePress OpenAPI