Table of Contents

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

Realm

{
    "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

{
    "items": [
        {
            "id": 1,
            "name": "demo1",
            "data_cap_in_profile": false,
            "time_cap_in_profile": false
        }
    ],
    "success": true
}

Alternative items to include in the POST

{
    "user_id":0,
    "username":"demo2",
    "password":"demopassword",
    "realm":"demo1",
    "profile":"demo1",
    "token":"b4c6ac81-8c7c-4802-b50a-0a6380555b50"
}

Reply from the server to the POST

{
  "success": true,
  "data": {
    "user_id": 44,
    "username": "demo2@demo1",
    "password": "demopassword",
    "realm": "demo1",
    "profile": "demo1",
    "token": "",
    "language_id": "_",
    "country_id": "4",
    "realm_id": 1,
    "profile_id": 1,
    "active": 1
  }
}

Adding a suffix to the username

Items allowed in the API

Personal Info

Item Typical Value Comment
name John varchar(50)
surname Smith varchar(50)
phone +27-724952041 varchar(50)
language 4_4 This is the only option available for now
email john@radiusdesk.com varchar(100)
address 25Main Road Henley On Klip varchar(255)

Activate & Expire

Item Typical Value Comment
from_date 10/02/2021 Month/Day/Year for 2 October 2021 use with to_date
to_date 10/02/2022 Month/Day/Year for 2 October 2021 use with from_date

Optional Items

Item Typical Value Comment
static_ip 192.168.31.2 This value will be send inside the RADIUS Access Accept in the form of Framed-IP-Address = 192.168.31.2 and Service-Type = Framed-User
extra_name POPI-Act varchar(100) available for your own use /convention
extra_value Yes varchar(100) available for your own use /convention