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!
Alerts
[!tip]
You can use Markdown alerts in your descriptions.
Contact
External Documentation
DocumentationServers
Get all 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
Query Parameters
The number of items to return
"int64"10The number of items to skip before starting to collect the result set
"int64"0Responses
OK
A generic paginated resource. Specializing schemas bind the item type by declaring a $dynamicAnchor named itemType, the JSON Schema 2020-12 way to express PaginatedResource<T>.
Create a planet
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
JWT Bearer token authentication
Basic HTTP authentication
API key query parameter
API key request header
API key request header
API key query parameter
API key browser cookie
OAuth 2.0 authentication
authorizationCode Flow
"https://galaxy.scalar.com/oauth/authorize""https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
clientCredentials Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
implicit Flow
"https://galaxy.scalar.com/oauth/authorize""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
password Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
OpenID Connect Authentication
Request Body
A planet in the Scalar Galaxy
"int64""terrestrial""gas_giant""ice_giant""dwarf""super_earth"A score from 0 to 1 indicating potential habitability
"float"01Atmospheric composition
"date-time"A user
"date-time"URL which gets invoked upon a successful operation
"uri"URL which gets invoked upon a failed operation
"uri"Responses
Created
A planet in the Scalar Galaxy
"int64""terrestrial""gas_giant""ice_giant""dwarf""super_earth"A score from 0 to 1 indicating potential habitability
"float"01Atmospheric composition
"date-time"A user
"date-time"URL which gets invoked upon a successful operation
"uri"URL which gets invoked upon a failed operation
"uri"Get a planet
You'll better learn a little bit more about the planets. It might come in handy once space travel is available for everyone.
Parameters
Path Parameters
The ID of the planet to get
1"int64"Responses
Planet Found
A planet in the Scalar Galaxy
"int64""terrestrial""gas_giant""ice_giant""dwarf""super_earth"A score from 0 to 1 indicating potential habitability
"float"01Atmospheric composition
"date-time"A user
"date-time"URL which gets invoked upon a successful operation
"uri"URL which gets invoked upon a failed operation
"uri"Update a planet
Sometimes you make mistakes, that's fine. No worries, you can update all planets.
Authorizations
JWT Bearer token authentication
Basic HTTP authentication
API key query parameter
API key request header
API key request header
API key query parameter
API key browser cookie
OAuth 2.0 authentication
authorizationCode Flow
"https://galaxy.scalar.com/oauth/authorize""https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
clientCredentials Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
implicit Flow
"https://galaxy.scalar.com/oauth/authorize""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
password Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
OpenID Connect Authentication
Parameters
Path Parameters
The ID of the planet to get
1"int64"Request Body
A planet in the Scalar Galaxy
"int64""terrestrial""gas_giant""ice_giant""dwarf""super_earth"A score from 0 to 1 indicating potential habitability
"float"01Atmospheric composition
"date-time"A user
"date-time"URL which gets invoked upon a successful operation
"uri"URL which gets invoked upon a failed operation
"uri"Responses
Planet updated successfully
A planet in the Scalar Galaxy
"int64""terrestrial""gas_giant""ice_giant""dwarf""super_earth"A score from 0 to 1 indicating potential habitability
"float"01Atmospheric composition
"date-time"A user
"date-time"URL which gets invoked upon a successful operation
"uri"URL which gets invoked upon a failed operation
"uri"Delete a planet
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
JWT Bearer token authentication
Basic HTTP authentication
API key query parameter
API key request header
API key request header
API key query parameter
API key browser cookie
OAuth 2.0 authentication
authorizationCode Flow
"https://galaxy.scalar.com/oauth/authorize""https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
clientCredentials Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
implicit Flow
"https://galaxy.scalar.com/oauth/authorize""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
password Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
OpenID Connect Authentication
Parameters
Path Parameters
The ID of the planet to get
1"int64"Responses
No Content
Upload an image to a planet
Got a crazy good photo of a planet? Share it with the world!
Authorizations
JWT Bearer token authentication
Basic HTTP authentication
API key query parameter
API key request header
API key request header
API key query parameter
API key browser cookie
OAuth 2.0 authentication
authorizationCode Flow
"https://galaxy.scalar.com/oauth/authorize""https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
clientCredentials Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
implicit Flow
"https://galaxy.scalar.com/oauth/authorize""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
password Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
OpenID Connect Authentication
Parameters
Path Parameters
The ID of the planet to get
1"int64"Request Body
The image file to upload
"binary"Responses
Image uploaded
Message about an image upload
The URL where the uploaded image can be accessed
Timestamp when the image was uploaded
"date-time"Size of the uploaded image in bytes
The content type of the uploaded image
Create a celestial body
Stars, moons, comets, the occasional rogue asteroid — if it glows or drifts through the void, you can add it here.
Authorizations
JWT Bearer token authentication
Basic HTTP authentication
API key query parameter
API key request header
API key request header
API key query parameter
API key browser cookie
OAuth 2.0 authentication
authorizationCode Flow
"https://galaxy.scalar.com/oauth/authorize""https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
clientCredentials Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
implicit Flow
"https://galaxy.scalar.com/oauth/authorize""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
password Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
OpenID Connect Authentication
Request Body
A celestial body which can be either a planet or a satellite
A planet in the Scalar Galaxy
"int64""terrestrial""gas_giant""ice_giant""dwarf""super_earth"A score from 0 to 1 indicating potential habitability
"float"01Atmospheric composition
"date-time"A user
"date-time"URL which gets invoked upon a successful operation
"uri"URL which gets invoked upon a failed operation
"uri"Every satellite in the Scalar Galaxy
"int64"Diameter in kilometers
"float""moon""asteroid""comet"Responses
Celestial body created
A celestial body which can be either a planet or a satellite
A planet in the Scalar Galaxy
"int64""terrestrial""gas_giant""ice_giant""dwarf""super_earth"A score from 0 to 1 indicating potential habitability
"float"01Atmospheric composition
"date-time"A user
"date-time"URL which gets invoked upon a successful operation
"uri"URL which gets invoked upon a failed operation
"uri"Every satellite in the Scalar Galaxy
"int64"Diameter in kilometers
"float""moon""asteroid""comet"Authentication
Some endpoints are public, but some require authentication. We provide all the required endpoints to create an account and authorize yourself.
Operations
Create a user
Get a token
Get authenticated user
Find yourself they say. That's what you can do here.
Authorizations
Basic HTTP authentication
OAuth 2.0 authentication
authorizationCode Flow
"https://galaxy.scalar.com/oauth/authorize""https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
clientCredentials Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
implicit Flow
"https://galaxy.scalar.com/oauth/authorize""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
password Flow
"https://galaxy.scalar.com/oauth/token""read:account"read your account information"write:planets"modify planets in your account"read:planets"read your planets
JWT Bearer token authentication
API key request header
API key query parameter
API key request header
API key query parameter
Responses
Authenticated user information retrieved successfully
A user
"int64"