RADIUS
Configuration
curl
curl -X GET "https://appliance.example.com/api/v1/radius/config" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/radius/config';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.get("https://appliance.example.com/api/v1/radius/config", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/radius/config', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Get the RADIUS settings
type: http
seq: 1
}
get {
url: https://{{node-0}}:{{port}}/api/v1/radius/config
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "RADIUS configuration",
"data": [
{
"sharedSecret": "********",
"port": 1812,
"authProtocol": "PAP",
"hosts": "<hosts>"
}
]
}
curl
curl -X PUT "https://appliance.example.com/api/v1/radius/config" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"hosts": [
"<hosts>"
],
"port": 0,
"sharedSecret": "<sharedSecret>",
"authProtocol": "PAP",
"timeout": "<timeout>",
"retries": 0,
"nasIdentifier": "<nasIdentifier>",
"groupAttribute": "<groupAttribute>",
"emailAttribute": "<emailAttribute>",
"firstNameAttribute": "<firstNameAttribute>",
"lastNameAttribute": "<lastNameAttribute>",
"fallbackGroupId": "<fallbackGroupId>",
"mappings": [
{
"attributeValue": "<attributeValue>",
"groupIds": [
"<groupIds>"
]
}
]
}'
PHP
<?php
$url = 'https://appliance.example.com/api/v1/radius/config';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
];
$payload = [
'enabled' => true,
'hosts' => [
'<hosts>',
],
'port' => 0,
'sharedSecret' => '<sharedSecret>',
'authProtocol' => 'PAP',
'timeout' => '<timeout>',
'retries' => 0,
'nasIdentifier' => '<nasIdentifier>',
'groupAttribute' => '<groupAttribute>',
'emailAttribute' => '<emailAttribute>',
'firstNameAttribute' => '<firstNameAttribute>',
'lastNameAttribute' => '<lastNameAttribute>',
'fallbackGroupId' => '<fallbackGroupId>',
'mappings' => [
[
'attributeValue' => '<attributeValue>',
'groupIds' => [
'<groupIds>',
],
],
],
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
payload = {
"enabled": true,
"hosts": [
"<hosts>"
],
"port": 0,
"sharedSecret": "<sharedSecret>",
"authProtocol": "PAP",
"timeout": "<timeout>",
"retries": 0,
"nasIdentifier": "<nasIdentifier>",
"groupAttribute": "<groupAttribute>",
"emailAttribute": "<emailAttribute>",
"firstNameAttribute": "<firstNameAttribute>",
"lastNameAttribute": "<lastNameAttribute>",
"fallbackGroupId": "<fallbackGroupId>",
"mappings": [
{
"attributeValue": "<attributeValue>",
"groupIds": [
"<groupIds>"
]
}
]
}
response = requests.put("https://appliance.example.com/api/v1/radius/config", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/radius/config', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"enabled": true,
"hosts": [
"<hosts>"
],
"port": 0,
"sharedSecret": "<sharedSecret>",
"authProtocol": "PAP",
"timeout": "<timeout>",
"retries": 0,
"nasIdentifier": "<nasIdentifier>",
"groupAttribute": "<groupAttribute>",
"emailAttribute": "<emailAttribute>",
"firstNameAttribute": "<firstNameAttribute>",
"lastNameAttribute": "<lastNameAttribute>",
"fallbackGroupId": "<fallbackGroupId>",
"mappings": [
{
"attributeValue": "<attributeValue>",
"groupIds": [
"<groupIds>"
]
}
]
}),
});
const data = await response.json();
Bruno
meta {
name: Update the RADIUS settings
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/radius/config
body: json
auth: bearer
}
headers {
Content-Type: application/json
}
auth:bearer {
token: {{token}}
}
body:json {
{
"enabled": true,
"hosts": [
"<hosts>"
],
"port": 0,
"sharedSecret": "<sharedSecret>",
"authProtocol": "PAP",
"timeout": "<timeout>",
"retries": 0,
"nasIdentifier": "<nasIdentifier>",
"groupAttribute": "<groupAttribute>",
"emailAttribute": "<emailAttribute>",
"firstNameAttribute": "<firstNameAttribute>",
"lastNameAttribute": "<lastNameAttribute>",
"fallbackGroupId": "<fallbackGroupId>",
"mappings": [
{
"attributeValue": "<attributeValue>",
"groupIds": [
"<groupIds>"
]
}
]
}
}
Response
{
"status": "success",
"message": "RADIUS configuration updated",
"data": []
}
curl
curl -X DELETE "https://appliance.example.com/api/v1/radius/config" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/radius/config';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.delete("https://appliance.example.com/api/v1/radius/config", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/radius/config', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Clear the RADIUS settings
type: http
seq: 1
}
delete {
url: https://{{node-0}}:{{port}}/api/v1/radius/config
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "RADIUS configuration cleared",
"data": []
}
Test the RADIUS connection
curl
curl -X POST "https://appliance.example.com/api/v1/radius/config/test" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/radius/config/test';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.post("https://appliance.example.com/api/v1/radius/config/test", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/radius/config/test', {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Test the RADIUS connection
type: http
seq: 1
}
post {
url: https://{{node-0}}:{{port}}/api/v1/radius/config/test
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Connection test complete",
"data": [
{
"stage": "authentication",
"ok": true,
"message": "radius1.example.com: accepted the credentials."
},
{
"stage": "authentication",
"ok": false,
"message": "radius2.example.com: no response within the configured timeout"
},
{
"stage": "attributes",
"ok": true,
"message": "Filter-Id = netadmins"
},
{
"stage": "mapping",
"ok": true,
"message": "netadmins mapped to Groups: 5e1de37819dd5"
}
]
}
List the RADIUS users
curl
curl -X GET "https://appliance.example.com/api/v1/radius/users" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/radius/users';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.get("https://appliance.example.com/api/v1/radius/users", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/radius/users', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: List the RADIUS users
type: http
seq: 1
}
get {
url: https://{{node-0}}:{{port}}/api/v1/radius/users
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "All RADIUS users",
"data": []
}
Users by ID
curl
curl -X GET "https://appliance.example.com/api/v1/radius/users/{id}" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/radius/users/{id}';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.get("https://appliance.example.com/api/v1/radius/users/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/radius/users/{id}', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Get a RADIUS user
type: http
seq: 1
}
get {
url: https://{{node-0}}:{{port}}/api/v1/radius/users/{id}
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Get RADIUS user",
"data": []
}
curl
curl -X PUT "https://appliance.example.com/api/v1/radius/users/{id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"disabled": true
}'
PHP
<?php
$url = 'https://appliance.example.com/api/v1/radius/users/{id}';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
];
$payload = [
'disabled' => true,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
payload = {
"disabled": true
}
response = requests.put("https://appliance.example.com/api/v1/radius/users/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/radius/users/{id}', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"disabled": true
}),
});
const data = await response.json();
Bruno
meta {
name: Enable or disable a RADIUS user
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/radius/users/{id}
body: json
auth: bearer
}
headers {
Content-Type: application/json
}
auth:bearer {
token: {{token}}
}
body:json {
{
"disabled": true
}
}
Response
{
"status": "success",
"message": "RADIUS user updated",
"data": []
}
curl
curl -X DELETE "https://appliance.example.com/api/v1/radius/users/{id}" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/radius/users/{id}';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.delete("https://appliance.example.com/api/v1/radius/users/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/radius/users/{id}', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Delete a RADIUS user
type: http
seq: 1
}
delete {
url: https://{{node-0}}:{{port}}/api/v1/radius/users/{id}
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "RADIUS user deleted",
"data": []
}