Dandelion - API Documentation - Key Management
Module name: keymanager
Index
get
Endpoint: /api/key/get
Method: POST
Parameters: None
Description: Gets the api key of the use associated with the request. Yes right now it’s useless, but soon it won’t be.
Example Return Data:
Permissions Needed:
- None
Dandelion Version
- 6.1.0
test
Endpoint: /api/key/test
Method: GET
Parameters: None
Description: Tests that the apikey is valid. This is a useful endpoint for extensions. An easy way to check the success is to check the errorcode
field of the return object. A value of 0 means success, other values indicate failure.
Example Return Data:
Permissions Needed:
- None
revoke
Endpoint: /api/key/revoke
Method: POST
Parameters: [uid]
Parameter | Type | Default | Required |
---|---|---|---|
uid |
int | User ID | false |
Description: Revoke the API key for the user with uid
. The default value for uid
is the ID associated with the API key being used to make the request. Because of this, if uid
is not defined, the key being used will no longer be valid.
Example Return Data:
Permissions Needed:
- Edit user (not needed to revoke user’s own key)
generate
Endpoint: /api/key/generate
Method: POST
Parameters: None
Description: Generate a new key for user who is associated with the apikey being used.
Example Return Data:
Returned Values:
- data (string) - The regenerated API key (length: 40 char)
Permissions Needed:
- None