MonoM Public API
Introduction
During recent years the API First concept has increased in both importance and recognition as a general strategy to be followed during the development of a system. In essence, this defends the idea of designing, from the outset, an API that will offer support to all potential clients who need to consume the system’s base business.​
We understand the importance of the API’s design, and we apply this methodology when it comes to building software. We use swagger / openapi as the language for defining APIs and we firmly believe that this is the ideal way of allowing our clients to become more quickly and easily integrated.
Â
The OpenAPI specification, originally known as the Swagger specification, is a specification for machine-readable interface files for describing, producing, consuming and visualising RESTful web services. Previously part of the Swagger framework, it became a separate project in 2016, overseen by the OpenAPI Initiative, an open-source collaboration project of the Linux Foundation. Swagger and some other tools can generate code, documentation, and test cases with an interface file.​
​OpenAPI has a large community and range of tools (https://openapi.tools/ ), and it enjoys the support of the main API Management System developers in the marketplace. ​​
It can now be said that OAS is the market standard in the definition of APIs, especially now that the largest sponsor of RAML, Mulesoft, has started to use OAS.​
Ref: https://www.openapis.org/
Get Token
MonoM uses oAuth2 authentication, for it next cURL may be applied:
Â
curl --request POST \
--url https://{HOST}/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id={CLIENT_ID} \
--data client_secret={CLIENT_SECRET} \
--data grant_type=client_credentials
where
HOST may be api.dev.monom.ai or api.monom.ai, where first domain belongs to testing environment and the second one for production
CLIENT_ID the application id that you recieved
CLIENT_SECRET, the secret that we send you with the CLIENT_ID variable
Â
if the request is valid, system will return a valid JWT token:
Â
{
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZC....",
"token_type": "Bearer",
"expires_in": 3599
}
Â
API Definition
To use the API correctly, it is necessary to fill the Authorize field with the idToken value from the previous step