To create an access request, use the following request:
POST
Host: <Appliance IP>
Accept application/json
Content-type application/json
Authorization A2A <API key>
{
"ForUser": "<user name>",
"ForUserId": <user id>,
"ForProvider": “<providername>”,
"SystemId": <system id>,
"SystemName": "<system name>",
"AccountId": <account id>,
"AccountName": "<account name>",
"AccessRequestType": "<request type>",
“RequestedDurationDays”: <days>
"RequestedDurationHours": <hours>,
“RequestedDurationMinutes”: <minutes>,
“RequestedFor”: “<date>,
"ReasonCodeId": <reason code id>,
"ReasonCode": "<reason name>",
"ReasonComment": "<reason comment>",
“IsEmergency”: <bool>,
“TicketNumber”: “<ticket>”
}
This URL returns the new request if successful.
Exceptions
Most of the fields in this access request match those in a normal access request, with the exceptions noted here:
The following fields are used to identify the target Safeguard for Privileged Passwords user that will be used to create the request. The result must uniquely identify a valid Safeguard for Privileged Passwords user for which the application has been granted permission to create an access request. If the search results in multiple matches or no matches, an error is returned.
- ForUserId: The database ID of a Safeguard for Privileged Passwords user. This takes priority if it contains a value.
- ForUser: The name of a Safeguard for Privileged Passwords user. This value is ignored if ForUserId contains a value.
- ForProvider: An optional provider name, that can be used to limit the search for ForUser.
The following fields are used to uniquely identify the target system. If the search results in multiple matches or no matches, an error is returned.
- SystemId: The database ID of a Safeguard for Privileged Passwords asset. This field is used to search for a matching asset in the following order:
- System Name: Exact match on the system name
- Network Address: Exact match on the network address
- String search: A string search on all string properties for the asset
The following fields are used to uniquely identify the target account. If the search results in multiple matches or no matches, an error is returned.
- AccountId: The database ID of a Safeguard for Privileged Passwords account. This takes priority if it contains a value.
- AccountName: This is ignored if AccountId contains a value. This field is used to search for a matching account in the following order:
- Account Name: Exact match on the account name
- String search: A string search on all string properties for the account
The following fields can be used to identify the reason code. If the search results in multiple matches or no matches, the reason code is set to null.
- ReasonCodeId: The database ID of a predefined reason code. This takes priority if it contains a value.
- ReasonCode: The name of a predefined reason code. This is ignored if ReasonCodeId contains a value.