Closed rafaeltab closed 2 years ago
Add a role with a name, and list of scopes
{ "name": "admin", "scopes": [ "manage:roles", "manage:external-applications", "..." ] }
returns id of newly created role
Delete a role using its id
Update a role, with name and list of scopes, overrides the current settings.
{ "name": "admin", "scopes": [ "manage:roles", "..." ] }
Get a list of all roles and their scopes
returns
[ { "id": "xxx", "name": "admin", "scopes": [ "manage:roles", "..." ] }, { "id": "xxx", "name": "user", "scopes": [ "anime:details", "..." ] } ]
Add an external application with name, and configuration
{ "name": "MyAnimeList", "configuration": { "baseUrl": "https://api.myanimelist.net/api/v2", "authorizationUrl": "https://api.myanimelist.net/api/v2/authorize", "...": "..." } }
Update the configuration for an external application
{ "configuration": { "...": "..." } }
Delete an external api using its id
Get all external applications and their confifurations
{ "name": "kurabu-app", "redirectUris": [ "http://localhost:5000/auth", "..." ] }
Create a client with attached redirect uris
Delete a client with attached redirectUris for an id
Update a clients redirect uris for a clientId
Get all clients and their redirect uris
Management endpoints
Roles
PUT /api/v1/manage/role
Add a role with a name, and list of scopes
returns id of newly created role
DELETE /api/v1/manage/role
Delete a role using its id
PATCH /api/v1/manage/role
Update a role, with name and list of scopes, overrides the current settings.
GET /api/v1/manage/roles
Get a list of all roles and their scopes
returns
External applications
PUT /api/v1/manage/externalapplication
Add an external application with name, and configuration
PATCH /api/v1/manage/externalapplication
Update the configuration for an external application
DELETE /api/v1/manage/externalapplication
Delete an external api using its id
GET /api/v1/manage/externalapplications
Get all external applications and their confifurations
Clients
PUT /api/v1/manage/client
Create a client with attached redirect uris
DELETE /api/v1/manage/client
Delete a client with attached redirectUris for an id
PATCH /api/v1/manage/client
Update a clients redirect uris for a clientId
GET /api/v1/manage/clients
Get all clients and their redirect uris