Skip to content

Retrieve a sudo command bundle

Request

OPA roles:
  • resource_admin
  • security_admin
  • delegated_security_admin

Retrieves a specified sudo command bundle

Security
bearerAuth
Path
team_namestringrequired

The name of your team

sudo_command_bundle_idstringrequired

The UUID of a sudo command bundle

curl -i -X GET \
  'https://{org_name}.pam.okta.com/v1/teams/{team_name}/sudo_command_bundles/{sudo_command_bundle_id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
add_envArray of strings or null, <= 32 items

A list of environment variables to include when running sudo commands. See the sudo documentation.

created_atstring, (date-time)read-only

A timestamp indicating when the sudo command bundle was created

Example:"2022-08-25T00:00:00Z"
created_bystringread-only

The username of the user who created the sudo command bundle

descriptionstring, [ 1 .. 255 ] characters

A description of the sudo command bundle

idstring, (regex)^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-...read-only

The UUID of the sudo command bundle

namestring, (regex), [ 1 .. 255 ] characters^[\w\-_.]+$required

The name of the sudo command bundle. This controls the ordering of all bundles within your team. See Sudo Command Bundle.

no_execboolean or null

Whether to allow commands to execute child processes

no_passwdboolean or null

Whether to require a password when sudo is run. This should generally not be used as users don't require a password.

Default:true
run_asstring or null, (regex), [ 1 .. 64 ] characters^([%]{0,1})((([#])(\d+))|([\w\-_.]+)|((?i)[A-...

A non-root user account used to run the command

set_envboolean or null

Whether to allow overriding environment variables to commands

structured_commandsArray of objects or null, [ 0 .. 64 ] items

A list of commands to allow

sub_envArray of strings or null, <= 32 items

A list of environment variables to ignore when running the commands. See the sudo documentation.

updated_atstring, (date-time)read-only

A timestamp indicating when the sudo command bundle was last updated

Example:"2022-08-25T00:00:00Z"
updated_bystringread-only

The username of the user who last updated the sudo command bundle

Response
{ "id": "3a064d89-2984-47aa-bbda-91d637f09b8c", "created_at": "2024-07-29T17:52:05.898261Z", "created_by": "some-user", "updated_at": "2024-07-29T17:52:05.898261Z", "updated_by": "some-user", "name": "create_directories", "description": null, "structured_commands": [ { … } ], "run_as": "", "no_passwd": true, "no_exec": false, "set_env": false, "add_env": null, "sub_env": null }