Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

A group must belong to a domain and one domain only. A group can contain one or many (member, child) group, and a group can belong to one or many (memberof, parent) groups. In other words, the relationship between groups are many-many.

Anchor
_Toc341972397
_Toc341972397
Attributes

Attribute

type

values

default

mandate

comment

name

string

 

 

true

 

description

string

 

 

false

 

 

 

 

 

 

 

domain

object

 

 

true

the parent domain

parents

coll

 

 

false

the parent groups

members

coll

 

 

false

the member groups

users

coll

 

 

false

the member users

policies

coll

 

 

false

assigned policies

roles

coll

 

 

false

assigned roles

hasMembers

boolean

 

 

 

 

radiusProfile

object

 

 

 

 

radiusAttributes

coll

 

 

 

 

Anchor
_Toc341972398
_Toc341972398
/group/create

To create a new group, we must specify the name of the group and its parent: either a domain or a group. On success, the method always returns the internal group id of the newly created group.
Parameters:
{
"attrs":{list of attribute value pairs}
}
Response:
{
"error":0,
"result":{"id":the id of the newly created group}
}
Examples:
Method:/group/create
Parameters:
{
"attrs":
{
"name":"sales",
"description":"sales dept.",
"domain.id":2
}
}
Response: {"error":0, "result":{"id":1}}

Anchor
_Toc341972399
_Toc341972399
/group/search

Wiki Markup
+Examples:+
Search groups in the entire domain
Method:/group/search
Parameters: 
\{
 "match":
\[
 \[domain.id", "=", 1\]
\],
 "return":\["name", "id"\],
 "sort":"name",
 "order":"asc",
 "max": 20,
 "offset": 0
\}
Response: 
\{
 "error":0,
"result":
\[
 \{
  "name":"sales",
  "id":1,
\},
 \{
...
\}
\]
\}

Anchor
_Toc341972400
_Toc341972400
/group/get

Method:/group/get
Example:

  1. Get member/child groups of a specific group (hasMember)

Wiki Markup
Parameters: 
\{
 "match":
\[
\[id", "=", 1\]
\],
 "return":\[ \{"members": \[\{elements:\["name", "id"\]\}\]\}\],
\}
Response: 
\{
 "error":0,
"result":
\{ 
 "members":
 \{
elements:
\[
\{
  "name":"sales - london",
  "id":2
\},
 \{
...
\}
\]
\}
\}
\}

  1. Get parent groups of a specific group (memberOf)

Wiki Markup
Parameters: 
\{
 "match":
\[
 \[id", "=", 9\],
\],
 "return":\[\{"parents":\[\{elements:\["id","name"\]\}\]\}\]
\}
Response: 
\{
 "error":0,
"result":
 \{
 "parents":
 \{
 elements:
 \[
 \{
  "name":"sales",
  "id":1
\},
 \{
  "name":"sales - london",
  "id":2
\},
 \{
...
\}
  \]
\}
\}
\}

Anchor
_Toc341972401
_Toc341972401
/group/set

Method:/group/set
Parameters:
{
"id":1,
"attrs":{"description":"new description"}
}
Response:
{
"error":0
}

Anchor
_Toc341972402
_Toc341972402
/group/delete

Method:/group/delete
Parameters:
{
"id":1
}
Response:
{
"error":0
}

Anchor
_Toc341972403
_Toc341972403
/group/join

Parameters:
{
"child":{"id":1},
"parent":{"id":2},
"action":"join | unjoin"
}
Response:
{
"error":0
}

Anchor
_Toc341972404
_Toc341972404
/group/deployTokens

Method:/group/deployTokens
Parameters:
{
"attrs":
{
"group.id":group_id,
"product.id":product_id
}
}
Response:
{
"error":0
}
Other methods

  1. applyPolicy(apply/unapply)
  2. assignRole(assign/unassign)