...
| Anchor | ||||
|---|---|---|---|---|
|
Attribute |
type |
values |
default |
mandate |
comment |
name |
string |
true |
description |
string |
false |
domain |
object |
true |
the domain that the unit belongs to |
parent |
object |
true |
the parent unit |
hasChildren |
boolean |
children |
coll |
repository |
object
radiusProfile
object
policies
coll
Assigned policies
radiusProfile
object
radiusAttributes
coll
object | |||||||||||
radiusProfile | object | ||||||||||
policies | coll | Assigned policies | |||||||||
radiusProfile | object | ||||||||||
radiusAttributes | coll |
| Anchor | ||||
|---|---|---|---|---|
|
...
- Search units in the entire domain
| Wiki Markup |
|---|
Method:/unit/search
Parameters:
\{
"match":
\[
\[domain.id", "=", 1\],
\[name", "like", "sales%"\]
\],
"return":\["name", "id", "domain.id", "parent.id"\],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
\}
Response:
\{
"error":0,
"result":
\[
\{
"name":"sales",
"id":"1",
"domain.id":1,
"parent.id":null
\},
\{
"name":"sales - london",
"id":"2",
"domain.id":1,
"parent.id":1
\},
\{
...
\}
\]
\} |
- Search top-level units
| Wiki Markup |
|---|
Method:/unit/search
Parameters:
\{
"match":
\[
\[domain.id", "=", 1\]
\[parent.id", "=", null\]
\],
"return":\["name", "id"\],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
\}
Response:
\{
"error":0,
"result":
\[
\{
"name":"sales",
"id":1,
\},
\{
...
\}
\]
\}
\\ |
- Searchchild units of a specific unit
| Wiki Markup |
|---|
Method:/unit/search
Parameters:
\{
"match":
\[
\[domain.id", "=", 1\],
\[parent.id", "=", 2\]
\],
"return":\["name", "id"\],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
\}
Response:
\{
"error":0,
"result":
\[
\{
"name":"sales - london",
"id":2,
\},
\{
...
\}
\]
\}
\\ |
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
Method:/unit/get
Parameters:
\{
"match":
\[
\["id", "=", 2\],
\],
"return":\["name", "id", "domain.id","parent.id"\],
\}
Response:
\{
"error":0,
"result":
\{
"name":"sales - london",
"id":"2",
"domain.id":1,
"parent.id":1
\}
\} |
| Anchor | ||||
|---|---|---|---|---|
|
...
Method:/unit/delete
Parameters:
{
"id":1
}
Response:
{
"error":0
}
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
Method:/unit/addUsers
Parameters:
\{
"id":unit_id,
"users":
\[
\{id:uid1\},
\{id:uid2\}
\]
\}
Response:
\{
"error":0
\}
\\ |
| Anchor | ||||
|---|---|---|---|---|
|
...