Skip to main content
Skip table of contents

Cloudaware APIs for Adding Cloud Accounts

This guide explains how to add cloud accounts to Cloudaware using APIs. Cloudaware uses the OAuth standard to authenticate users who send requests to the Cloudaware API. Users must get a token to add or view accounts, depending on their permissions.

Get an OAuth token


1. Log in to Cloudaware → Admin.

adding cloud accounts - admin.png

2. In the left menu, select OAUTH → +CREATE NEW TOKEN CREATE TOKEN.

adding cloud accounts - oauth - create token 1.png
adding cloud accounts - oauth - create token 2.png

You might be redirected to a force.com page to grant access to Cloudaware OAuth2. Click Allow to continue.

3. Click Copy To Clipboard to copy and save the token.

adding cloud accounts - oauth - copy token.png

4. Click GOT IT, CLOSE WINDOW to proceed.

adding cloud accounts - oauth - token copied.png
adding cloud accounts - oauth - copy token.png

5. Check the list of tokens counts. 

adding cloud accounts - oauth - token use count.png

You can have 4 active tokens at a time. The ‘Use Count’ column shows how many times each token has been used.


6. Note that if a token has been compromised, it must be revoked: click triple dots → RevokeYes, Revoke.

adding cloud accounts - oauth - revoke token.png

7. To generate another token, click +CREATE NEW TOKEN.

adding cloud accounts - oauth - create new token.png

8. If your environment has IP restrictions, update the OAuth policy settings as described in the tip below.

IP Relaxation Tip

8.1. Log in to Cloudaware → Setup:

adding cloud accounts - setup.png

8.2. Type Apps in the Search bar → Connected Apps → Manage Connected Apps → click on the Cloudaware OAuth2 app:

adding cloud accounts - oauth - connected apps - select the app.png

Click Edit Policies:

adding cloud accounts - oauth - the app - edit policies.png

8.3. Select 'Relax IP restrictions' in 'IP Relaxation':

adding cloud accounts - oauth - the app - relax ip restrictions.png

Click Save.

Get an API key


An API key is required to send requests to the Cloudaware API.


1. Create a Google Cloud Project account.


2. Submit an access request to support@cloudaware.com, including the full email address of the associated Google Cloud Project account.


3. Activate API access:

adding cloud accounts - get API key - APIs and services menu.png
adding cloud accounts - get API key - library.png
  • Filter by Private:

adding cloud accounts - get API key - filter by private.png


4. Select external.endpoints.cloudaware-vm.cloud.googEnable.

adding cloud accounts - get API key - select API.png
adding cloud accounts - get API key - enable.png

5. Go back to APIs & ServicesCredentialsCreate CredentialsAPI Key.

adding cloud accounts - get API key - create credentials.png
adding cloud accounts - get API key - select API key.png

6. Copy the API Key to your clipboard:

adding cloud accounts - get API key - copy the key.png

Setup in API Explorer

The Google APIs Explorer allows you to explore and test APIs. The following example demonstrates how to add AWS accounts to Cloudaware using public APIs.


1. Open Google APIs Explorer.
2. Click the gear icon () → Set API key / OAuth 2.0 Client ID:

adding cloud accounts - APIs explorer - gear icon.png

Paste the API key and OAuth 2.0 token, then click Save.

adding cloud accounts - APIs explorer - insert key and token.png

3. Go to ServicesExternal API v1 → select external.amazon.account.create.

adding cloud accounts - APIs explorer - select the API.png

4. Fill out the form:

adding cloud accounts - APIs explorer - form.png

WHERE
token - paste the OAuth token generated before. Select fields in ‘Request body’ to make it look like below:
sandbox - select true if your Salesforce org is a sandbox; otherwise, select false
Request body - add the following properties: role, trustedAccount, accountId, externalId, usages, name

Here is a sample of request body query (no values inserted):

CODE
{
  "role": 
  {
    "trustedAccount": 
    {
      "accountId": ""
    },
    "externalId": ""
  },
  "usages": 
  [
  ],
  "name": ""
}

5. Click Authorize and Execute. 

List of APIs

The following APIs are available:

external.amazon.accounts.create
external.amazon.accounts.list
external.amazon.accounts.remove
external.amazon.accounts.update
external.applications.batch.upsert
external.applications.list
external.applications.remove
external.applications.tiers.remove
external.azure.activeDirectories.create
external.azure.activeDirectories.list
external.azure.activeDirectories.remove
external.azure.activeDirectories.update
external.azure.applications.list
external.azure.applications.remove
external.azure.applications.update
external.azure.subscriptions.create
external.azure.subscriptions.list
external.azure.subscriptions.remove
external.azure.subscriptions.update
external.compliance.policies.executeTests
external.compliance.policies.generate
external.compliance.schema.list
external.compliance.types.filter
external.compliance.types.get
external.compliance.types.list
external.incidents.create
external.newRelic.accounts.create
external.newRelic.accounts.getAll
external.newRelic.accounts.remove
external.newRelic.accounts.rotateApiKey
external.newRelic.accounts.update
external.session.create
external.tunhub.tunnels.getAll
external.tunhub.tunnels.routes.getAll
external.tunhub.tunnels.swapChannels
external.tunhub.tunnels.update

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.