Lock Users
1 min
POST
{{url}}/aioc-rest-web/rest/user/lockUsers/reasonToLockThem
Path Parameters
- urlstringDefaulturl
Header Parameters
- Content-TypestringDefaultapplication/json
- X-XSRF-TOKENstringDefault{{csrftoken}}
Body Parameters
- bodyobjectDefault["40f354c6-b510-437e-9ee6-4f9b9724e654"]
Responses
200
curl
curl --request POST \
--url {{url}}/aioc-rest-web/rest/user/lockUsers/reasonToLockThem \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-xsrf-token: {{csrftoken}}' \
--data '"[\"40f354c6-b510-437e-9ee6-4f9b9724e654\"]"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-xsrf-token", "{{csrftoken}}");
var raw = JSON.stringify("[\"40f354c6-b510-437e-9ee6-4f9b9724e654\"]");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/user/lockUsers/reasonToLockThem", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("{{url}}/aioc-rest-web/rest/user/lockUsers/reasonToLockThem")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-xsrf-token"] = "{{csrftoken}}"
request.body = JSON.dump("[\"40f354c6-b510-437e-9ee6-4f9b9724e654\"]")
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/aioc-rest-web/rest/user/lockUsers/reasonToLockThem"
payload = json.dumps("[\"40f354c6-b510-437e-9ee6-4f9b9724e654\"]")
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-xsrf-token': '{{csrftoken}}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
[
{
"id": "cdc00366-56b6-4874-bd8b-7862549510ab",
"eid": "testuser",
"personelId": "123123",
"name": "testtest",
"passwordAlgorithm": "MD5",
"password": "21232f297a57a5a743894a0e4a801fc3",
"email": "[email protected]",
"surname": "user",
"internal": true,
"properties": {
"phoneNumber": "5550000000",
"ubaThreshold": "50",
"lockReason": "Locked by admin",
"forcePasswordChangeOnNextLogin": "true",
"isLocked": "true"
},
"groups": [
"DEFAULT_GROUP_SYSYEM_ADMINS",
"DEFAULT_GROUP_SYSYEM_USERS"
],
"managerGroups": [],
"lastLogin": null,
"lastLoginIp": null,
"recordLimit4Search": null,
"passwordDirty": false,
"passwordAutoGenerated": false,
"phoneNumber": "5550000000",
"forceChangePasswordOnNextLogin": true,
"lockReason": "Locked by admin",
"unlockOnPasswordChanged": false,
"unlockTime": null,
"tempUserEndTime": null,
"tempUserStartTime": null,
"tempUser": false,
"externalDirectorySource": null,
"userPropertyKey4Search": null,
"userPropertyValue4Search": null,
"locked": true
}
]