This is an old revision of the document!
RADIUSdesk API Permanent Users
Introduction
Adding A New Permanent User
API URL
Items included in the POST
{
"user_id":0,
"username":"demo2",
"password":"demopassword",
"realm_id":1,
"profile_id":1,
"token":"b4c6ac81-8c7c-4802-b50a-0a6380555b50"
}
Item | Typical Value | Comment |
user_id | 0 | The special value of 0 (Zero) will make the owner of the token the owner of the Permanent User. |
username | demo2 | Unique username. Can even be an email address. See discussion about the suffix later in this document. |
password | demopassword | Password for user. No restrictions is placed on the length. |
realm_id | 1 | The ID of the Realm the user should belong to. |
profile_id | 1 | The ID of the Profile the user should belong to. |
token | b4c6ac81-8c7c-4802-b50a-0a6380555b50 | The API token of the user who initiate the API call |
Finding the detail of the items
API Key
Each Access Provider (including the
root user) in RADIUSdesk has a unique security token associated with them referred to as the
API Key. This token changes each time the Access Provider password is changed.
An Access Provider can see their own
API Key.
An Access Provider can see any of the Access Providers under it by going to the Access Providers applet and edit a selected Access Provider. There will be a read-only field with the
API Key for the selected Access Provider.
Realm
The list of Realms are shown by calling this
URL (Be sure to replace the token with your
API Key)
-
If there are a large amount of Realms on the system you may have to add pager items to the
URL but this beyond the scope of this document.
Here is a sample reply
{
"items": [
{
"id": 1,
"name": "demo1"
}
],
"success": true
}
* We can either use **realm_id = 1** or **realm = demo1** when calling the API. The back-end is smart enough to convert the Realm name to to the Realm ID when adding the user.
Profile
The list of Profiles are shown by calling this
URL (Be sure to replace the token with your
API Key)
-
Here is a sample reply
{
"items": [
{
"id": 1,
"name": "demo1",
"data_cap_in_profile": false,
"time_cap_in_profile": false
}
],
"success": true
}
We can either use
profile_id = 1 or
profile = demo1 when calling the
API. The back-end is smart enough to convert the Profile name to to the Profile ID when adding the user.