Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

How to rotate your api key with the /api/rotateKeys endpoint

Note

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

PROD

PROD

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

UAT/SUPPORT/QA

OPS

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

(warning) 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

    View file
    nameSelf Rotate Key.postman_collection.json

  • Environment

    View file
    nameSelf Rotate Key.postman_environment.json

Rotating your key

...

1

Configure Postman Environment

Inside of Postman Environment open theSelf Rotate KeyEnvironment

  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.pngImage Added
2

(warning) Save your Environment

...

SaveSnapShot.pngImage Added

3

Configure/Check Self Rotate Key Collection

...

Open the Self rotate request

...

  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

...

    1. the current KeyId

    2. Hover over basicAuthPassword_ApiKey ensure the Password is

...

    1. the current ApiKey

HoverOverAndValidateApiKey.pngImage Added

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.

In the Response body will be your Updated credentials.

...

SEND.pngImage Added
Info

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

(warning) Save

...

your credentials somewhere secure

Your ApiKey will only be shown this one time.

Credentials Created.pngImage Added

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?

...