# API

An API is a way for two or more apps to communicate with each other.

The importance of efficient and reliable APIs cannot be overstated and this is why Solodev utilizes Swagger. Swagger is a set of rules (specifications) and tooling to semantically describe APIs using a common language that is readable by both humans and machines. This means the same documentation can be shared with your team while also being used to automate API-dependent processes which are great for testing and debugging API problems. Any API that adheres to the Swagger specs is easy to read, easy to iterate, and easy to consume.

In practice, Swagger allows you to display interactive REST API documentation in which you can test and run queries through the integration with code. All commands are fully described, along with the information that the API takes and returns. More advanced configurations take into account authorizations as well as roles that are available to individual users.

API page allows you to manage Swagger which is described below.

At the top, you can check API Server that is currently used.

api

Name Description
Authorize Authorize yourself to gain access to Swagger.
Swagger Management Select a method name under a category to expand the Swagger options.

# Authorize

Here you can gain access to Swagger by using the Bearer or UserApiToken authorization method.

Bearer Authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens. The name “bearer authentication” can be understood as “give access to the bearer of this token” the token is a cryptic string usually generated by the server in response to a login request. The client must send this token in the authorization header when making requests to protected resources.

authorize

Name Description
Value Copy and paste the value that can be found in API Tokens.
Authorize Authorize yourself.

# Swagger Management

Manage Swagger. Any action method in controllers can be tested from the user interface. Select a method name to expand the section.

swagger

Name Description
Try it out Unlock the fields that are necessary to fill them out.
Fill out necessary fields Add all the necessary parameters. Parameters differ depending on the catalog you want to test. It can be a password, e-mail, etc.

swagger2

Name Description
Execute Execute the HTTP response.

The executed response will be listed at the bottom.

swagger3

Name Description
Download Download the response in .json format.