Skip to content
v1.0.0

Scalar Galaxy

The Scalar Galaxy is an example OpenAPI specification to test OpenAPI tools and libraries. It’s a fictional universe with fictional planets and fictional data. Get all the data for all planets.

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. You can even create internal links to reference endpoints.

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 now 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
JSON
{
"data": [
],
"meta": {
"limit": 10,
"offset": 0,
"total": 100,
"next": "/planets?limit=10&offset=10"
}
}

Playground

Server

Samples

cURL
JavaScript
PHP
Python

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

TypeHTTP (bearer)
or
basicAuth

Basic HTTP authentication

TypeHTTP (basic)
or
apiKeyQuery

API key query parameter

TypeAPI Key (query: api_key)
or
apiKeyHeader

API key request header

TypeAPI Key (header: X-API-Key)
or
apiKeyCookie

API key browser cookie

TypeAPI Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
clientCredentials Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
implicit Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
password Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
or
openIdConnect

OpenID Connect Authentication

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

Request Body

JSON
"string"

Responses

Created
JSON
"string"

Playground

Server
Authorization
Body

Samples

cURL
JavaScript
PHP
Python

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
JSON
"string"

Playground

Server

Samples

cURL
JavaScript
PHP
Python

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

TypeHTTP (bearer)
or
basicAuth

Basic HTTP authentication

TypeHTTP (basic)
or
apiKeyQuery

API key query parameter

TypeAPI Key (query: api_key)
or
apiKeyHeader

API key request header

TypeAPI Key (header: X-API-Key)
or
apiKeyCookie

API key browser cookie

TypeAPI Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
clientCredentials Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
implicit Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
password Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
or
openIdConnect

OpenID Connect Authentication

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

Parameters

Request Body

JSON
"string"

Responses

OK
JSON
"string"

Playground

Server
Authorization
Body

Samples

cURL
JavaScript
PHP
Python

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

TypeHTTP (bearer)
or
basicAuth

Basic HTTP authentication

TypeHTTP (basic)
or
apiKeyQuery

API key query parameter

TypeAPI Key (query: api_key)
or
apiKeyHeader

API key request header

TypeAPI Key (header: X-API-Key)
or
apiKeyCookie

API key browser cookie

TypeAPI Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
clientCredentials Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
implicit Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
password Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
or
openIdConnect

OpenID Connect Authentication

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

Parameters

Responses

No Content

Playground

Server
Authorization

Samples

cURL
JavaScript
PHP
Python

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

TypeHTTP (bearer)
or
basicAuth

Basic HTTP authentication

TypeHTTP (basic)
or
apiKeyQuery

API key query parameter

TypeAPI Key (query: api_key)
or
apiKeyHeader

API key request header

TypeAPI Key (header: X-API-Key)
or
apiKeyCookie

API key browser cookie

TypeAPI Key (cookie: api_key)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
clientCredentials Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
implicit Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
password Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
or
openIdConnect

OpenID Connect Authentication

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

Parameters

Request Body

JSON
{
"image": "@mars.jpg"
}

Responses

Playground

Server
Authorization
Body
JSON

Samples

cURL
JavaScript
PHP
Python

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

JSON
{
"name": "Marc",
"email": "marc@scalar.com",
"password": "i-love-scalar"
}

Responses

Created
JSON
"string"

Playground

Server
Body
JSON

Samples

cURL
JavaScript
PHP
Python

Get a token

POST
/auth/token

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

Request Body

JSON
"string"

Responses

Token Created
JSON
"string"

Playground

Server
Body

Samples

cURL
JavaScript
PHP
Python

Get authenticated user

GET
/me

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

Authorizations

basicAuth

Basic HTTP authentication

TypeHTTP (basic)
or
oAuth2

OAuth 2.0 authentication

authorizationCode Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
clientCredentials Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
implicit Flow
Authorization URLhttps://galaxy.scalar.com/oauth/authorize
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
password Flow
Token URLhttps://galaxy.scalar.com/oauth/token
Scopes:
  • read:accountread your account information
  • write:planetsmodify planets in your account
  • read:planetsread your planets
or
bearerAuth

JWT Bearer token authentication

TypeHTTP (bearer)
or
apiKeyHeader

API key request header

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

API key query parameter

TypeAPI Key (query: api_key)

Responses

OK
JSON
"string"

Playground

Server
Authorization

Samples

cURL
JavaScript
PHP
Python

Powered by VitePress OpenAPI