Go to documentation repository
| Section | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The granted and denied requests allow/deny user access. The check request returns the status of user access. The requests work if you create and configure the Virtual access point is created and configured for the object based on the Web server 2.0 object.
General request format:
POST http://IP address:port/web2/secure/persons/granted?
{
"is_out
...
": "is_out
...
",
"acr_id
...
": "acr_id
...
",
"card": "card"
}
Request parameters:
| Parameter | Required | Description |
|---|---|---|
| acr_id | Yes | ID of a virtual access point |
| card | Yes | Number of |
| the user card | ||
| is_out | No | 0—access in 1—access out By default (if the parameter isn't specified), is_out=0 |
As a result of a request, in the system from a virtual access point, an generates the ACR ACCESS_IN or IN or ACCESS_OUT event is generated from the virtual access point that contains the name, surname, PERSON.id, and region_id parameters. If you specify acr_id is specified incorrectly, the error "Region id not found" error returns.
Request example:
POST http://127.0.0.1:8085/web2/secure/persons/granted?
{
"is_out
...
": "0",
"acr_id
...
": "1",
"card": "333"
}
Result:
The following events are generated in the system:
| Code Block |
|---|
Event : WEB2|1|REQUEST_PERSON_GRANTED|slave_id<User333>,fraction<83>,owner<User333>,date<09-09-21>,guid_pk<{683808B9-4B11-EC11-91AD-1C1B0DE673A6}>,is_out<0>,core_global<1>,acr_id<1>,login<1>,card<333>,request_uuid<d3c5f251-24e7-4ac3-9525-30bc84c400c3>,time<11:55:55>
React : ACR_WEB2|1|ACCESS_IN|surname<123123>,region_id<1.1>,name<>,PERSON.id<2>
React : WEB2|1|RESPONSE_ACCESS|request_uuid<d3c5f251-24e7-4ac3-9525-30bc84c400c3> |
General request format:
POST http://IP address:port/web2/secure/persons/denied?
{
"is_out
...
": "is_out
...
",
"acr_id
...
": "acr_id
...
",
"card": "card",
"comment": "comment"
}
Request parameters:
| Parameter | Required | Description |
|---|---|---|
| acr_id | Yes | ID of a virtual access point |
| card | Yes | Number of |
| the user card | ||
| is_out | No | 0—access in 1—access out By default (if the parameter isn't specified), is_out=0 |
| comment | No | Comment |
As a result of a request, in the system from a virtual access point, an generates the ACR ACCESS_DENIED event is generated from the virtual access point that contains the name, surname, PERSON.id, and region_id, and comment parameters. If you specify acr_id is specified incorrectly, the error "Region id not found" error returns.
Request example:
POST POST http://127.0.0.1:8085/web2/secure/persons/denied?
{
"is_out
...
": "1",
"acr_id
...
": "1",
"card": "7777",
"comment": "comment"
}
Result
...
:
The following events are generated in the system:
| Code Block |
|---|
Event : WEB2|1|REQUEST_PERSON_DENIED|slave_id<User7777>,fraction<422>,owner<User7777>,date<09-09-21>,comment<comment>,guid_pk<{AFE3C407-4E11-EC11-91AD-1C1B0DE673A6}>,is_out<1>,core_global<1>,acr_id<1>,login<1>,card<7777>,request_uuid<1cffc4c2-7ed5-4501-ba67-386e361e7b27>,time<12:12:19>
React : ACR_WEB2|1|ACCESS_DENIED|surname<123123>,region_id<1.1>,name<>,PERSON.id<2>,comment<comment>
React : WEB2|1|RESPONSE_ACCESS|request_uuid<1cffc4c2-7ed5-4501-ba67-386e361e7b27> |
General request format:
POST http://IP address:port/web2/secure/persons/check?
{
"acr_id
...
": "acr_id
...
",
"card": "card"
}
Request parameters:
| Parameter | Required | Description |
|---|---|---|
| acr_id | Yes | ID of a virtual access point |
| card | Yes | Number of |
| the user card |
Request returns a response in the JSON format that contains the results of a the user's check.
Response parameters:
| Parameter | Description |
|---|---|
| description | No Access Level—user cannot access Access OK—user can access No such person—no such user Internal Error—internal error No access tz—no access to time zone No access date range—date range with granted access isn’t specified Is locked—user is locked Id not found—the card parameter is empty or missing |
| status | OK—access is granted Error—access error |
Request example:
POST POST http://127.0.0.1:8085/web2/secure/persons/check?
{
"acr_id
...
": "1",
"card": "7777"
}
Results
...
:
| Code Block |
|---|
{ "description": "Access OK", "status": "OK"} // user can access
{ "description": "No Access Level", "status": "Error"} // user cannot access
{ "description": "No such person", "status": "Error"} // no such user |