Management REST APIs of the Platform

EN | ES


Introduction

We can access these APIs from the Control Panel by clicking on APIs:

and then in Control Panel:

or access the Swagger endpoint directly at the URL https: // <my_environment> /controlpanel/swagger-ui.html (for example https://lab.onesaitplatform.com/controlpanel/swagger-ui.html).

In the platform's CloudLab environment, you can access these through this URL: https://www.onesaitplatform.online/controlpanel/swagger-ui.html).

Let's see the different APIs offered one by one:

API management service

In the drop-down menu, select management and then APIs Management service:

This API offers methods to:

  • Manage the user tokens (Get, postdelete) and
  • Authorize and de-authorize an API's user.

In every method, you must include the OAuth token. You can find an explanation about it in: How to invoke Platform Management APIs with OAuth2 Tokens?

  • Get token: allows you to get the user token. If there is more than one, it will return the last generated token.

  • Post token: allows you to generate a new token for the user who requests it.

  • Delete token: allows you to delete a token. You must first insert the token to identify which token you want to delete.

If the token does not exist, it returns an error message.

  • Authorize a user in an API: from an API and a user, it allows you to authorize that user in that API.

  • Delete an user's authorization: the opposite method to the previous one, it de-authorizes an user in an API.