API v2: Access Request


Data Structures

AccessRequestModel

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, preview}

yes

account_id

string

Read-only; expensive to use. Requires read right on object type account for GET requests.

account_name

string

Read-only; expensive to use.

safe_id

string

Read-only; expensive to use. Requires read right on object type safe for GET requests.

safe_name

string

Read-only; expensive to use.

pool_id

string

Read-only; expensive to use. Requires read right on object type pool for GET requests.

pool_name

string

Read-only; expensive to use.

protocol

string

Read-only; expensive to use.

server_id

string

Read-only; expensive to use. Requires read right on object type server for GET requests.

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

number-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. Requires read right on object type user for GET requests.

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

datetime

Read-only. Timestamp of creation.

modified_at

datetime

Read-only. Timestamp of modification.

removed

boolean

Read-only.

Retrieve Available Attributes of the AccessRequestModel

Request

Method

GET

Path

/api/v2/objspec/access_request

AccessRequestVoteModel

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. Requires read right on object type user for POST requests.

created_at

datetime

Read-only. Timestamp of creation.

modified_at

datetime

Read-only. Timestamp of modification.

removed

boolean

Read-only.

Retrieve Available Attributes of the AccessRequestVoteModel

Request

Method

GET

Path

/api/v2/objspec/access_request_vote

AccessRequestRevokeModel

Attribute

Type

Required

Description

access_request_id

string

revoke_reason

string

yes

Retrieve Available Attributes of the AccessRequestRevokeModel

Request

Method

GET

Path

/api/v2/objspec/access_request_revoke

To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.


Get Access Requests List

Request

Method

GET

Path

/api/v2/access_request

Example Request

GET /api/v2/access_request

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  '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

POST /api/v2/access_request/<id>/revoke

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/access_request/5620492334958379010/revoke' \
  -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

POST /api/v2/access_request/<id>/vote

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/access_request/5620492334958379011/vote' \
  -d'{"accepted":true}'

Response

{
    "result": "success"
}