How to cycle your key

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

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

Environment

AWS Instance

Domain

PROD

PROD

prd-integrationsauth-apikeys-v1.learningbuilder-api.com

UAT/SUPPORT/QA

OPS

ops-all-integrationsauth-apikeys-v1.learningbuilder-api-ops.net

Internal Note INT/LAB/TEST are only active if necessary and are not maintained

Download the Postman Files and Import them into your Postman

  • Collection

  • Environment

Rotating your key

1

Configure Postman Environment

Inside of Postman Environment open the Self Rotate Key Environment

  1. Update the domain Current Value to the Domain Should be one listed above

  2. Update basicAuthUserName_KeyId Current Value equals your current KeyId

  3. Update basicAuthPassword_ApiKey Current Value equals your current ApiKey

image-20241122-211943.png
2

Save your Environment

 

SaveSnapShot.png
3

Configure/Check Self Rotate Key Collection

  1. Hover over the domain, ensure the correct variable

  2. Go to the Authorization tab, ensure the Auth Type is basic

    1. Hover over basicAuthUserName_KeyId ensure the Username is the current KeyId

    2. Hover over basicAuthPassword_ApiKey ensure the Password is the current ApiKey

 

4

Send the request

 

  1. Once you have filled your environment variable go ahead and click “Send”. This will create a Post call that updates your credentials.

Note, there is a script that will update your credentials in postman. This will allow you to easily just run in the next time.

5

Save your credentials somewhere secure

Your ApiKey will only be shown this one time.

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?