Add OPM policy

This method adds a new privileged command rule to the policy.

URL

  • Make sure there are no spaces in the URL.

  • The following characters are not supported in URL values: + & %

  • If the URL includes a dot (.), add a forward slash (/) at the end of the URL. For example: api/Safes/MySafe/Members/user@cyber.com/

 

 
https://<IIS_Server_Ip>/PasswordVault/WebServices/PIMServices.svc/Policy/{PolicyId}/PrivilegedCommands

The following mandatory value is required in the URL:

Parameter

PolicyID

Type

String

Description

The ID of the policy to which the new privileged command rule will be added.

Resource information

HTTP method

PUT

Content type

application/json

Header parameter

Parameter

Authorization

Type

String

Description

The token that identifies the session.

Valid values

A session token that was returned from the “Logon” method.

Body parameters

 
{

"Command":"<Command>",

"CommandGroup":<true/false>,

"PermissionType":"<Allow/Deny>",

"Restrictions":"<Restrictions>",

"UserName":"<UserName>"

}

 

Parameter

Command

Type

text

Description

The command to run.

Valid values

Not empty

Parameter

CommandGroup

Type

bool

Description

Whether or not this is a command group.

Valid values

True/False

Parameter

PermissionType

Type

text

Description

Allow or Deny command.

Valid values

Allow/Deny

Parameter

PolicyId

Type

text

Description

The Policy Id, provided in the URL.

Valid values

Not empty

Parameter

Restrictions

Type

text

Description

A restrictions string.

Valid values

<restrictionName>=<Value>;<… or empty

Parameter

UserName

Type

text

Description

The user this rule applies to.

Valid values

User name, or "*" for all users

Result

 
{

"AddPolicyPrivilegedCommandResult":

{

"Command":"<command>",

"CommandGroup":"<true/false>",

"Id":"<number>",

"IsGroup":"<true/false>",

"Type":"<Policy/Account>",

"PermissionType":"<Allow/Deny>",

"PolicyId":"<policyID>",

"Restrictions":"<restrictions string, delimited by ;>",

"UserName":"<userName>"}

}

Return codes

For a complete list of return codes, see Return Codes.