Set Up External API Access
Cloudaware External APIs allow authorized external clients to perform supported operations in Cloudaware, such as managing cloud accounts or working with TunHub tunnels.
This guide explains how to configure external API access. During this guide, you will generate:
- A long-lived Cloudaware OAuth token.
- A Google Cloud API key for the approved project.
Prerequisites
Before you begin, make sure you have:
- Administrator access to Cloudaware.
- A Google Cloud account. A free trial account can be used.
- A Google Cloud project approved by Cloudaware Support for access to the Cloudaware External API.
High-Level Flow
To set up access to Cloudaware External APIs:
- Generate an OAuth token in Cloudaware.
- Ask Cloudaware Support to grant your Google Cloud project access to the private Cloudaware External API.
- Enable the API in the approved Google Cloud project.
- Generate an API key restricted to the Cloudaware External API.
- Add the API key to Google APIs Explorer.
- Select an External API method and authenticate the request using the Cloudaware OAuth token.
Get an OAuth Token
Cloudaware uses OAuth to authenticate requests to the Cloudaware API. To get an OAuth token:
-
Log in to Cloudaware → Admin.
-
In the left menu, select API CREDENTIALS. Under OAuth Tokens, click +CREATE TOKEN → CREATE TOKEN.
noteYou might be redirected to a Force.com page to grant access to Cloudaware OAuth 2.0. Click Allow to continue.
-
Click Copy To Clipboard to copy the token, and store it securely.
-
Click GOT IT, CLOSE WINDOW to proceed.
tipIf your environment has IP restrictions, update the OAuth policy settings:
- In Cloudaware, go to Setup.
- Search for
Appsin the search bar. Under Connected Apps, select Manage Connected Apps and click the Cloudaware OAuth2 app. - Click Edit Policies.
- In the IP Relaxation field, select Relax IP restrictions.
- Click Save.
You can create additional tokens or revoke existing tokens here, in Cloudaware Admin → API CREDENTIALS:
- To revoke a token, in the three-dot menu select Revoke → Yes, Revoke.
- To generate another token, click +CREATE TOKEN.
You can have 4 active tokens at a time. The Use Count column shows how many times each token has been used.
Get a Google Cloud API Key
A Google Cloud API key is required to send requests to the private Cloudaware External API.
- Create a Google Cloud account.
- Create a Google Cloud project.
- Submit an access request to Cloudaware Support at
support@cloudaware.com. Include the full email address associated with the Google Cloud account that owns or manages the project. - Before proceeding with the next step, wait for Cloudaware Support to confirm that API access has been granted.
- Activate API access:
- Go to Google Cloud Console and select the approved project.
- Open the navigation menu → APIs & Services → Library.
- Filter the available APIs by Private.
- Select external.endpoints.cloudaware-vm.cloud.goog → Enable.
- Go back to APIs & Services → Credentials → Create Credentials → API Key.
- In the API restrictions dropdown, select the external.endpoints.cloudaware-vm.cloud.goog API. Click Create.
- Copy the API key to your clipboard.
Add the API key to Google APIs Explorer
Google APIs Explorer lets you review available operations, enter request parameters, and test API requests.
- Open Google APIs Explorer.
- Click the gear icon → Set API key / OAuth 2.0 Client ID.
- Paste the API key, leave OAuth 2.0 Client ID blank, and click Save.
Common Use Cases
After configuring the OAuth token, Google Cloud API key, and Google APIs Explorer, use the appropriate External API operation for your workflow.
Add Cloud Accounts
Use Cloudaware External APIs to add and manage cloud accounts without onboarding them manually through the Cloudaware UI.
Cloudaware provides operations for AWS accounts, Microsoft Entra ID tenants, Azure applications, and Azure subscriptions. The following example adds an AWS account.
Before proceeding, collect the following information:
- The ARN of the IAM role created in the AWS account.
- An external ID (optional).
- A display name for the account.
- The AWS partition.
Steps:
-
In Google APIs Explorer, go to Services → External API v1.
-
Select
external.amazon.accounts.create. -
Fill out the form.
Field Value token Paste the OAuth token generated earlier. sandbox Select trueif your Cloudaware Salesforce organization is a sandbox. Otherwise, selectfalse.fields Click Use fields editor, and then select all to include all fields in the response. Request body Specify the role,name, andusagesproperties.Sample request body without values:
{"role": {"externalId": "<external_id>","roleArn": "arn:aws:iam::<account_id>:role/<role_name>","trustedAccount": {"accountId": "<trusted_account_id>","partition": "<partition>"}},"name": "<account_name>","usages": []}Where:
role.externalId: External ID for the Cloudaware Collector. Leave unset if you haven’t generated one in Cloudaware Admin UI.role.roleArn: Full ARN of the IAM role you create in the AWS account being onboarded. Format:arn:aws:iam::<account_id>:role/<role_name>.role.trustedAccount.accountId: The Cloudaware account ID used for role assumption. The account ID is 814021343637 for theawspartition and 321683528484 for theaws-us-govpartition. You can verify the account ID in the Mappings section of the Cloudaware CloudFormation template.role.trustedAccount.partition: Almost always"aws"for standard commercial AWS accounts. Only changes to"aws-cn"if an account lives in AWS China, or"aws-us-gov"if it's in GovCloud.name: A display name for this account as it will show up in Cloudaware, for example, Prod - US-East.usages: Specifies the basic ("COLLECTOR") and add-on ("MONITORING","ELM", and"CONFLUX") functionality to enable for the AWS account added to Cloudaware. If left blank,"COLLECTOR"is set by default.
-
Click Authorize and Execute.
-
Review the response to confirm that the account was added successfully.
Use the corresponding create, list, update, or remove operation to manage other supported cloud-account connections. See the List of External APIs below.
Check Status of TunHub Tunnels
Use the external.tunhub.tunnels.getAll operation to retrieve TunHub tunnels available in the Cloudaware environment and review their current status.
Before proceeding, make sure that TunHub is configured for your Cloudaware account.
Steps:
-
In Google APIs Explorer, go to Services → External API v1.
-
Select
external.tunhub.tunnels.getAll. -
Fill out the form.
Field Value token Paste the OAuth token generated earlier. sandbox Select trueif your Cloudaware Salesforce organization is a sandbox. Otherwise, selectfalse.fields Click Use fields editor, and then select all to include all fields in the response. Click + to expand the list of items, and clear any fields you do not need. -
Click Authorize and Execute.
-
Review the returned tunnel records and their status information.
Use the response to identify tunnels that are available, inactive, or require investigation. The exact fields returned depend on the current External API response schema.
List of External APIs
The following External API operations are available:
AWS Accounts
external.amazon.accounts.createexternal.amazon.accounts.listexternal.amazon.accounts.removeexternal.amazon.accounts.update
Applications
external.applications.batch.upsertexternal.applications.listexternal.applications.removeexternal.applications.tiers.remove
Azure Active Directories
external.azure.activeDirectories.createexternal.azure.activeDirectories.listexternal.azure.activeDirectories.removeexternal.azure.activeDirectories.update
Azure Applications
external.azure.applications.listexternal.azure.applications.removeexternal.azure.applications.update
Azure Subscriptions
external.azure.subscriptions.createexternal.azure.subscriptions.listexternal.azure.subscriptions.removeexternal.azure.subscriptions.update
Compliance
external.compliance.policies.executeTestsexternal.compliance.policies.generateexternal.compliance.schema.listexternal.compliance.types.filterexternal.compliance.types.getexternal.compliance.types.list
Incidents
external.incidents.create
New Relic Accounts
external.newRelic.accounts.createexternal.newRelic.accounts.getAllexternal.newRelic.accounts.removeexternal.newRelic.accounts.rotateApiKeyexternal.newRelic.accounts.update
Sessions
external.session.create
TunHub
external.tunhub.tunnels.getAll