Node API: Authorization
RPC API
There are no authorization built into the RPC API, all users have full access to all API methods.
REST API
The REST API have role based access control. Key and roles is controlled through the appsettings.json file.
1 |
|
Authorization is handled through tags on controllers or operations.
Here is example taken from the Shutdown operation, which is only accessible for admin keys:
1 2 3 4 5 6 7 8 9 |
|
Unauthorized (401)
When a request is not authorized with the API key, it will return an HTTP 401 Unauthorized result. If you get HTTP 500 error, that means there might be a configuration or other issues with the node.
The JSON body result will be:
1 2 3 4 5 |
|
Last update:
2021-10-24