Skip to content

Sudo Commands

The Sudo Commands API provides operations to manage a set of sudo commands (sudo command bundles). You can create any number of bundles, but each bundle can only contain up to 64 commands. You control the order of sudo command bundles by the name of each bundle. See Sudo command bundle.

List all sudo command bundles

Request

OPA roles:
  • resource_admin
  • security_admin
  • delegated_security_admin

Lists all sudo command bundles for your team

Security
bearerAuth
Path
team_namestringrequired

The name of your team

Query
countinteger, (int32)

The number of objects per page

descendingboolean

If true, results are listed in descending order. By default, results are listed in ascending order.

offsetstring

The offset value for pagination. The rel="next" and rel="prev" Link headers define the offset for subsequent or previous pages.

prevboolean

The direction of paging

containsstring

Filters for sudo command bundles where the name contains the search string

Note: This parameter is case-sensitive.

GET
/v1/teams/{team_name}/sudo_command_bundles
curl -i -X GET \
  'https://{org_name}.pam.okta.com/v1/teams/{team_name}/sudo_command_bundles?count=0&descending=true&offset=string&prev=true&contains=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
listArray of objects(SudoCommandBundle)
Response
{ "list": [ {}, {} ] }