New-RubrikAPIToken
SYNOPSIS
Creates a new Rubrik API Token.
SYNTAX
DESCRIPTION
The New-RubrikAPIToken cmdlet is used to generate a new API Token for the Rubrik cluster using the role and permissions of the currently logged in session. The token can then be used in making API requests without having to resort to basic authorization.
EXAMPLES
EXAMPLE 1
This will generate a new API Token named "API Token" that lasts for 60 minutes (1 hour).
EXAMPLE 2
This will generate a new API Token named "2-Day Token" that lasts for 2880 minutes (48 hours / 2 days).
EXAMPLE 3
This will generate a new API Token named "Dev Org Weekly Token" that lasts for 10080 minutes (7 days) in the organization matching id value "Organization:::11111111-2222-3333-4444-555555555555". This assumes that the current session that is requested the token has authority in that organization.
PARAMETERS
-OrganizationId
Bind the new session to the specified organization. When this parameter is not specified, the session will be bound to an organization chosen according to the user's preferences and authorizations.
-Expiration
This value specifies an interval in minutes. The token expires at the end of the interval. By default, this value is 60 (1 hour). This value cannot exceed 525600 (365 days).
-Tag
Name assigned to the token. The default value is "API Token".
-Server
Rubrik server IP or FQDN
-api
API version
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
Written by Chris Wahl for community usage Twitter: @ChrisWahl GitHub: chriswahl
RELATED LINKS
Last updated