Manage API keys

All Moogsoft APIs require an API key. You can manage existing keys using the Users and Keys API or in the Moogsoft web UI > Settings > API Key Management page.

Important notes

  • Users do not have API keys by default. You must create a key for yourself before you can use an API or API-based integration.

  • You can retrieve and update information about an API key, but you cannot access the key itself. The key is visible only when the key's owner first creates it.

  • Each API key is associated with the user who created that key. Operators can create and access their own keys. Administrators and Owners can view and revoke any keys in the system.

  • You can create multiple keys for yourself. This is good practice if you want to set up multiple inbound integrations: use a separate API key for each data stream.

  • The operations available to you depend on your role and permissions. If you have Operator permissions, you can view correlations by sending a GET to the correlations API endpoint. However, you cannot create correlations by sending a POST. See Managing Moogsoft Users.

Create an API key

  1. In Moogsoft Cloud, navigate to Settings > API Key Management.

  2. Click Create API Key + at the top right.

  3. Enter a name and description for the key, then click Create.

Note: Copy and save the key in a secure text file immediately after you create the key. This is the only time you can view the key directly in the Moogsoft Cloud UI.

Revoke API keys

  1. In Moogsoft Cloud, navigate to Settings > API Key Management.

  2. Select the keys to revoke.

  3. Click Revoke. The key will get revoked within 5 minutes.

Rotate API keys for deleted users

When a user is deleted, any API keys created by that user stay in the system. Retaining the old key in this way makes it possible for your organization to create a new key for a valid user as a replacement without losing access to key integrations or scripts.

Removing the old key and replacing it with a new key is highly recommended, as an API key is a credential for accessing Moogsoft Cloud. An administrator or owner can perform the following key rotation procedure:

  1. Create a new key in Moogsoft Cloud.

  2. Apply the new key to the third-party tool or script, replacing the key associated with the deleted user.

  3. Delete the old key.