loader image
Cloud Accounts API

Endpoint with Base URL: https://console.cloudnosys.com/api/v1/cloud-account

POST Request #

Add a new cloud account in your organization.

Headers #

Fields Value
Content-Type ‘application/json’
Authorization ACCESS_TOKEN

Body #

Fields Type Description
orgId String The ID of the organization. For e.g., myorg_3x4
provider String Any one of the Public Cloud Providers:

  • AWS
  • GCP
  • Azure
cloudAccountName String Choose what name you would like your Cloud Account to have.
type String Each Cloud Account is either of ‘Basic’ type or ‘Advanced’ type. Basic by default.
cloudAccountCredentials Object Credentials of your Cloud Account depending on your Cloud Provider

If your provider is AWS, then this object should have the following keys:

  • roleArn
  • externalId
  • policy

If your provider is GCP, then this object should have the following key:

  • serviceAccountJson

If your provider is Azure, then this object should have the following keys:

  • appId
  • subscriptionId
  • tenantId
  • secret

For example, if your provider is Azure then your object may look like:

{

    appId: “1fducc82-7df1-4727-a845-17a9bc37784a”,

    subscriptionId: “7b5e21ae-9881-4cb0-8605-2829b91da70d”,

    tenantId: “7268597b-f2ae-4c0d-91d8-184181b91d1e”,

    secret: “LFc7Q~ojCm8nSOPVewNk.EWwXmsqHELaSpQx~”

}

Response Body #

Status: 200

JSON representation

   “message”:  String ,

   “cloudAccountID”: String,

}

Sample Response Body

JSON representation

   “message”:  “Cloud account added successfully and first scan has been queued. You will be informed when completed.”,

   “cloudAccountID”: AmFaDaAU88JLtQzasdf,

}

Error Responses #

Status: 400 #

JSON representation

   “Status”: 400

   “Message”: ERROR_MESSAGE

}

ERROR_MESSAGE
Invalid request! Any of the required params in the request body is missing.

Status: 401 #

JSON representation

   “Status”: 401

   “message”: ERROR_MESSAGE

}

ERROR_MESSAGE
Unauthorized request! Missing authentication token in headers or invalid token. 

Was this page helpful?