...
Attribute | type | values | default | mandate | comment | ||||
name | string |
|
| true |
| ||||
attribute i |
|
| false | ||||||
status | string | INACTIVE, | ACTIVE |
|
| ||||
description | string |
|
| false |
| ||||
domain | object |
| true | the domain it belongs to | |||||
unit | object |
|
| false | The parent unit | ||||
groups | coll |
| false | Associated groups | |||||
roles | coll |
|
| false | Assigned roles | ||||
tokens | coll |
| false | Assigned tokens | |||||
tokenAssignments | coll |
|
|
|
| ||||
tempPasses | Coll<TempPass> |
|
| false | |||||
qnas | coll |
|
| false | |||||
siteStamps | coll |
| false |
| |||||
images | coll |
|
| false | |||||
certificates | Coll<UserCertificate> |
|
|
|
| ||||
lastLogin | date |
|
|
|
| ||||
radiusAttributes | coll |
|
|
|
| ||||
failCount | integer | 0 |
|
| |||||
mustChangePassword | Boolean | False |
|
| |||||
passwordNeverExpires | Boolean | False |
| ||||||
lastChangePassword | date |
|
|
|
|
| Anchor | ||||
|---|---|---|---|---|
|
Attribute | type | values | default | mandate | comment | |||
subjectDn | string |
|
|
| readOnly | |||
serialNumber | integer |
|
| readOnly | ||||
signature | string |
|
|
| readOnly | |||
issuerDn | string |
|
|
| readOnly | |||
startDate | date |
|
| readOnly | ||||
expiryDate | date |
|
| readOnly | ||||
certificatePem | string |
|
|
| readOnly |
| Anchor | ||||
|---|---|---|---|---|
|
To create a new user, we must specify the name of the user and its parent: either a domain or a userunit. On success, the method always returns the internal user id of the newly created user. Parameters:
| Code Block |
|---|
...
| ||||
{
"attrs":
{
"domain.id": "parent domain id",
"loginName": "the login name",
"password": "the password",
"email": "the email",
...
}
} |
| Code Block | ||||
|---|---|---|---|---|
| ||||
{
"error":0,
|
- Creating a user by specifying its parent domain.
Method:/user/create
Parameters:
{
"attrs":
{
"name":"John Smith",
"domain":2
}
}
Response: {"error":0, "result":{"id":1}}
- Creating a user specifying its parent unit.
...
"result":{"id": |
...
- Creating a user with temppass
...
"the id of the newly created user"} } |
| Anchor | ||||
|---|---|---|---|---|
|
| Anchor | ||||
|---|---|---|---|---|
|
Examples:
- Searchusers Search users in a domain
| Wiki Markup |
|---|
Method:/user/search
Parameters:
\{
"match":
\[
\[domain.id", "=", "1"\]
\],
"return":\["name", "id"\],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
\}
Response:
\{
"error":0,
"result":
\[
\{
"name":"John Smith",
"id":"1",
\},
\{
...
\}
\]
\}
\\ |
- Search users in a unit
| Wiki Markup |
|---|
Method:/user/search
Parameters:
\{
"match":
\[
\[unit.id", "=", "2"\]
\],
"return":\["name", "id"\],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
\}
Response:
\{
"error":0,
"result":
\[
\{
"name":"Joe Blog",
"id":"2",
\},
\{
...
\}
\]
\}
\\ |
- Search users in a group
| Wiki Markup |
|---|
Method:/user/search
Parameters:
\{
"match":
\[
\[group.id", "=", "2"\]
\],
"return":\["name", "id"\],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
\}
Response:
\{
"error":0,
"result":
\[
\{
"name":"Joe Blog",
"id":"2",
\},
\{
...
\}
\]
\}
\\ |
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
Method:/user/get
Parameters:
\{
"match":
\[
\["id", "=", 2\],
\],
"return":\["name", "id"\],
\}
Response:
\{
"error":0,
"result":
\{
"name":"Joe Blog",
"id":"2",
\}
\} |
| Anchor | ||||
|---|---|---|---|---|
|
...
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
Method: /user/joinGroup
Parameters:
\{
"user":\{"id":1\},
"groups:
\[
\{"id":5\},
\{"id":6\},
\{"id":7\}
\],
"action":"join | unjoin"
\}
Response:
\{
"error":0
\}
\\
\\
+Role+ |
- assignRole(assign/unassign)
...
Method: /user/assignToken
Assign an existing token
Parameters:
{
"user":{
"id":1,
"domain.id":domainId,
"loginName":loginName
},
"token:{
"id":5,
"product.manufactureCode":mc,
"product.productCode":pc,
"serial":xxx,
},
"credential":{ // optional
"otp":xxxx
},
"autoAssign":true|false,
"action":"assign | unassign",
"isOwner":true | false,
"starts":xxx,
"expires":xxx,
"usageLimit":50,
"status":"active | inactive | disabled",
"pin":"the token pin"
}
Response:
{
"error":0,
"id":tokenAssignmentId
}
| Anchor | ||||
|---|---|---|---|---|
|
...
Examples:
Method:/user/getMessageTemplate
Parameters:
{
"user":
{
"domain.name":"xxx"
"loginName":"abc"
},
"templateItemName":"SMTP_OTP"
}
Response:
{
"error":0,
"result":"template in json string"
}
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
\\
+Examples:+
Method:/user/ listProvisioningUrls
\\
Parameters:
\{
"user":
\{
"domain.name":"xxx"
"loginName":"abc"
\}
\}
Response:
\{
"error":0,
"result":
\{
"total":2,
"rows":
\[
"[http://provioning.deepnetsecurity.local:8072|http://provioning.deepnetsecurity.local:8072]",
"http://provioning2.deepnetsecurity.local:8073"
\]
\}
\}
\\ |
| Anchor | ||||
|---|---|---|---|---|
|
This method is a task running in the background
Examples:
Method:/user/import
Parameters:
{
"attrs":
{
"format":"csv or xml",
"data":"...",
"charset":"UTF-8"// optional
}
}
Response:
{
"error":0
}
| Anchor | ||||
|---|---|---|---|---|
|
Method:/user/issueCertificate
Parameters:
{
"user":
{
"loginName":"xxx",
"domain.Name":"somedomain"
},
"csr":"csr data"
"return":
{
"id", "subjectDn"
}
}
Response:
{
"error":0
}
| Anchor | ||||
|---|---|---|---|---|
|
Method:/user/importCertificate
Parameters:
{
"user":
{
"loginName":"xxx",
"domain.Name":"somedomain"
},
"certificate":
{
"data":"..." //PEM format
},
"return":
{
"id", "subjectDn"
}
}
Response:
{
"error":0
}
| Anchor | ||||
|---|---|---|---|---|
|
Method:/user/deleteCertificate
Parameters:
{
"user":
{
"loginName":"xxx",
"domain.Name":"somedomain"
},
"certificate":
{
"id":"cert id"
}
}
Response:
{
"error":0
}
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
+Examples:+
Method:/user/getPolicy
Parameters:
\{
"user":
\{
"loginName":"login name",
"domain.id":domainid
\},
"category":
\{
"name":"logon"
\},
"return":\["name", "id","options"\]
\}
Response:
\{
"error":0,
"result":
\{
"id":"1",
"name":"System logon policy",
"options":
\{
"key":"value",
...
\}
\}
\}
\\
\\
\\ |