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

Policies are divided into categories. A policy also has an administrative scope, i.e. domains.

Anchor
_Toc341972432
_Toc341972432
Attributes

Attribute

type

values

default

mandate

comment

name

string



true


description

string



false


category

object



true


default

boolean

true/false

false

false








options

coll



true

Policy options

holder

object




Policy holder
(Domain/Unit/Group,etc)

domain

object




These attributes are mapped to holder object, you can also use them directly

unit

object





group

Object





application

Object





product

Object





user

object





isTemplate

boolean


false



isTopLevel

boolean


false



isProduct

boolean


false




Option is a dynamic object with the following attributes

  • name
  • value

Option does not have any method.

Anchor
_Toc341972433
_Toc341972433
/policy/create

To create a new policy, we must specify the name of the policy, its category and the administrative domain. On success, the method always returns the internal policy id of the newly created policy.
Parameters:
{
"attrs":{list of attribute value pairs}
}
Response:
{
"error":0,
"result":{"id":the id of the newly created policy}
}
Examples:
Method:/policy/create
Parameters:
{
"attrs":
{
"name":"default password policy",
"holder.id":3,
"category":"staticpass",
"options":
{
"minlen":6,
"lefetime":0,
"history":10,
"characters":"N",
"characters":"S"
}
}
}
Response: {"error":0, "result":{"id":1}}

Anchor
_Toc341972434
_Toc341972434
/policy/search


Wiki Markup
+Examples:+
Method:/policy/search
Parameters: 
\{
 "match":
\[
 \["includeInherited", "=", false\],
\["category.name", "=", "staticpass"\]
\],
 "return":\["name", "id", "holder.id"\],
 "sort":"id",
 "order":"asc",
 "max": 20,
 "offset": 10
\}
Response: 
\{
 "error":0,
"result":
\[
 \{
  "id":"1",
  "name":"default password policy",
"holder.id":3
\},
 \{
...
\}
\]
\}


Anchor
_Toc341972435
_Toc341972435
/policy/get


Wiki Markup
Method:/policy/get
Parameters: 
\{
 "match":
\[
 \["id", "=", 2\],
\],
 "return":\["category","name", "id", "domains.id", "options"\],
\}
Response: 
\{
 "error":0,
"result":
\{
 "id":"1",
 "name":"default password policy",
"domains.id":\[2,3\],
 "category":"staticpass",
"options":
\[
"minlen":6,
"lefetime":0,
"history":10,
"characters":"N",
"characters":"S"
\]
\}
\}


Anchor
_Toc341972436
_Toc341972436
/policy/set

Method:/policy/set
Parameters:
{
"id":1,
"attrs":{list of attributes}
}
Response:
{
"error":0
}

Anchor
_Toc341972437
_Toc341972437
/policy/delete

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