REST API Reference > Platform REST API version 3 resources > Key rotation
  

Key rotation

Use the key resource to get information about the organization's encryption key rotation settings and to change the settings.
You must have the Key Admin role to view or change key rotation settings.

Getting key rotation interval settings

You can use the key resource to see the current key rotation interval for your organization and valid key rotation intervals.

GET request

To get key rotation interval details, use the following URI:
/public/core/v3/key/rotationSettings

GET response

If successful, returns the following information:
Field
Type
Description
orgId
String
ID of the organization the user belongs to.
validRotationIntervals
List <String>
Valid key rotation intervals. To change the current key rotation interval to one of these values, send a PATCH request.
rotationInterval
String
The current key rotation interval used for the organization.

GET response example

If successful, you might receive a response similar to the following example:
{
"orgId": "52ZSTB0IDK6dXxaEQLUaQu",
"validRotationIntervals": [
"90_DAYS",
"120_DAYS",
"180_DAYS",
"365_DAYS"
],
"rotationInterval": "365_DAYS"
}

Changing key rotation intervals

You can use the key resource to change the key rotation interval for the organization.

PATCH request

To change the key rotation interval, send a PATCH request using the following URI:
/public/core/v3/key/rotationSettings
Include the following information:
Field
Type
Required
Description
rotationInterval
String
Yes
The key rotation interval to use for the organization. Use one of the following values:
  • - 90_DAYS
  • - 120_DAYS
  • - 180_DAYS
  • - 365_DAYS
Default is 365_DAYS.

PATCH response

Returns a success code if successful or an error object if errors occur.

PATCH example

To change the key rotation interval for an organization, you might send a request similar to the following example:
POST <baseApiUrl>/public/core/v3/key/rotationSettings
Content-Type: application/json
Accept: application/json
INFA-SESSION-ID: <sessionId>
{
"rotationInterval": "120_DAYS"
}