API v2: Access Request¶
Data Structures¶
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | string | Unique and read-only object Identifier | |
| activated | boolean | Read-only | |
| immediate_interval | number {1-24} | if type == immediate |
The amount of time the user will have access to the account, expressed in hours and counted from the moment the session is initiated. |
| starts_at | string | if type == scheduled |
The time from which the access period starts. |
| expires_at | string | if type == scheduled |
The time at which the access expires. |
| reason | string | yes | |
| revoke_reason | string | yes | |
| required_votes | number | Read-only. Number of votes required to acquire access to the account. | |
| status | string {expired, granted, pending, rejected, revoked} | Read-only; expensive to use. | |
| type | string {immediate, scheduled} | yes | |
| account_id | string | Read-only; expensive to use. | |
| account_name | string | Read-only; expensive to use. | |
| safe_id | string | Read-only; expensive to use. | |
| safe_name | string | Read-only; expensive to use. | |
| pool_id | string | Read-only; expensive to use. | |
| pool_name | string | Read-only; expensive to use. | |
| protocol | string | Read-only; expensive to use. | |
| server_id | string | Read-only; expensive to use. | |
| server_name | string | Read-only; expensive to use. | |
| listeners | object-array | Read-only; expensive to use. JSON object array containing id, mode, name, hidden status, builtin status, and protocol of assigned listeners. | |
| listener_ids | string-array | Read-only; expensive to use. | |
| listener_names | string-array | Read-only; expensive to use. | |
| user_id | string | yes | Immutable; read-only; expensive to use. |
| user_domain | string | Read-only; expensive to use. | |
| user_name | string | Read-only; expensive to use. | |
| votes | object-array | Read-only; expensive to use. JSON object array containing reason, user_id, acceptance status, user_name, user_role, and user_domain of the voting user. | |
| webclient | boolean | Read-only; expensive to use. Indicates if access is available via the web client. | |
| created_at | string | Read-only. Timestamp of creation. | |
| modified_at | string | Read-only. Timestamp of modification. | |
| removed | boolean | Read-only. |
Request for Retrieving Available Attributes of the AccessRequestModel
| Method | GET
|
| Path | /api/v2/objspec/access_request
|
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | string | Unique and read-only object Identifier | |
| access_request_id | string | yes | Immutable. Uniqueness is required in the combination of attribute access_request_id with attribute user_id. |
| accepted | boolean | yes | |
| reason | string | if accepted == false |
|
| user_id | string | yes | Immutable; protected; read-only; expensive to use. Uniqueness is required in the combination of attribute user_id with attribute access_request_id. |
| created_at | string | Read-only. Timestamp of creation. | |
| modified_at | string | Read-only. Timestamp of modification. | |
| removed | boolean | Read-only. |
Request for Retrieving Available Attributes of the AccessRequestVoteModel
| Method | GET
|
| Path | /api/v2/objspec/access_request_vote
|
| Attribute | Type | Required | Description |
|---|---|---|---|
| access_request_id | string | ||
| revoke_reason | string |
Request for Retrieving Available Attributes of the AccessRequestRevokeModel
| Method | GET
|
| Path | /api/v2/objspec/access_request_revoke
|
Note
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
The next chapter describes procedures for creating separate requests.
Retrieving Access Requests List¶
Request
| Method | GET
|
| Path | /api/v2/access_request
|
Example Request
Sending GET https://10.0.0.0/api/v2/access_request
curl -s -k -X GET -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' 'https://10.0.214.98/api/v2/access_request'
Revoking Access Requests¶
Request
| Method | POST
|
| Path | /api/v2/access_request/<access_request_id>/revoke
|
| Headers | Content-Type: Application/JSON
|
| Body | AccessRequestRevokeModel
|
Example Request
Sending POST https://10.0.0.0/api/v2/access_request/5620492334958379009/revoke
curl -s -k -X POST -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' https://10.0.214.98/api/v2/access_request/5620492334958379010/revoke -H 'Content-Type: application/json' -d'{"revoke_reason":"AD maintenance."}'
Response
{
"result": "success"
}
Responding to a Pending Access Request¶
Request
| Method | POST
|
| Path | /api/v2/access_request/<access_request_id>/vote
|
| Headers | Content-Type: Application/JSON
|
| Body | AccessRequestVoteModel
|
Example Request
Sending POST https://10.0.0.0/api/v2/access_request/5620492334958379009/vote
curl -s -k -X POST -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' https://10.0.215.14/api/v2/access_request/5620492334958379011/vote -H 'Content-Type: application/json' -d'{"accepted":true}'
Response
{
"result": "success"
}