Admin Rest API - TreeGateway/tree-gateway GitHub Wiki

In order to interact with the Gateway REST Api you must create first one user/password.

To create this fisrt user, you must use the CLI tool (treeGatewayConfig).

Accessing this URL http://localhost:8001/api-docs, you can see the swagger-ui interface, that allows you to explore and interact with the API.

You can also access the API swagger file through:

http://localhost:8001/api-docs/json
or
http://localhost:8001/api-docs/yaml

You need to provide an access token to all methods on the Admin API. To obtain this token, you must authenticate with the user you created in the previous step, by calling the endpoint:

http://localhost:8001/users/authentication

Then you must inform this token through the Authorization: Bearer <token> header on every Admin API request.

To do this through this swagger-ui, just follow the next steps.

Call /users/authenticate endpoint.

Use the user you created with userAdmin tool. The service will return a JWT token. Copy it.

Now you can authenticate through the swagger-ui interface, clicking in the red i icon that appears on every api entrypoint to indicate you need authetication. Once you click it, a dialog will be opened to you enter your credentials. Just enter Bearer <your token> and authenticate.

And the red icon becomes blue. You are authenticated and can call any API method.

⚠️ **GitHub.com Fallback** ⚠️