How to rotate your api key with the /api/rotateKeys endpoint
If the api key has expired, please create an ES ticket to get it reinstated
Prerequisites
Tools needed
Postman https://www.postman.com/
A secure place to keep your credentials
Values Needed
Your Credentials
KeyId
(Basic Auth Password)ApiKey
(Basic Auth KeyId)
The
domain
url associated with the Environment you are working in.
Environment | AWS Instance | Domain |
---|---|---|
PROD | PROD | |
UAT/SUPPORT/QA | OPS | ops-all-integrationsauth-apikeys-v1.learningbuilder-api-ops.net |
Internal Note |
Download the Postman Files and Import them into your Postman
Collection
Environment
Rotating your key
Go to your environments and open the
Self Rotate Key
EnvironmentUpdate the
domain
Current Value to the Domain Should be one listed aboveUpdate
basicAuthUserName_KeyId
Current Value equals your currentKeyId
Update
basicAuthPassword_ApiKey
Current Value equals your currentApiKey
Save your Environment
Go to your collections and open the
Self Rotate Key
CollectionOpen the
Self rotate
requestConfirm your variables (optional)
Hover over the domain, ensure the correct variable
Go to the Authorization tab, ensure the Auth Type is basic
Hover over
basicAuthUserName_KeyId
ensure the Username is yourKeyId
Hover over
basicAuthPassword_ApiKey
ensure the Password is youApiKey
Once you have filled your environment variable go ahead and click “Send”. This will create a Post call that updates your credentials.
In the Response body will be your Updated credentials.
Result looks like this
Note, there is a script that will update your credentials in postman.
Save this in a secure location.
Troubleshooting
Did you save your environment? it is easy to forgo this step. As anyone whom has worked with Postman has probably forgotten this critical step before.
Ensure there are no spaces in your environment variables
Make sure the url is the correct one
Did you accidentally swap your KeyId and ApiKey?