...
Search users in a domain
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"match":
[
[domain.id", "=", "domain id 1"],
],
"return":["id", "loginName", "email"],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
} |
| Code Block |
|---|
|
{
"error":0,
"result":
{
"total": 20,
"rows":
[
{
"id":"user id 1",
"loginName":"John Smith",
"email": "john.smith@acme.com"
} },
{
"id":"user id 2",
"loginName":"Alice Smith",
"email": "alice.smith@acme.com"
},
...
]
}
} |
Search users in a unit
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"match":
[
[unit.id", "=", "unit id 1"],
],
"return":["id", "loginName", "email"],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
} |
| Code Block |
|---|
|
{
"error":0,
"result":
[{
{
"total": 20,
" "rows":
[
{
"id":"user id 1",
"loginName":"John Smith",
"email": "john.smith@acme.com"
},
{
"id":"user id 3",
"loginName":"Bob Smith",
"email": "bob.smith@acme.com"
},
...
]
}
} |
Search users in a group
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"match":
[
[group.id", "=", "group id 1"],
],
"return":["id", "loginName", "email"],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
} |
| Code Block |
|---|
|
{
"error":0,
"result":
[{
{
"total": 20,
"idrows":"user id 1",
"loginName":"John Smith",[
"email": "john.smith@acme.com"{
},
{
"id":"user id 31",
"loginName":"BobJohn Smith",
"email": "bobjohn.smith@acme.com"
},
...
]
} |
...
...
...
"id":"user id 2",
"loginName":"Alice Smith",
"email": "alice.smith@acme.com"
},
...
]
}
} |
| Anchor |
|---|
| _Toc341972410 |
|---|
| _Toc341972410 |
|---|
|
/user/getMethod: /user/get
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"match":
[
[domain.id", "=", "domain id 1"],
],
"return":["id", "loginName", "email"],
"sort":"name",
"order":"asc",
"max": 20,
"offset": 0
} |
| Code Block |
|---|
|
{
"error":0,
"result":
[
{
"id":"user id 1",
"loginName":"John Smith",
"email": "john.smith@acme.com"
},
{
"id":"user id 2",
"loginName":"Alice Smith",
"email": "alice.smith@acme.com"
},
...
]
} |
| Anchor |
|---|
| _Toc341972411 |
|---|
| _Toc341972411 |
|---|
|
/user/setMethod:/user/set
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"id":"user id 1",
"attrs": {"email": |
...
...
...
...
...
| Anchor |
|---|
| _Toc341972412 |
|---|
| _Toc341972412 |
|---|
|
/user/delete
Method:/user/delete/delete
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
...
...
...
...
...
Other methods:
Unit
- moveUnit
...
| Anchor |
|---|
| _Toc341972413 |
|---|
| _Toc341972413 |
|---|
|
/user/joinGroup
...
Method:
...
/user/joinGroup
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
Parameters:
\{
"user":\{"id":1\},
"groups":
\ [
\ {"id":5\"id1"},
\ {"id":6\},
\{"id":7\}
\"id2"}
],
"action":"join | unjoin"
\}
Response:
\{
} |
| Code Block |
|---|
|
{
"error":0
\}
\\
\\
+Role+ |
- assignRole(assign/unassign)
...
| Anchor |
|---|
| _Toc341972414 |
|---|
| _Toc341972414 |
|---|
|
/user/assignToken
Method: /user/assignToken
Assign an existing token
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
...
...
...
...
...
...
...
",
"product.manufactureCode":mc, |
...
"product.productCode":pc, |
...
...
...
...
...
...
"xxxx"
},
"autoAssign":true|false, |
...
"action":"assign | unassign", |
...
...
...
...
...
"status":"active | inactive | disabled", |
...
...
...
...
...
| Anchor |
|---|
| _Toc341972415 |
|---|
| _Toc341972415 |
|---|
|
/user/resetPassword
Method: /user/assignToken
Assign an existing token
Parameters:
{
resetPassword
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"user":{"id":"user id 1"}, |
...
...
{
"password":"new password", |
...
"userMustChangePassword":true|false |
...
...
| Anchor |
|---|
| _Toc341972416 |
|---|
| _Toc341972416 |
|---|
|
/user/getMessageTemplate
Examples:
Method:/user/getMessageTemplate
Parameters:
{
"user":
{
"domain.name":"xxx"
"loginName":"abc"
},
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"user":{"id":"user id 1"},
"templateItemName":"SMTP_OTP" |
...
...
...
...
"result":"template in json string" |
...
| Anchor |
|---|
| _Toc341972417 |
|---|
| _Toc341972417 |
|---|
|
/user/ listProvisioningUrls...
...
/user/ listProvisioningUrls
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
listProvisioningUrls
\\
Parameters:
\{
"user":
\{
"domain.nameid":"xxx"
"loginName":"abc"
\}
\}
Response:
\{
user id 1"}
} |
| Code Block |
|---|
|
{
"error":0,
"result":
\ {
"total": 2,
"rows":
\[
"[ "rows":
[
"http://provioning.deepnetsecurity.local:8072|http://provioning.deepnetsecurity.local:8072]",
"http://provioning2.deepnetsecurity.local:8073"
\ ]
\ }
\}
\\ |
| Anchor |
|---|
| _Toc341972418 |
|---|
| _Toc341972418 |
|---|
|
/user/import
This method is a task running in the background
Examples:
Method:/user/import/import
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
...
...
...
...
...
...
| Anchor |
|---|
| _Toc341972419 |
|---|
| _Toc341972419 |
|---|
|
/user/issueCertificate
Method:/user/issueCertificate
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
|
{
"user":{"id":"user id 1"},
"csr":"csr data",
"return":
[
"id", "subjectDn"
]
} |
| Code Block |
|---|
|
{
"error":0,
"result":
{
"id": "cert id",
"subjectDn": "the subject dn"
}
} |
| Anchor |
|---|
| _Toc341972420 |
|---|
| _Toc341972420 |
|---|
|
/user/importCertificate
Method:/user/importCertificate
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
|
{
"user":{"id":"user id 1"},
"certificate":
{
"data":"data in PEM format"
},
"return":
[
"id", "subjectDn"
]
} |
| Code Block |
|---|
|
{
"error":0,
"result":
{
"id": "cert id",
"subjectDn": "the subject dn"
}
} |
| Anchor |
|---|
| _Toc341972421 |
|---|
| _Toc341972421 |
|---|
|
/user/deleteCertificate
Method:/user/deleteCertificate
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
...
...
...
...
...
user id 1"},
"certificate": |
...
...
...
| Anchor |
|---|
| _Toc341972422 |
|---|
| _Toc341972422 |
|---|
|
/user/getPolicy
...
Method: /user/getPolicy
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
Parameters:
\{
"user":
\{
"loginNameid":"login name",
"domain.id":domainid
\user id 1"},
"category":
\ {
"name":"logon"
\ },
"return":\["name", "id","options"\]
\}
} |
| Code Block |
|---|
|
{
Response:
\{
"error":0,
"result":
\{
{
"id": "1policy id",
"name": "Systempolicy logon policyname",
"options":
\{
"key":"valueoptions",
...
\}
\
}
\}
\\
\\
\\ |