### API Overview: InsightCloudSec API Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml

Welcome to the reference documentation for the public APIs (v2) available for InsightCloudSec.

Here are a few resources to help start using our APIs:

After you’ve got the basics down, you can effectively interact with the sample requests and responses found in this file.

```yaml # InsightCloudSec API # Version: v2

Welcome to the reference documentation for the public APIs (v2) available for InsightCloudSec.

Here are a few resources to help start using our APIs:

After you’ve got the basics down, you can effectively interact with the sample requests and responses found in this file.

# Base URL: https://{insightcloudsecUrl}/v2 ``` -------------------------------- ### GET /public/clouds/provisioning/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml List available configured clouds ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/clouds/provisioning/list" ``` ``` -------------------------------- ### POST /public/instance/{instance_resource_id}/start Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Execute a start command against a particular instance. ```markdown ### Parameters - **instance_resource_id** (string, path, required) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/instance/{instance_resource_id}/start" ``` ``` -------------------------------- ### GET /public/botfactory/function-registry/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Outputs a list of all available bot actions. ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/botfactory/function-registry/list" ``` ``` -------------------------------- ### GET /public/resource/{resource_id}/detail Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Get all of the details about a resource including its dependencies. ```markdown ### Parameters - **resource_id** (string, path, required): The InsightCloudSec resource ID. ### Responses #### 200 - 200 - **dependencies** (object) - **privatenetwork** (array (object)) Array items: - **id** (string) (example: "vpc-abc123def") - **name** (string) (example: "example-vpc") - **resource_id** (string) (example: "privatenetwork:112:us-east-1:vpc-abc123def:") - **type** (string) (example: "privatenetwork") - **privatesubnet** (array (object)) Array items: - **serviceencryptionkey** (array (object)) Array items: - **details** (object) - **dbinstance** (object) - **backup_retention** (integer) (example: 30) - **ca_cert** (string) (example: "example-ca-cert") - **common** (object) - **account** (string) (example: "AWS IAR") - **account_id** (string) (example: "123456789012") - **account_status** (string) (example: "DEFAULT") - **cloud** (string) (example: "AWS") - **creation_timestamp** (string) (example: "2022-04-20 16:48:02") - **direct_link** (string) (example: "https://console.aws.amazon.com/rds/home?region=us-east-1#database:id=example-database-id;is-cluster=false") - **discovered_timestamp** (string) (example: "2022-04-20 17:29:08") - **modified_timestamp** (string) (example: "2022-04-22 18:41:01") - **namespace_id** (string) (example: "arn:aws:rds:us-east-1:123456789012:db:example-database-id") - **noncompliance** (array) - **organization_service_id** (integer) (example: 112) - **properties** (object) - **property_list** (array) - **region** (string) (example: "us-east-1") - **resource_id** (string) (example: "dbinstance:112:us-east-1:example-database-id:") - **resource_name** (string) (example: "example-database-name") - **resource_type** (string) (example: "dbinstance") - **tags** (object) - **Name** (string) (example: "example-database-name") - **copy_tags_to_snapshot** (boolean) (example: true) - **db_name** (string) (example: "divvy") - **deletion_protection** (boolean) (example: false) - **enabled_logging_types** (string) (example: "audit, error, slowquery") - **encrypted** (boolean) (example: true) - **endpoint_address** (string) (example: "example-database-name.us-east-1.rds.amazonaws.com") - **endpoint_port** (integer) (example: 3306) - **engine** (string) (example: "mysql") - **engine_version** (string) (example: "5.7.33") - **enhanced_monitoring** (boolean) (example: true) - **iam_authentication** (boolean) (example: false) - **instance_id** (string) (example: "example-database-id") - **instance_type** (string) (example: "db.m5.xlarge") - **latest_restorable_time** (string) (example: "2022-04-22 18:35:00") - **master_username** (string) (example: "master-user") - **multi_az** (boolean) (example: true) - **network_resource_id** (string) (example: "privatenetwork:112:us-east-1:vpc-example1:") - **option_groups** (string) (example: "default:mysql-5-7") - **parameter_groups** (string) (example: "example-database-pg") - **publicly_accessible** (boolean) (example: true) - **state** (string) (example: "available") - **storage_size** (integer) (example: 250) - **storage_type** (string) (example: "io1") - **metric_enabled** (boolean) (example: true) - **resource_type** (string) (example: "dbinstance") ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/resource/{resource_id}/detail" ``` ``` -------------------------------- ### GET /public/applications/settings Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Retrieves the configuration settings for the Applications page. ```markdown ### Responses #### 200 - OK - Application settings retrieved **getApplicationSettings200** - **application_tag_key** (string): The tag key used to create Applications from your environment. - **case_sensitive** (boolean): Denotes if the tag key is case sensitive. - **trim_whitespace** (boolean): Denotes if the whitespace should be trimmed from the tag key. ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/applications/settings" ``` ``` -------------------------------- ### GET /public/clouds/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml List available configured clouds. ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/clouds/list" ``` ``` -------------------------------- ### GET /harvestingstrategy/strategy Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Lists all harvesting strategies including default strategies ```markdown ### Responses #### 200 - 200 - **strategies** (array (object)) Array items: - **organization_services** (integer) (example: 2) - **type_default** (boolean) (example: true) - **cloud_type_id** (string) (example: "AWS") - **organization_id** (integer) (example: 1) - **id** (integer) (example: 1) - **name** (string) (example: "Default Provider Strategy") ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/harvestingstrategy/strategy" ``` ``` -------------------------------- ### POST /public/resource/{resource_id}/notes/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Get all of the notes about a particular resource which were created by users. ```markdown ### Parameters - **resource_id** (string, path, required) ### Responses #### 200 - 200 - **resource_notes** (array) ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/resource/{resource_id}/notes/list" ``` ``` -------------------------------- ### GET /compliance/score-card/export-upload/configs Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Lists existing compliance scorecard configurations. ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/compliance/score-card/export-upload/configs" ``` ``` -------------------------------- ### GET /prototype/resource/{autoscalinggroup_resource_id}/supported_actions/get Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Available Auto scaling Group actions. ```markdown ### Parameters - **autoscalinggroup_resource_id** (string, path, required) ### Responses #### 200 - 200 - **supported_actions** (array (string)) ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/prototype/resource/{autoscalinggroup_resource_id}/supported_actions/get" ``` ``` -------------------------------- ### GET /prototype/diagnostics/system/status/get Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Provides the NTP details, last harvest time and impaired organizations. ```markdown ### Responses #### 200 - 200 - **diagnostics** (array (object)) Array items: - **category** (string) (example: "ntp") - **status** (integer) (example: 1) - **details** (string) (example: "System clock is in-sync") - **offset** (number) (example: -0.0038368701934814453) ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/prototype/diagnostics/system/status/get" ``` ``` -------------------------------- ### GET /prototype/groups/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Lists available basic user groups. *Requires Domain or Organization Admin permissions* ```markdown ### Responses #### 200 - 200 - **groups** (array (object)) Array items: - **group_id** (integer) (example: 2) - **resource_id** (string) (example: "divvyusergroup:2") - **name** (string) (example: "Basic User Group") - **users** (integer) (example: 1) - **roles** (integer) (example: 1) - **entitlements_configured** (boolean) (example: true) ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/prototype/groups/list" ``` ``` -------------------------------- ### GET /prototype/cloud/linked/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /prototype/cloud/linked/list ```markdown ### Responses #### 200 - 200 - Array of object - **status** (string) (example: "active") - **name** (string) (example: "Azure Account 1") - **joined_timestamp** (unknown) - **resource_id** (string) (example: "divvyorganizationservice:4") - **cloud_type_id** (string) (example: "AZURE_ARM") - **account_id** (string) (example: "12345678-1234-4567-1234-1234567890") ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/prototype/cloud/linked/list" ``` ``` -------------------------------- ### GET /public/clouds/reports/get Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /public/clouds/reports/get ```markdown ### Responses #### 200 - 200 - **total_clouds** (integer) (example: 6) - **report_data** (object) - **last_refreshed** (string) (example: "2019-08-09T21:15:25Z") - **by_provider** (object) - **GCE** (integer) (example: 2) - **ALICLOUD** (integer) (example: 1) - **AWS** (integer) (example: 2) - **AZURE_ARM** (integer) (example: 1) - **by_type** (array (object)) Array items: - **cloud_type_id** (string) (example: "AZURE_ARM") - **resource_counts** (object) - **servicerole** (integer) (example: 82) - **storageaccount** (integer) (example: 19) - **networkinterface** (integer) (example: 18) - **distributedtable** (integer) (example: 1) - **serviceuser** (integer) (example: 3) - **servicegroup** (integer) (example: 1) - **appserver** (integer) (example: 3) - **serviceencryptionkeyvault** (integer) (example: 3) - **servicepolicy** (integer) (example: 2) - **privatesubnet** (integer) (example: 14) - **instance** (integer) (example: 6) - **resourceaccesslist** (integer) (example: 17) - **resourceaccesslistrule** (integer) (example: 112) - **storagecontainer** (integer) (example: 29) - **volume** (integer) (example: 15) - **serviceregion** (integer) (example: 30) - **webapp** (integer) (example: 3) - **divvyorganizationservice** (integer) (example: 1) - **dbinstance** (integer) (example: 5) - **privatenetwork** (integer) (example: 13) - **mcinstance** (integer) (example: 1) - **dnszone** (integer) (example: 1) - **routetable** (integer) (example: 2) - **privateimage** (integer) (example: 15) - **snapshot** (integer) (example: 55) - **name** (string) (example: "Divvycloud - Azure") - **resource_id** (string) (example: "divvyorganizationservice:4") ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/clouds/reports/get" ``` ``` -------------------------------- ### GET /datacollections Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /datacollections ```markdown ### Parameters - **detailed_counts** (boolean, query, optional): If `'true'`, include detailed counts, like the number of dependent insights. ### Responses #### 200 - 200 - **collections** (array (object)) Array items: - **insights_count** (integer) (example: 0) - **name** (string) (example: "Known Accounts") - **data_count** (integer) (example: 2) - **inserted_at** (string) (example: "2019-05-08T16:12:07Z") - **bots_count** (integer) (example: 0) - **updated_at** (string) (example: "2019-05-08T16:12:07Z") - **organization_id** (integer) (example: 1) - **id** (integer) (example: 3) ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/datacollections?detailed_counts=true" ``` ``` -------------------------------- ### POST /public/resource/{resource_id}/settings/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml List settings for a given resource. ```markdown ### Parameters - **resource_id** (string, path, required) ### Responses #### 200 - 200 - **setting_list** (array) ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/resource/{resource_id}/settings/list" ``` ``` -------------------------------- ### GET /public/cloud/domains Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /public/cloud/domains ```markdown ### Responses #### 200 - 200 - **domains** (array (object)) Array items: - **organization_id** (integer) (example: 1) - **status** (integer) (example: 1) - **auto_badge** (boolean) (example: false) - **auto_add** (boolean) (example: false) - **added_timestamp** (string) (example: "2019-05-01T16:08:48Z") - **failures** (integer) (example: 0) - **cloud_type_id** (string) (example: "GCE") - **domain_id** (string) (example: "170005165293") - **projects** (integer) (example: 0) - **domain_name** (string) (example: "divvycloud.com") ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/cloud/domains" ``` ``` -------------------------------- ### POST /public/user/login Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml _This endpoint is no longer the preferred authentication method. Use the [API Key authentication method](https://docs.rapid7.com/insightcloudsec/api/v2/#operation/create-api-key) instead._ Programmatically logs into InsightCloudSec. ```markdown ### Request Body **Content-Type:** application/json - **username** (string) (required): Your InsightCloudSec username. - **password** (string) (required): Your InsightCloudSec password. ### Responses #### 200 - 200 #### 400 - 400 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/user/login" \ -H "Content-Type: application/json" \ -d '{ "username": "string", "password": "string" }' ``` ``` -------------------------------- ### GET /public/cloud/consumers Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /public/cloud/consumers ```markdown ### Responses #### 200 - 200 - **consumers** (array (object)) Array items: - **producers** (integer) (example: 0) - **errors** (array) - **organization_service_id** (integer) (example: 10) - **name** (string) (example: "Divvycloud - Consumer") - **cloud_type_id** (string) (example: "AWS") - **events** (integer) (example: 38) - **pending** (boolean) (example: false) - **account_id** (string) (example: "123456789") ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/cloud/consumers" ``` ``` -------------------------------- ### POST /public/user/create Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Create a user backed by SAML authenticaiton ```markdown ### Request Body **Content-Type:** application/json - **authentication_type** (string) - **access_level** (string) - **username** (string) - **authentication_server_id** (integer (int32)) - **name** (string) - **email** (string) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/user/create" \ -H "Content-Type: application/json" \ -d '{ "authentication_type": "saml", "access_level": "string", "username": "string", "authentication_server_id": "0", "name": "string", "email": "string" }' ``` ``` -------------------------------- ### GET /prototype/domain/organizations/get Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /prototype/domain/organizations/get ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/prototype/domain/organizations/get" ``` ``` -------------------------------- ### POST /public/instance/{instance_resource_id}/restart Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Execute a restart command against a particular instance. Will not work on an instance in the "stopped" state. ```markdown ### Parameters - **instance_resource_id** (string, path, required) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/instance/{instance_resource_id}/restart" ``` ``` -------------------------------- ### GET /public/insights/filter-registry Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /public/insights/filter-registry ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/insights/filter-registry" ``` ``` -------------------------------- ### POST /prototype/domain/organization/create Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Creates a new isolated environment. After creating organizations a domain admin user must switch contexts into the organization using the `Switch organization` endpoint. ```markdown ### Request Body **Content-Type:** application/json - **organization_name** (string) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/prototype/domain/organization/create" \ -H "Content-Type: application/json" \ -d '{ "organization_name": "string" }' ``` ``` -------------------------------- ### GET /datacollections/{collection_id} Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /datacollections/{collection_id} ```markdown ### Parameters - **collection_id** (integer (int32), path, required): The ID of the data collection we want to list the contents of. ### Responses #### 200 - 200 - **collection** (object) - **name** (string) (example: "Known External Accounts") - **data_count** (integer) (example: 4) - **inserted_at** (string) (example: "2019-05-10T15:50:25Z") - **updated_at** (string) (example: "2019-05-10T15:50:25Z") - **organization_id** (integer) (example: 1) - **data** (array (object)) Array items: - **id** (integer) (example: 11) - **value** (string) (example: "577108014889") - **description** (string) (example: "Webapp Scanning Service Account") - **id** (integer) (example: 6) ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/datacollections/{collection_id}" ``` ``` -------------------------------- ### POST /public/botfactory/{bot_id}/resume Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Enables a Bot, allowing it to run as instructed. ```markdown ### Parameters - **bot_id** (string, path, required): The ID for the bot. For example: `divvybot:1:123`. ### Request Body **Content-Type:** application/json - **reason** (string): A message to explain the resume action. ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/botfactory/{bot_id}/resume" \ -H "Content-Type: application/json" \ -d '{ "reason": "string" }' ``` ``` -------------------------------- ### GET /public/insights/{resource_id}/violations/get Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Get Insight findings for a given Resource. ```markdown ### Parameters - **resource_id** (string, path, required): The InsightCloudSec resource ID. ### Responses #### 200 - 200 - Array of object - **insight_id** (integer) (example: 170) - **source** (string) (example: "backoffice") - **severity** (integer) (example: 3) - **name** (string) (example: "Identity Resource With Permissive Access") - **description** (string) (example: "Identify users, group and roles that have attached policies with any of the key words provided, e.g., \"Full\", \"Admin\", \"Power\" and \"Owner\".") - **identified_at** (string) (example: "2022-01-27") #### 400 - 400 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/insights/{resource_id}/violations/get" ``` ``` -------------------------------- ### GET /datacollections/{collection_id}/usages/insight Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /datacollections/{collection_id}/usages/insight ```markdown ### Parameters - **collection_id** (integer (int32), path, required): Identifier for the data collection ### Responses #### 200 - 200 - **insight** (array (object)) Array items: - **severity** (integer) (example: 1) - **insight_id** (integer) (example: 22) - **description** (string) (example: "List of all known good IPs") - **organization_id** (integer) (example: 1) - **source** (string) (example: "custom") - **name** (string) (example: "Whitelisted IPs") ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/datacollections/{collection_id}/usages/insight" ``` ``` -------------------------------- ### POST /public/instance/{instance_resource_id}/get_console_output Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for POST /public/instance/{instance_resource_id}/get_console_output ```markdown ### Parameters - **instance_resource_id** (string, path, required) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/instance/{instance_resource_id}/get_console_output" ``` ``` -------------------------------- ### POST /v2/prototype/authenticationservers/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Lists the authentication servers currently configured in InsightCloudSec ```markdown ### Responses #### 200 - 200 - **servers** (array (object)) Array items: - **server_id** (integer) (example: 1) - **server_name** (string) (example: "Okta SSO") - **server_host** (string) (example: "") - **server_port** (integer) (example: 0) - **secure** (integer) (example: 1) - **server_type** (string) (example: "saml") - **global_scope** (boolean) (example: false) - **mapped_groups** (integer) (example: 0) #### 400 - 400 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/v2/prototype/authenticationservers/list" ``` ``` -------------------------------- ### GET /public/insights/{insight_id}/{insight_source} Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml API endpoint for GET /public/insights/{insight_id}/{insight_source} ```markdown ### Parameters - **insight_id** (string, path, required) - **insight_source** (string, path, required) ### Responses #### 200 - 200 - **scopes** (array) - **timeseries** (boolean) (example: true) - **tags** (array (string)) - **severity** (integer) (example: 2) - **timeseries_cache** (integer) (example: 0) - **organization_id** (integer) (example: 1) - **filters** (array (object)) Array items: - **config** (object) - **password_age** (integer) (example: 90) - **name** (string) (example: "sample.query.cloud_max_password_age") - **owner_resource_id** (string) (example: "") - **resource_types** (array (string)) - **name** (string) (example: "Cloud Account Password Policy Maximum Age (90 Days)") - **insight_id** (integer) (example: 5) - **description** (string) (example: "Identify cloud accounts which do not require special characters in the password") - **template_id** (integer) (example: 100) ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/insights/{insight_id}/{insight_source}" ``` ``` -------------------------------- ### POST /prototype/networkinterface/{networkinterface}/instance/attach Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Attach a network interface to an instance. ```markdown ### Parameters - **networkinterface** (string, path, required) ### Request Body **Content-Type:** application/json - **instance_resource_id** (string) - **device_index** (integer (int32)) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/prototype/networkinterface/{networkinterface}/instance/attach" \ -H "Content-Type: application/json" \ -d '{ "instance_resource_id": "string", "device_index": "0" }' ``` ``` -------------------------------- ### GET /public/users/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml List of current active users ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/users/list" ``` ``` -------------------------------- ### POST /public/cache_instance/{instance_resource_id}/restart Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Execute a restart command against a particular cache instance. ```markdown ### Parameters - **instance_resource_id** (string, path, required) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/cache_instance/{instance_resource_id}/restart" ``` ``` -------------------------------- ### GET /public/insights/insights/counts/refresh Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Refreshes the resource counts for all Insights. ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/insights/insights/counts/refresh" ``` ``` -------------------------------- ### POST /public/applications Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Retrieves a list of Applications. ```markdown ### Parameters - **page** (integer, query, optional): The index of the page to retrieve. `1` is the first index, and thus, corresponds to the first page. - **page_size** (integer, query, optional): The maximum number of records to include per page. - **search** (string, query, optional): String to filter the results. - **order_by** (string, query, optional): Determines how the page should be sorted in ascending (`asc`) or descending (`desc`) order based on a field value in the response schema. The `sort` query parameter expects a string value composed of a response schema field name, a colon, and a sort direction. For example: `application:asc` ### Responses #### 200 - OK - Applications retrieved **getApplications200** - **data** (array (object)) Array items: - **resource_id** (string): The unique InsightCloudSec resource ID for the Application. - **application** (string): The name of the Application. - **resource_count** (integer): The number of resources contained within the Application. - **accounts** (integer): The number of accounts contained within the Application. - **clouds** (array (string)): The types of Cloud Service Providers associated with resources within the Application. - **name** (string): Short-hand resource name for the Application. - **category** (string): The category for the Application, e.g., Ecommerce, Education, Finance, Other, etc - **business_critical** (boolean): Denotes whether the Application is business critical. - **poc** (string): The point-of-contact for the Application. - **favorited** (boolean): Denotes whether the Application is a favorite. - **cores** (integer): The number of cores associated with resources within the Application. - **object_storage_bytes** (string): The number of bytes of object storage associated with resources within the Application. - **block_storage_gb** (string): The number of gigabytes of block storage associated with resources within the Application. - **ids** (array (string)): List of IDs. - **page** (integer): The page number for the results. - **page_size** (string): The size of the page for the results. - **total_count** (string): The count of Applications returned for the results. - **total_pages** (string): The number of pages of resultss. ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/applications?page=1&page_size=50&search=string&order_by=" ``` ``` -------------------------------- ### GET /public/insights/packs/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Returns a list of insights in packs ```markdown ### Responses #### 200 - 200 ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/insights/packs/list" ``` ``` -------------------------------- ### POST /prototype/cloud/add Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Add a single cloud account to InsightCloudSec. ```markdown ### Request Body **Content-Type:** application/json - **creation_params** (object) (required): The parameters necessary for InsightCloudSec to add the Cloud account. - **cloud_type** (string) (required): The type of cloud account to add. Options are: `AWS`, `AWS_CHINA`, `AWS_GOV`, `AZURE_ARM`, `AZURE_CHINA`, `AZURE_GOV`, or `GCE`. - **authentication_type** (string): *AWS Only*. The type of authentication to use for the account. Options are: `assume_role` or `instance_assume_role`. - **name** (string) (required): A nickname for the InsightCloudSec UI to display. *Note: This will create a system [badge](doc:cloud-badges) that can be searched or referenced throughout InsightCloudSec.* - **api_key** (string): *AWS and Azure Only*. The API key used to access the account. - **secret_key** (string): *AWS Only*. The secret key used to access the account in conjunction with `api_key`. - **duration** (integer (int32)): *AWS Only*. The allowed duration of the session to harvest account data. - **role_arn** (string): *AWS Only*. The Amazon resource name (ARN) for the role InsightCloudSec will assume to access the account. - **session_name** (string): *AWS Only*. The name of the session when InsightCloudSec accesses the account. The session name is what will display in any CloudTrail logs and is useful for auditing purposes. - **external_id** (string): *AWS Only*. The External ID necessary to authenticate against the provided `role_arn`. - **tenant_id** (string): *Azure Only*. The Tenant ID for the account being added to InsightCloudSec. - **subscription_id** (string): *Azure Only*. The Subscription ID for the subscription hosting the account being added to InsightCloudSec. - **app_id** (string): *Azure Only*. The Application ID for the account being added to InsightCloudSec. - **api_credentials** (string): *GCP Only*. The credentials necessary for InsightCloudSec to interact with the account. The string must contain a JSON object, but any double quotes must be escaped (`\"`). - **email_delegation** (string): *GCP Only*. The email delegation for the project being added to InsightCloudSec. - **strategy_id** (integer (int32)): The ID for the harvesting strategy to apply to the account. Use the [List Harvesting Strategies](ref:list-harvesting-strategies) endpoint to discover IDs. ### Responses #### 200 - 200 - **id** (integer) (example: 123456) - **name** (string) (example: "My Cloud via AWS STS") - **cloud_type_id** (string) (example: "AWS") - **creation_time** (string) (example: "2022-02-09 19:57:53") - **status** (string) (example: "REFRESH") - **role_arn** (string) (example: "arn:aws:iam::123456789012:role/my-role-name") - **group_resource_id** (string) (example: "divvyorganizationservice:123456") - **resource_id** (string) (example: "divvyorganizationservice:123456") #### 400 - 400 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/prototype/cloud/add" \ -H "Content-Type: application/json" \ -d '{ "creation_params": { "cloud_type": "string", "authentication_type": "string", "name": "string", "api_key": "string", "secret_key": "string", "duration": "0", "role_arn": "string", "session_name": "string", "external_id": "string", "tenant_id": "string", "subscription_id": "string", "app_id": "string", "api_credentials": "string", "email_delegation": "string", "strategy_id": "0" } }' ``` ``` -------------------------------- ### POST /public/instance/{instance_resource_id}/snapshot/create Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Create a image based off of an existing instance. Not implemented by Amazon. ```markdown ### Parameters - **instance_resource_id** (string, path, required) ### Request Body **Content-Type:** application/json - **name** (string) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/instance/{instance_resource_id}/snapshot/create" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }' ``` ``` -------------------------------- ### POST /public/resource/{resource_id}/notes/create Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Create a new note for a particular resource. Notes can be used to provide additional context or background about a particular resource to improve collaboration. ```markdown ### Parameters - **resource_id** (string, path, required) ### Request Body **Content-Type:** application/json ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/resource/{resource_id}/notes/create" \ -H "Content-Type: application/json" \ -d '"value"' ``` ``` -------------------------------- ### POST /public/role/create Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Create a named permission definition. ```markdown ### Request Body **Content-Type:** application/json ### Responses #### 200 - 200 - **description** (string) (example: "Role defines permissions to scopes") - **resource_id** (string) (example: "divvyrole:1:9") - **manage** (boolean) (example: false) - **cloud_scopes** (array) - **view** (boolean) (example: true) - **groups** (array) - **all_permissions** (boolean) (example: false) - **global_scope** (boolean) (example: false) - **delete** (boolean) (example: false) - **provision** (boolean) (example: false) - **resource_group_scopes** (array) - **name** (string) (example: "Test Role") ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/role/create" \ -H "Content-Type: application/json" \ -d '"value"' ``` ``` -------------------------------- ### POST /prototype/group/create Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Create new user group Requires Org admin permission ```markdown ### Request Body **Content-Type:** application/json - **group_name** (string) ### Responses #### 200 - 200 ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/prototype/group/create" \ -H "Content-Type: application/json" \ -d '{ "group_name": "string" }' ``` ``` -------------------------------- ### POST /harvestingstrategy/strategy Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Create a harvesting strategy ```markdown ### Request Body **Content-Type:** application/json - **strategy_name** (string) - **cloud_type_id** (string) ### Responses #### 200 - 200 - **strategy_id** (integer) (example: 13) ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/harvestingstrategy/strategy" \ -H "Content-Type: application/json" \ -d '{ "strategy_name": "string", "cloud_type_id": "string" }' ``` ``` -------------------------------- ### GET /public/insights/list Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Returns a list of all InsightCloudSec and custom Insights. ```markdown ### Parameters - **detail** (boolean, query, optional): If `true`, provides additional detail about the Insight in the response. - **labels** (string, query, optional): A comma-delimited list of labels to filter the returned list of Insights. Providing multiple labels will return Insights that match any of the labels. *Note: spaces must be URL encoded, e.g., if the label is `cis controls`, the URL would contain the label as such: `cis%20controls`.* - **pack_ids** (string, query, optional): Comma-separated list of pack IDs in the format of `:`. Pack type can be `backoffice` (for InsightCloudSec authored Insight Packs) or `custom` (for user authored Insight Packs). - **resource_types** (string, query, optional): Comma-separated list of resource types, e.g., `storagecontainer`, `webapp`, `instance`, etc. ### Responses #### 200 - 200 - Array of object - **scopes** (array) - **timeseries** (boolean) (example: true) - **tags** (array (string)) - **severity** (integer) (example: 1) - **timeseries_cache** (integer) (example: 0) - **organization_id** (integer) (example: 1) - **filters** (array (object)) Array items: - **config** (object) - **name** (string) (example: "divvy.filter.database_instance_multi_az") - **owner_resource_id** (unknown) - **resource_types** (array (string)) - **name** (string) (example: "Database Instance Not Multi-AZ") - **insight_id** (integer) (example: 2) - **description** (string) (example: "Identify databases that are not configured across multiple availablity zones for resiliency") - **template_id** (integer) (example: 2) ### Example Usage ```bash curl -X GET "https://{insightcloudsecUrl}/v2/public/insights/list?detail=true&labels=string&pack_ids=string&resource_types=string" ``` ``` -------------------------------- ### POST /public/applications/summary Source: https://docs.rapid7.com/_api/insightcloudsec-v2-api.yaml Retrieves summary information for the configured Applications. ```markdown ### Responses #### 200 - OK - Application summary retrieved **getApplicationSummary200** - **summary** (object) - **top_five_categories** (object): The categories containing the top 5 most Applications. - **category_count** (integer): The total number of Applications for a given category, e.g., Ecommerce, Education, Finance, Other, etc. - **top_five** (object): The Applications containing the top 5 most resources. - **application_count** (integer): The total number of resources for a given Application. - **business_criticals** (integer): The total number of Business Critical Applications. - **total_count** (integer): The total number of Applications. ### Example Usage ```bash curl -X POST "https://{insightcloudsecUrl}/v2/public/applications/summary" ``` ```