openapi: 3.1.0
info:
  title: InsightCloudSec API
  description: "<p>Welcome to the reference documentation for the public APIs (v2) available for InsightCloudSec.</p>\n\t\t<p>Here are a few resources to help start using our APIs:</p>\n\t\t<ul>\n\t\t<li><a href='https://docs.rapid7.com/insightcloudsec/api-documentation'>Learn about basic InsightCloudSec API concepts and capabilities</a></li>\n\t\t<li><a href='https://docs.rapid7.com/insightcloudsec/api/v2/#operation/create-api-key'>Get an InsightCloudSec API key to set up authentication</a></li>\n\t\t<li><a href='https://docs.rapid7.com/insightcloudsec/welcome-to-insightcloudsec'>Learn more about InsightCloudSec</a></li>\n\t\t</ul>\n\t\t<p>After you’ve got the basics down, you can effectively interact with the sample requests and responses found in this file.</p>"
  contact:
    name: Rapid7 Support
    url: https://support.rapid7.com
    email: support@rapid7.com
  version: v2
servers:
  - url: https://{insightcloudsecUrl}/v2
    variables:
      insightcloudsecUrl:
        default: my.insightcloudsec.com
security:
  - Api-Key: []
tags:
  - name: Applications
    description: Endpoints related to the management of Applications. Review the [Application Context](https://docs.rapid7.com/insightcloudsec/application-context) documentation for more information.
paths:
  /public/botfactory/list:
    post:
      summary: List Bots
      description: List existing Bots using filters.
      operationId: list-bots
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - filters
              properties:
                filters:
                  type: array
                  description: The filters to apply to the list operation.
                  items:
                    properties:
                      field_name:
                        type: string
                        description: 'The name of the filter to use. Options are: `state`, `category`, or `severity`.'
                      filter_type:
                        type: string
                        description: The type of filter to apply.
                        default: EXACT
                      filter_value:
                        type: string
                        description: The value for the filter. Varies depending on the filter name provided. Review [Bot Factory Listing](doc:managing-bots#listing) for more information on the types of filters and values.
                    required:
                      - field_name
                      - filter_type
                      - filter_value
                    type: object
                limit:
                  type: integer
                  description: The limit of Bots returned by the request. The default is all Bots.
                  format: int32
                offset:
                  type: integer
                  description: The number to offset in the returned list of Bots.
                  default: 0
                  format: int32
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "bots": [
                            {
                                "resource_id": "divvybot:1:696",
                                "name": "Action -- All Resources",
                                "description": "Bot testing these actions: Log Message Log To Syslog Mark Parent Cloud Noncompliant Mark Parent Region Noncompliant Mark Resource Noncompliant Send Delayed Email Send Slack Message",
                                "owner": "divvyuser:107:",
                                "owner_name": "John Doe",
                                "state": "PAUSED",
                                "event_failures": null,
                                "valid": true,
                                "hookpoint_created": false,
                                "hookpoint_tags_modified": false,
                                "hookpoint_modified": false,
                                "hookpoint_destroyed": false,
                                "schedule": null,
                                "next_scheduled_run": null,
                                "creation_timestamp": "2017-11-15 11:08:58",
                                "modified_timestamp": "2019-08-06 18:54:10",
                                "category": "Security",
                                "severity": "low",
                                "detailed_logging": false,
                                "instructions": {
                                    "resource_types": [
                                        "instance",
                                        "dbinstance",
                                        "mcinstance",
                                        "bigdatainstance",
                                        "esinstance",
                                        "instancereservation",
                                        "resourceaccesslist",
                                        "resourceaccesslistrule",
                                        "volume",
                                        "snapshot",
                                        "dbsnapshot",
                                        "mcsnapshot",
                                        "bigdatasnapshot",
                                        "privatenetwork",
                                        "privatesubnet",
                                        "internetgateway",
                                        "networkflowlog",
                                        "networkinterface",
                                        "networkpeer",
                                        "publicip",
                                        "routetable",
                                        "loadbalancer",
                                        "hypervisor",
                                        "privateimage",
                                        "serviceuser",
                                        "servicegroup",
                                        "servicelimit",
                                        "storagecontainer",
                                        "servicealarm",
                                        "servicecertificate",
                                        "serviceaccesskey",
                                        "serviceencryptionkey",
                                        "serverlessfunction",
                                        "divvyorganizationservice",
                                        "serviceregion",
                                        "sharedfilesystem",
                                        "autoscalinggroup",
                                        "awsconfig",
                                        "distributedtable",
                                        "sshkeypair",
                                        "stacktemplate",
                                        "messagequeue",
                                        "distributedtablecluster",
                                        "workspace",
                                        "autoscalinglaunchconfiguration"
                                    ],
                                    "actions": [
                                        {
                                            "run_when_result_is": true,
                                            "config": {
                                                "message_text": "`{{event.resource.get_resource_type()}}` called `{{event.resource.get_resource_name()}}` in account `{{event.resource. get_organization_service_name()}}``.\\n---"
                                            },
                                            "name": "divvy.action.log_message"
                                        },
                                        {
                                            "run_when_result_is": true,
                                            "config": {},
                                            "name": "divvy.action.mark_non_compliant"
                                        },
                                        {
                                            "run_when_result_is": true,
                                            "config": {
                                                "project": "CS",
                                                "description": "Testing actions: \n`{{event.resource.get_resource_type()}}` called `{{event.resource.get_resource_name()}}` in account `{{event.resource. get_organization_service_name()}}``.\\n---",
                                                "skip_duplicates": true,
                                                "issue_type": "To Do",
                                                "summary": "Jira Task Test"
                                            },
                                            "name": "jira.action.create_task"
                                        }
                                    ],
                                    "filters": [
                                        {
                                            "config": {
                                                "hours": 48
                                            },
                                            "name": "divvy.filter.resource_recently_created_or_discovered"
                                        }
                                    ]
                                },
                                "source": null,
                                "insight_id": null,
                                "exemptions_count": null,
                                "notes": null,
                                "version": 1
                            },
                            {
                                "resource_id": "divvybot:1:697",
                                "name": "Action -- DB 1",
                                "description": "Create Database Instance Snapshot Start Database Instance Stop Database Instance",
                                "owner": "divvyuser:107:",
                                "owner_name": "John Doe",
                                "state": "PAUSED",
                                "event_failures": {
                                    "errors": 26,
                                    "timeouts": 0,
                                    "invalid_perms": 0
                                },
                                "valid": true,
                                "hookpoint_created": false,
                                "hookpoint_tags_modified": false,
                                "hookpoint_modified": false,
                                "hookpoint_destroyed": false,
                                "schedule": null,
                                "next_scheduled_run": null,
                                "creation_timestamp": "2017-11-15 13:29:56",
                                "modified_timestamp": "2019-11-19 16:27:02",
                                "category": "Security",
                                "severity": "low",
                                "detailed_logging": false,
                                "instructions": {
                                    "resource_types": [
                                        "dbinstance"
                                    ],
                                    "actions": [
                                        {
                                            "run_when_result_is": true,
                                            "config": {},
                                            "name": "divvy.action.mark_non_compliant"
                                        },
                                        {
                                            "run_when_result_is": true,
                                            "config": {
                                                "username": "Testing Actions -- DB1",
                                                "recipient_badge_keys": [],
                                                "recipient_tag_keys": [],
                                                "message": "This should be a database instance -> `{{event.resource.get_resource_type()}}`. Look for a snapshot and history of star-ting and sto-pping. \nIt is named  `{{event.resource.get_resource_name()}}`, lives in account `{{event.resource.get_organization_service_name()}}`,\n---",
                                                "channel": "#bot-testing",
                                                "skip_duplicates": true
                                            },
                                            "name": "slack.action.send_slack_message"
                                        },
                                        {
                                            "run_when_result_is": true,
                                            "config": {
                                                "hours": 0,
                                                "days": 6
                                            },
                                            "name": "divvy.action.set_backup_retention"
                                        },
                                        {
                                            "run_when_result_is": true,
                                            "config": {
                                                "hours": 0.1
                                            },
                                            "name": "divvy.action.create_db_instance_snapshot"
                                        },
                                        {
                                            "run_when_result_is": true,
                                            "config": {
                                                "hours": 0.2
                                            },
                                            "name": "divvy.action.stop_db_instance"
                                        },
                                        {
                                            "run_when_result_is": true,
                                            "config": {
                                                "hours": 0.4
                                            },
                                            "name": "divvy.action.start_db_instance"
                                        },
                                        {
                                            "run_when_result_is": true,
                                            "config": {},
                                            "name": "divvy.action.mark_region_noncompliant"
                                        }
                                    ],
                                    "filters": [
                                        {
                                            "config": {
                                                "regions_list": [
                                                    "us-east-2",
                                                    "eastus2",
                                                    "us-east4",
                                                    "us-west-1",
                                                    "us-west-2"
                                                ]
                                            },
                                            "name": "divvy.filter.resource_in_regions"
                                        }
                                    ]
                                },
                                "source": null,
                                "insight_id": null,
                                "exemptions_count": null,
                                "notes": null,
                                "version": 1
                            }
                        ],
                        "count": 1144
                    }
              schema:
                type: object
                properties:
                  bots:
                    type: array
                    items:
                      type: object
                      properties:
                        resource_id:
                          type: string
                          example: divvybot:1:696
                        name:
                          type: string
                          example: Action -- All Resources
                        description:
                          type: string
                          example: 'Bot testing these actions: Log Message Log To Syslog Mark Parent Cloud Noncompliant Mark Parent Region Noncompliant Mark Resource Noncompliant Send Delayed Email Send Slack Message'
                        owner:
                          type: string
                          example: 'divvyuser:107:'
                        owner_name:
                          type: string
                          example: John Doe
                        state:
                          type: string
                          example: PAUSED
                        event_failures: {}
                        valid:
                          type: boolean
                          example: true
                          default: true
                        hookpoint_created:
                          type: boolean
                          example: false
                          default: true
                        hookpoint_tags_modified:
                          type: boolean
                          example: false
                          default: true
                        hookpoint_modified:
                          type: boolean
                          example: false
                          default: true
                        hookpoint_destroyed:
                          type: boolean
                          example: false
                          default: true
                        schedule: {}
                        next_scheduled_run: {}
                        creation_timestamp:
                          type: string
                          example: '2017-11-15 11:08:58'
                        modified_timestamp:
                          type: string
                          example: '2019-08-06 18:54:10'
                        category:
                          type: string
                          example: Security
                        severity:
                          type: string
                          example: low
                        detailed_logging:
                          type: boolean
                          example: false
                          default: true
                        instructions:
                          type: object
                          properties:
                            resource_types:
                              type: array
                              items:
                                type: string
                                example: instance
                            actions:
                              type: array
                              items:
                                type: object
                                properties:
                                  run_when_result_is:
                                    type: boolean
                                    example: true
                                    default: true
                                  config:
                                    type: object
                                    properties:
                                      message_text:
                                        type: string
                                        example: '`{{event.resource.get_resource_type()}}` called `{{event.resource.get_resource_name()}}` in account `{{event.resource. get_organization_service_name()}}``.\n---'
                                  name:
                                    type: string
                                    example: divvy.action.log_message
                            filters:
                              type: array
                              items:
                                type: object
                                properties:
                                  config:
                                    type: object
                                    properties:
                                      hours:
                                        type: integer
                                        example: 48
                                        default: 0
                                  name:
                                    type: string
                                    example: divvy.filter.resource_recently_created_or_discovered
                        source: {}
                        insight_id: {}
                        exemptions_count: {}
                        notes: {}
                        version:
                          type: integer
                          example: 1
                          default: 0
                  count:
                    type: integer
                    example: 1144
                    default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/cloudtypes/list:
    get:
      summary: List Cloud Types
      description: List supported clouds with their type (public/private)
      operationId: list-cloud-types
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"clouds": [{"cloud_access": "public", "cloud_type_id": "AWS", "name": "Amazon Web Services"}, {"cloud_access": "public", "cloud_type_id": "AWS_GOV", "name": "Amazon Web Services (GovCloud)"}, {"cloud_access": "public", "cloud_type_id": "AZURE", "name": "Azure (Service Management)"}, {"cloud_access": "public", "cloud_type_id": "AZURE_ARM", "name": "Azure (ARM)"}, {"cloud_access": "public", "cloud_type_id": "DO", "name": "DigitalOcean"}, {"cloud_access": "public", "cloud_type_id": "GCE", "name": "Google Cloud Platform"}, {"cloud_access": "private", "cloud_type_id": "OS", "name": "OpenStack"}, {"cloud_access": "public", "cloud_type_id": "RAX", "name": "Rackspace"}, {"cloud_access": "public", "cloud_type_id": "SOFTLAYER", "name": "IBM SoftLayer"}, {"cloud_access": "private", "cloud_type_id": "VCLOUD_DIRECTOR", "name": "VMware vCloud Director"}, {"cloud_access": "private", "cloud_type_id": "VMWARE_VSPHERE", "name": "VMware vSphere"}]}'
              schema:
                type: object
                properties:
                  clouds:
                    type: array
                    items:
                      type: object
                      properties:
                        cloud_access:
                          type: string
                          example: public
                        cloud_type_id:
                          type: string
                          example: AWS
                        name:
                          type: string
                          example: Amazon Web Services
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/filter-registry:
    get:
      summary: Get Filter Registry
      description: ''
      operationId: get-filter-registry
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/badges/{resource_id}/update:
    post:
      summary: Update Cloud Badges
      description: Updates badges for a given cloud account or organization.
      operationId: update-cloud-badges
      parameters:
        - name: resource_id
          in: path
          description: The InsightCloudSec resource ID for a cloud account or organization. Use the [List Clouds](ref:list-clouds) endpoint to discover IDs.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                badges:
                  type: array
                  description: 'A list of badges (as key-value pair objects) to update. Any badges not sent with the request will be removed. *Note: System and auto-generated badges cannot be modified. See [Badges](doc:badges) for more information.*'
                  items:
                    properties:
                      key:
                        type: string
                        description: Key for the badge.
                      value:
                        type: string
                        description: Value for the badge.
                    type: object
            examples:
              Request Example:
                value:
                  badges:
                    - key: cloud
                      value: azure
                    - key: env
                      value: production
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/role/create:
    post:
      summary: Create Role
      description: Create a named permission definition.
      operationId: create-role
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"description": "Role defines permissions to scopes", "resource_id": "divvyrole:1:9", "manage": false, "cloud_scopes": [], "view": true, "groups": [], "all_permissions": false, "global_scope": false, "delete": false, "provision": false, "resource_group_scopes": [], "name": "Test Role"}'
              schema:
                type: object
                properties:
                  description:
                    type: string
                    example: Role defines permissions to scopes
                  resource_id:
                    type: string
                    example: divvyrole:1:9
                  manage:
                    type: boolean
                    example: false
                    default: true
                  cloud_scopes:
                    type: array
                  view:
                    type: boolean
                    example: true
                    default: true
                  groups:
                    type: array
                  all_permissions:
                    type: boolean
                    example: false
                    default: true
                  global_scope:
                    type: boolean
                    example: false
                    default: true
                  delete:
                    type: boolean
                    example: false
                    default: true
                  provision:
                    type: boolean
                    example: false
                    default: true
                  resource_group_scopes:
                    type: array
                  name:
                    type: string
                    example: Test Role
      deprecated: false
      requestBody:
        content:
          application/json:
            schema: {}
            examples:
              Request Example:
                value:
                  name: Test Role
                  description: Role defines permissions to scopes
                  all_permissions: false
                  view: true
                  provision: false
                  manage: false
                  delete: false
                  global_scope: false
  /public/instance/{instance_resource_id}/stop:
    post:
      summary: Stop Instance
      description: Execute a stop command against a particular instance.
      operationId: stop-instance
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/whitelabel/set-custom-logo:
    post:
      summary: Set Custom Logo
      description: ''
      operationId: set-custom-logo
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/domain/organizations/get:
    get:
      summary: List Organizations
      description: ''
      operationId: list-organizations
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/start:
    post:
      summary: Start Instance
      description: Execute a start command against a particular instance.
      operationId: start-instance
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/resourcegroup/create:
    post:
      summary: Create Resource Groups
      description: ''
      operationId: create-resource-groups
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                group_name:
                  type: string
                group_description:
                  type: string
                group_category:
                  type: string
            examples:
              Request Example:
                value:
                  group_name: Test Resource Group
                  group_description: Would you believe it's for grouping things?
                  group_category: system
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"category": "system", "description": "Would you believe it''s for grouping things?", "creation_time": "2017-10-25 13:36:59", "nested_resource_groups": [], "owner_type": "organization", "id": "resourcegroup:3:", "group_type": "user", "name": "Test Resource Group"}'
              schema:
                type: object
                properties:
                  category:
                    type: string
                    example: system
                  description:
                    type: string
                    example: Would you believe it's for grouping things?
                  creation_time:
                    type: string
                    example: '2017-10-25 13:36:59'
                  nested_resource_groups:
                    type: array
                  owner_type:
                    type: string
                    example: organization
                  id:
                    type: string
                    example: 'resourcegroup:3:'
                  group_type:
                    type: string
                    example: user
                  name:
                    type: string
                    example: Test Resource Group
      deprecated: false
  /public/privatenetwork/{privatenetwork_resource_id}/subnets/list:
    post:
      summary: List Subnets
      description: List the subnets within a particular network.
      operationId: list-subnets
      parameters:
        - name: privatenetwork_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {"subnets": [    {        "available_ips": 1234,        "network_resource_id": "privatenetwork:1:us-west-2:vpc-12121212:",        "availability_zone": "us-west-2c",        "subnet_id": "subnet-11111",        "network_id": "vpc-22222",        "common": {            "account": "My Account,            "resource_name": "subnet-11111",            "organization_service_id": 1,            "availability_zone": "us-west-2c",            "region": "us-west-2",            "resource_id": "privatesubnet:1:us-west-2:subnet-11111:",            "modified_timestamp": "2017-10-17 18:41:42",            "discovered_timestamp": "2017-10-17 18:41:42",            "cloud": "AWS",            "creation_timestamp": "None",            "properties": {                "property_list": []            },            "resource_type": "privatesubnet",            "noncompliance": []        },        "cidr": "000.11.2.2/33"    }, ]
                    }
      deprecated: false
  /public/dnszone/{dnszone_resource_id}/dnszonenetworks/list:
    post:
      summary: List DNS Zone Networks
      description: List the DNS Zone private networks.
      operationId: list-dns-zone-networks
      parameters:
        - name: dnszone_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/resource/{resource_id}/detail:
    get:
      summary: Detail Resource
      description: Get all of the details about a resource including its dependencies.
      operationId: detail-resource
      parameters:
        - name: resource_id
          in: path
          description: The InsightCloudSec resource ID.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {"dependencies": {
                            "privatenetwork": [
                                {
                                    "id": "vpc-abc123def",
                                    "name": "example-vpc",
                                    "resource_id": "privatenetwork:112:us-east-1:vpc-abc123def:",
                                    "type": "privatenetwork"
                                }
                            ],
                            "privatesubnet": [
                                {
                                    "id": "subnet-abc123def456ghi789",
                                    "name": "example-subnet",
                                    "resource_id": "privatesubnet:112:us-east-1:subnet-abc123def456ghi789:",
                                    "type": "privatesubnet"
                                },
                                {
                                    "id": "subnet-abc123def456ghi789",
                                    "name": "example-subnet-2",
                                    "resource_id": "privatesubnet:112:us-east-1:subnet-abc123def456ghi789:",
                                    "type": "privatesubnet"
                                }
                            ],
                            "serviceencryptionkey": [
                                {
                                    "id": "example-encryption-key-id",
                                    "name": "example-encryption-key",
                                    "resource_id": "serviceencryptionkey:763:us-east-1:example-encryption-key-id:",
                                    "type": "serviceencryptionkey"
                                }
                            ]
                        },
                        "details": {
                            "dbinstance": {
                                "backup_retention": 30,
                                "ca_cert": "example-ca-cert",
                                "common": {
                                    "account": "AWS IAR",
                                    "account_id": "123456789012",
                                    "account_status": "DEFAULT",
                                    "cloud": "AWS",
                                    "creation_timestamp": "2022-04-20 16:48:02",
                                    "direct_link": "https://console.aws.amazon.com/rds/home?region=us-east-1#database:id=example-database-id;is-cluster=false",
                                    "discovered_timestamp": "2022-04-20 17:29:08",
                                    "modified_timestamp": "2022-04-22 18:41:01",
                                    "namespace_id": "arn:aws:rds:us-east-1:123456789012:db:example-database-id",
                                    "noncompliance": [],
                                    "organization_service_id": 112,
                                    "properties": {
                                        "property_list": []
                                    },
                                    "region": "us-east-1",
                                    "resource_id": "dbinstance:112:us-east-1:example-database-id:",
                                    "resource_name": "example-database-name",
                                    "resource_type": "dbinstance",
                                    "tags": {
                                        "Name": "example-database-name"
                                    }
                                },
                                "copy_tags_to_snapshot": true,
                                "db_name": "divvy",
                                "deletion_protection": false,
                                "enabled_logging_types": "audit, error, slowquery",
                                "encrypted": true,
                                "endpoint_address": "example-database-name.us-east-1.rds.amazonaws.com",
                                "endpoint_port": 3306,
                                "engine": "mysql",
                                "engine_version": "5.7.33",
                                "enhanced_monitoring": true,
                                "iam_authentication": false,
                                "instance_id": "example-database-id",
                                "instance_type": "db.m5.xlarge",
                                "latest_restorable_time": "2022-04-22 18:35:00",
                                "master_username": "master-user",
                                "multi_az": true,
                                "network_resource_id": "privatenetwork:112:us-east-1:vpc-example1:",
                                "option_groups": "default:mysql-5-7",
                                "parameter_groups": "example-database-pg",
                                "publicly_accessible": true,
                                "state": "available",
                                "storage_size": 250,
                                "storage_type": "io1"
                            },
                            "metric_enabled": true,
                            "resource_type": "dbinstance"
                        }
                    }
              schema:
                type: object
                properties:
                  dependencies:
                    type: object
                    properties:
                      privatenetwork:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: vpc-abc123def
                            name:
                              type: string
                              example: example-vpc
                            resource_id:
                              type: string
                              example: 'privatenetwork:112:us-east-1:vpc-abc123def:'
                            type:
                              type: string
                              example: privatenetwork
                      privatesubnet:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: subnet-abc123def456ghi789
                            name:
                              type: string
                              example: example-subnet
                            resource_id:
                              type: string
                              example: 'privatesubnet:112:us-east-1:subnet-abc123def456ghi789:'
                            type:
                              type: string
                              example: privatesubnet
                      serviceencryptionkey:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: example-encryption-key-id
                            name:
                              type: string
                              example: example-encryption-key
                            resource_id:
                              type: string
                              example: 'serviceencryptionkey:763:us-east-1:example-encryption-key-id:'
                            type:
                              type: string
                              example: serviceencryptionkey
                  details:
                    type: object
                    properties:
                      dbinstance:
                        type: object
                        properties:
                          backup_retention:
                            type: integer
                            example: 30
                            default: 0
                          ca_cert:
                            type: string
                            example: example-ca-cert
                          common:
                            type: object
                            properties:
                              account:
                                type: string
                                example: AWS IAR
                              account_id:
                                type: string
                                example: '123456789012'
                              account_status:
                                type: string
                                example: DEFAULT
                              cloud:
                                type: string
                                example: AWS
                              creation_timestamp:
                                type: string
                                example: '2022-04-20 16:48:02'
                              direct_link:
                                type: string
                                example: https://console.aws.amazon.com/rds/home?region=us-east-1#database:id=example-database-id;is-cluster=false
                              discovered_timestamp:
                                type: string
                                example: '2022-04-20 17:29:08'
                              modified_timestamp:
                                type: string
                                example: '2022-04-22 18:41:01'
                              namespace_id:
                                type: string
                                example: arn:aws:rds:us-east-1:123456789012:db:example-database-id
                              noncompliance:
                                type: array
                              organization_service_id:
                                type: integer
                                example: 112
                                default: 0
                              properties:
                                type: object
                                properties:
                                  property_list:
                                    type: array
                              region:
                                type: string
                                example: us-east-1
                              resource_id:
                                type: string
                                example: 'dbinstance:112:us-east-1:example-database-id:'
                              resource_name:
                                type: string
                                example: example-database-name
                              resource_type:
                                type: string
                                example: dbinstance
                              tags:
                                type: object
                                properties:
                                  Name:
                                    type: string
                                    example: example-database-name
                          copy_tags_to_snapshot:
                            type: boolean
                            example: true
                            default: true
                          db_name:
                            type: string
                            example: divvy
                          deletion_protection:
                            type: boolean
                            example: false
                            default: true
                          enabled_logging_types:
                            type: string
                            example: audit, error, slowquery
                          encrypted:
                            type: boolean
                            example: true
                            default: true
                          endpoint_address:
                            type: string
                            example: example-database-name.us-east-1.rds.amazonaws.com
                          endpoint_port:
                            type: integer
                            example: 3306
                            default: 0
                          engine:
                            type: string
                            example: mysql
                          engine_version:
                            type: string
                            example: 5.7.33
                          enhanced_monitoring:
                            type: boolean
                            example: true
                            default: true
                          iam_authentication:
                            type: boolean
                            example: false
                            default: true
                          instance_id:
                            type: string
                            example: example-database-id
                          instance_type:
                            type: string
                            example: db.m5.xlarge
                          latest_restorable_time:
                            type: string
                            example: '2022-04-22 18:35:00'
                          master_username:
                            type: string
                            example: master-user
                          multi_az:
                            type: boolean
                            example: true
                            default: true
                          network_resource_id:
                            type: string
                            example: 'privatenetwork:112:us-east-1:vpc-example1:'
                          option_groups:
                            type: string
                            example: default:mysql-5-7
                          parameter_groups:
                            type: string
                            example: example-database-pg
                          publicly_accessible:
                            type: boolean
                            example: true
                            default: true
                          state:
                            type: string
                            example: available
                          storage_size:
                            type: integer
                            example: 250
                            default: 0
                          storage_type:
                            type: string
                            example: io1
                      metric_enabled:
                        type: boolean
                        example: true
                        default: true
                      resource_type:
                        type: string
                        example: dbinstance
      deprecated: false
  /public/volume/{volume_resource_id}/attach:
    post:
      summary: Attach Volume
      description: Attaches a network volume to an instance.
      operationId: attach-volume
      parameters:
        - name: volume_resource_id
          in: path
          schema:
            type: string
          required: true
        - name: instance_resource_id
          in: query
          schema:
            type: string
        - name: instance_mount_point
          in: query
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      requestBody:
        content:
          application/json:
            schema: {}
            examples:
              Request Example:
                value:
                  instance_resource_id: '{instance_resource_id}'
                  instance_mount_point: /dev/sdf
  /public/cache_instance/{instance_resource_id}/restart:
    post:
      summary: Restart Cache Instance
      description: Execute a restart command against a particular cache instance.
      operationId: restart-cache-instance
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/clouds/list:
    get:
      summary: List Clouds
      description: List available configured clouds.
      operationId: list-clouds
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/clouds/provisioning/list:
    get:
      summary: List Provisioning Clouds
      description: List available configured clouds
      operationId: list-provisioning-clouds
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/user/info:
    get:
      summary: User Info
      description: User info basic on X-Auth-Token session
      operationId: user-info
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/user/logout:
    post:
      summary: Logout
      description: Cancel current session
      operationId: logout
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/routetable/{routetable_resource_id}/routes/list:
    post:
      summary: List Routes
      description: Retrieves a list of routes associated with a route table
      operationId: list-routes
      parameters:
        - name: routetable_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-

                    Public
                     {
                      "routes": [
                        {
                          "target_id": "zhs-6d1efff8",
                          "target_type": "gateway",
                          "state": "active",
                          "common": {
                            "account": "Test Account",
                            "organization_service_id": 3,
                            "region": "ap-northeast-1",
                            "cloud": "Test Cloud",
                            "resource_id": "route:1:ap-northeast-1:rtb-55885e32:0.0.0.0%133G1:"
                          },
                          "route_table_id": "rtb-55885e32",
                          "cidr": "0.0.0.0/0"
                        }
                      ]
                    }
      deprecated: false
  /public/resourceaccesslist/{resource_access_list_resource_id}/rules/list:
    post:
      summary: List Resource Access List Rules
      description: ''
      operationId: list-resource-access-list-rules
      parameters:
        - name: resource_access_list_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                direction:
                  type: string
                rule_action:
                  type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "rules": [
                            {
                                "rule_action": "allow",
                                "direction": "ingress",
                                "ip_protocol": "all",
                                "source_network": "0.0.0.0/0",
                                "parent_resource_id": "resourceaccesslist:1:ap-northeast-1:acl-1234567:",
                                "source_port_specification": "0-65535",
                                "access_list": {
                                    "resource_name": "acl-1234567",
                                    "resource_id": "resourceaccesslist:1:ap-northeast-1:acl-1234567:"
                                },
                                "priority": 100,
                                "is_temporary": false,
                                "common": {
                                    "account": "Example Account",
                                    "resource_name": "acl-1234567",
                                    "organization_service_id": 1,
                                    "resource_id": "resourceaccesslistrule:1:ap-northeast-1:examplelistrulenumber:",
                                    "region": "ap-northeast-1",
                                    "modified_timestamp": "2017-10-17 18:38:24",
                                    "discovered_timestamp": "2017-10-17 18:38:24",
                                    "cloud": "AWS",
                                    "creation_timestamp": "None",
                                    "properties": {
                                        "property_list": [
                                            {
                                                "parent_resource_id": "resourceaccesslist:1:ap-northeast-1:acl-1234567:",
                                                "name": "divvy.subnet_associations",
                                                "value": "{\"privatesubnet:1:ap-northeast-1:subnet-2323232:\": \"aclassoc-12121212\", \"privatesubnet:1:ap-northeast-1:subnet-3434343:\": \"aclassoc-9898989\"}"
                                            }
                                        ]
                                    },
                                    "resource_type": "resourceaccesslistrule",
                                    "noncompliance": []
                                },
                                "access_list_type": "network_acl",
                                "properties": {
                                    "property_list": []
                                }
                            },
                        ]
                    }
      deprecated: false
  /public/privatenetwork/{private_network_resource_id}/routetables/list:
    post:
      summary: List Route Tables
      description: List the route tables within a particular network.
      operationId: list-route-tables
      parameters:
        - name: private_network_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "routetables": [
                        {
                          "network_resource_id": "privatenetwork:1:us-west-2:vpc-1111111111:",
                          "network_id": "vpc-111111111",
                          "vpc_association_id": "sampleassociationid",
                          "subnet_count": 0,
                          "common": {
                            "account": "Account #1",
                            "resource_name": "sampleresourcename",
                            "organization_service_id": 1,
                            "resource_id": "routetable:1:us-west-2:rtb-routetable:",
                            "region": "us-west-2",
                            "modified_timestamp": "2017-10-17 18:42:11",
                            "discovered_timestamp": "2017-10-17 18:42:11",
                            "cloud": "AWS",
                            "creation_timestamp": "None",
                            "properties": {
                              "property_list": []
                            },
                            "resource_type": "routetable",
                            "noncompliance": []
                          },
                          "route_table_id": "rtb-routetable",
                          "main": "Yes",
                          "route_count": 1,
                          "properties": {
                            "property_list": []
                          }
                        }
                      ]
                    }
              schema:
                type: object
                properties:
                  routetables:
                    type: array
                    items:
                      type: object
                      properties:
                        network_resource_id:
                          type: string
                          example: 'privatenetwork:1:us-west-2:vpc-1111111111:'
                        network_id:
                          type: string
                          example: vpc-111111111
                        vpc_association_id:
                          type: string
                          example: sampleassociationid
                        subnet_count:
                          type: integer
                          example: 0
                          default: 0
                        common:
                          type: object
                          properties:
                            account:
                              type: string
                              example: 'Account #1'
                            resource_name:
                              type: string
                              example: sampleresourcename
                            organization_service_id:
                              type: integer
                              example: 1
                              default: 0
                            resource_id:
                              type: string
                              example: 'routetable:1:us-west-2:rtb-routetable:'
                            region:
                              type: string
                              example: us-west-2
                            modified_timestamp:
                              type: string
                              example: '2017-10-17 18:42:11'
                            discovered_timestamp:
                              type: string
                              example: '2017-10-17 18:42:11'
                            cloud:
                              type: string
                              example: AWS
                            creation_timestamp:
                              type: string
                              example: None
                            properties:
                              type: object
                              properties:
                                property_list:
                                  type: array
                            resource_type:
                              type: string
                              example: routetable
                            noncompliance:
                              type: array
                        route_table_id:
                          type: string
                          example: rtb-routetable
                        main:
                          type: string
                          example: 'Yes'
                        route_count:
                          type: integer
                          example: 1
                          default: 0
                        properties:
                          type: object
                          properties:
                            property_list:
                              type: array
      deprecated: false
  /public/cache_instance/{instance_resource_id}/terminate:
    post:
      summary: Terminate Cache Instance
      description: Execute a terminate command against a particular cache instance.
      operationId: terminate-cache-instance
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/resize/revert:
    post:
      summary: Revert Instance Resize
      description: Revert a resize request which is currently in progress. This will roll back to the instance size/flavor that was previously used.
      operationId: revert-instance-resize
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/cloud/{cloud_resource_id}/delete:
    post:
      summary: Delete Cloud
      description: Delete a cloud account. This flips the cloud account status to delete and schedules a job to clean up all resources, properties, etc.
      operationId: delete-cloud
      parameters:
        - name: cloud_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/terminate:
    post:
      summary: Terminate Instance
      description: Execute a terminate command against a particular instance.
      operationId: terminate-instance
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/restart:
    post:
      summary: Restart Instance
      description: Execute a restart command against a particular instance. Will not work on an instance in the "stopped" state.
      operationId: restart-instance
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/resize/confirm:
    post:
      summary: Confirm Instance Resize
      description: Confirm a resize request which is currently in progress. If a resize request is not explicitly confirmed or reverted it's automatically confirmed after 24 hours.
      operationId: confirm-instance-resize
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/network_interfaces/list:
    post:
      summary: List Instance Network Interfaces
      description: List the network interfaces currently attached to an instance.
      operationId: list-instance-network-interfaces
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/snapshot/create:
    post:
      summary: Create Image Snapshot
      description: Create a image based off of an existing instance. Not implemented by Amazon.
      operationId: create-image-snapshot
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
            examples:
              Request Example:
                value:
                  name: Example Snapshot Name
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/publicip/attach:
    post:
      summary: Attach Public IP to Instance
      description: Associate an elastic/public IP with a particular instance.
      operationId: attach-public-ip-to-instance
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                publicip_resource_id:
                  type: string
            examples:
              Request Example:
                value:
                  publicip_resource_id: 'publicip:1:us-east-1:54.175.17.213:'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/get_console_output:
    post:
      summary: Get Console Output
      description: ''
      operationId: get-console-output
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/list:
    get:
      summary: List Insights
      description: Returns a list of all InsightCloudSec and custom Insights.
      operationId: list-insights
      parameters:
        - name: detail
          in: query
          description: If `true`, provides additional detail about the Insight in the response.
          schema:
            type: boolean
            default: true
        - name: labels
          in: query
          description: '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`.*'
          schema:
            type: string
        - name: pack_ids
          in: query
          description: Comma-separated list of pack IDs in the format of `<pack-type>:<id>`. Pack type can be `backoffice` (for InsightCloudSec authored Insight Packs) or `custom` (for user authored Insight Packs).
          schema:
            type: string
        - name: resource_types
          in: query
          description: Comma-separated list of resource types, e.g., `storagecontainer`, `webapp`, `instance`, etc.
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    [
                      {
                        "scopes": [],
                        "timeseries": true,
                        "tags": [
                          "best practices",
                          "high availability"
                        ],
                        "severity": 1,
                        "timeseries_cache": 0,
                        "organization_id": 1,
                        "filters": [
                          {
                            "config": {},
                            "name": "divvy.filter.database_instance_multi_az"
                          }
                        ],
                        "owner_resource_id": null,
                        "resource_types": [
                          "dbinstance"
                        ],
                        "name": "Database Instance Not Multi-AZ",
                        "insight_id": 2,
                        "description": "Identify databases that are not configured across multiple availablity zones for resiliency",
                        "template_id": 2
                      },
                      {
                        "scopes": [],
                        "timeseries": true,
                        "tags": [
                          "pci",
                          "best practices",
                          "security",
                          "cis controls",
                          "hipaa"
                        ],
                        "severity": 4,
                        "timeseries_cache": 0,
                        "organization_id": 1,
                        "filters": [
                          {
                            "config": {
                              "ignore_disabled": false
                            },
                            "name": "divvy.filter.cloud_with_no_service_users"
                          }
                        ],
                        "owner_resource_id": null,
                        "resource_types": [
                          "divvyorganizationservice"
                        ],
                        "name": "Cloud Account Without Service Users",
                        "insight_id": 3,
                        "description": "Identify accounts without any active user accounts.",
                        "template_id": 13
                      }
                    ]
              schema:
                type: array
                items:
                  type: object
                  properties:
                    scopes:
                      type: array
                    timeseries:
                      type: boolean
                      example: true
                      default: true
                    tags:
                      type: array
                      items:
                        type: string
                        example: best practices
                    severity:
                      type: integer
                      example: 1
                      default: 0
                    timeseries_cache:
                      type: integer
                      example: 0
                      default: 0
                    organization_id:
                      type: integer
                      example: 1
                      default: 0
                    filters:
                      type: array
                      items:
                        type: object
                        properties:
                          config:
                            type: object
                            properties: {}
                          name:
                            type: string
                            example: divvy.filter.database_instance_multi_az
                    owner_resource_id: {}
                    resource_types:
                      type: array
                      items:
                        type: string
                        example: dbinstance
                    name:
                      type: string
                      example: Database Instance Not Multi-AZ
                    insight_id:
                      type: integer
                      example: 2
                      default: 0
                    description:
                      type: string
                      example: Identify databases that are not configured across multiple availablity zones for resiliency
                    template_id:
                      type: integer
                      example: 2
                      default: 0
      deprecated: false
  /public/instance/{instance_resource_id}/publicip/detach:
    post:
      summary: Detach Primary Public IP
      description: Detach the primary public IP from an instance (bound to device_index 0).
      operationId: detach-primary-public-ip
      parameters:
        - name: instance_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/networkinterface/{networkinterface}/instance/attach:
    post:
      summary: Attach Network Interface
      description: Attach a network interface to an instance.
      operationId: attach-network-interface
      parameters:
        - name: networkinterface
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                instance_resource_id:
                  type: string
                device_index:
                  type: integer
                  format: int32
            examples:
              Request Example:
                value:
                  instance_resource_id: 'instance:24:us-east-2:i-00a5d6b71d24c18fc:'
                  device_index: 1
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/{insight_id}/{insight_source}:
    get:
      summary: Get Insight
      description: ''
      operationId: get-insight
      parameters:
        - name: insight_id
          in: path
          schema:
            type: string
          required: true
        - name: insight_source
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "scopes": [],
                      "timeseries": true,
                      "tags": [
                        "security",
                        "cis controls",
                        "password policy"
                      ],
                      "severity": 2,
                      "timeseries_cache": 0,
                      "organization_id": 1,
                      "filters": [
                        {
                          "config": {
                            "password_age": 90
                          },
                          "name": "sample.query.cloud_max_password_age"
                        }
                      ],
                      "owner_resource_id": "",
                      "resource_types": [
                        "sampleresourcetypes"
                      ],
                      "name": "Cloud Account Password Policy Maximum Age (90 Days)",
                      "insight_id": 5,
                      "description": "Identify cloud accounts which do not require special characters in the password",
                      "template_id": 100
                    }
              schema:
                type: object
                properties:
                  scopes:
                    type: array
                  timeseries:
                    type: boolean
                    example: true
                    default: true
                  tags:
                    type: array
                    items:
                      type: string
                      example: security
                  severity:
                    type: integer
                    example: 2
                    default: 0
                  timeseries_cache:
                    type: integer
                    example: 0
                    default: 0
                  organization_id:
                    type: integer
                    example: 1
                    default: 0
                  filters:
                    type: array
                    items:
                      type: object
                      properties:
                        config:
                          type: object
                          properties:
                            password_age:
                              type: integer
                              example: 90
                              default: 0
                        name:
                          type: string
                          example: sample.query.cloud_max_password_age
                  owner_resource_id:
                    type: string
                    example: ''
                  resource_types:
                    type: array
                    items:
                      type: string
                      example: sampleresourcetypes
                  name:
                    type: string
                    example: Cloud Account Password Policy Maximum Age (90 Days)
                  insight_id:
                    type: integer
                    example: 5
                    default: 0
                  description:
                    type: string
                    example: Identify cloud accounts which do not require special characters in the password
                  template_id:
                    type: integer
                    example: 100
                    default: 0
      deprecated: false
  /public/insights/create:
    post:
      summary: Create Insight
      description: Creates new Insight.
      operationId: create-insight
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                RAW_BODY:
                  type: string
                  format: json
            examples:
              Request Example:
                value:
                  name: Cloud Account Without Global API Accounting Config
                  description: Identify accounts without API Accounting Config, such as AWS CloudTrail, enabled across all regions
                  resource_types:
                    - divvyorganizationservice
                  filters:
                    - name: divvy.filter.cloud_trail_in_all_regions
                      config: {}
                      collections: {}
                  scopes: []
                  severity: 1
                  owner_resource_id: null
                  template_id: null
                  tags: null
                  badges: null
                  badge_filter_operator: null
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/{insight_id}/{source}/insight-data-7-days:
    get:
      summary: Insight Data 7 Days
      description: |-
        Provide the integer insight_id and the string source (backoffice or custom) to identify the insight. Returns a list of history records showing the counts and totals of resources matching the insight.

        Both insight_id and source keys are present in each insight payload in list and get calls for insights.
      operationId: insight-data-7-days
      parameters:
        - name: insight_id
          in: path
          schema:
            type: string
          required: true
        - name: source
          in: path
          schema:
            type: string
            default: back_office
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/packs/list:
    get:
      summary: List Packs
      description: Returns a list of insights in packs
      operationId: list-packs
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/{insight_id}/delete:
    delete:
      summary: Delete Insight
      description: ''
      operationId: delete-insight
      parameters:
        - name: insight_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/{insight_id}/edit:
    post:
      summary: Edit Insight
      description: ''
      operationId: edit-insight
      parameters:
        - name: insight_id
          in: path
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      requestBody:
        content:
          application/json:
            schema: {}
            examples:
              Request Example:
                value:
                  description: Identify cloud accounts which do not require special characters in the password
                  filters:
                    - name: divvy.query.cloud_max_password_age
                      config:
                        password_age: 90
                  name: Cloud Account Password Policy Maximum Age (90 Days)
                  owner_resource_id: ''
                  resource_types:
                    - divvyorganizationservice
                  scopes: []
                  selects: []
                  severity: 4
                  tags:
                    - security
                    - cis controls
                    - password policy
                  template_id: 95
                  timeseries: true
  /public/insights/{insight_id}/timeseries/toggle:
    post:
      summary: Toggle Insight Timeseries
      description: ''
      operationId: toggle-insight-timeseries
      parameters:
        - name: insight_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      requestBody:
        content:
          application/json:
            schema: {}
            examples:
              Request Example:
                value:
                  insights:
                    - description: Identify cloud accounts which do not require special characters in the password
                      filters:
                        - name: divvy.query.cloud_max_password_age
                          config:
                            password_age: 90
                      name: Cloud Account Password Policy Maximum Age (90 Days)
                      owner_resource_id: ''
                      resource_types:
                        - divvyorganizationservice
                      scopes: []
                      selects: []
                      severity: 4
                      tags:
                        - security
                        - cis controls
                        - password policy
                      template_id: 95
                      timeseries: true
                    - description: Identify all AWS Cloud Accounts
                      filters:
                        - name: divvy.query.sample_filter
                          config: {}
                      name: AWS Cloud Accounts
                      owner_resource_id: ''
                      resource_types:
                        - divvyorganizationservice
                      scopes: []
                      selects: []
                      severity: 2
                      tags:
                        - security
                        - cis controls
                        - password policy
                      template_id: 90
                      timeseries: true
  /public/insights/insights/counts/refresh:
    get:
      summary: Refresh Insight Counts
      description: Refreshes the resource counts for all Insights.
      operationId: refresh-insight-counts
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/bulk/delete:
    post:
      summary: Bulk Delete
      description: ''
      operationId: bulk-delete
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                insights:
                  type: string
            examples:
              Request Example:
                value:
                  insights:
                    - 4
                    - 5
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/edit_metadata:
    post:
      summary: Edit Metadata
      description: Edit custom metadata associated with a resource
      operationId: edit-metadata
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                backoffice:
                  type: string
                custom:
                  type: integer
                  format: int32
                pack_id:
                  type: string
                metadata:
                  type: string
            examples:
              Request Example:
                value:
                  backoffice: []
                  custom:
                    - 16
                  pack_id: custom:2
                  metadata: CentOS v7.5.1804
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/bulk/create:
    post:
      summary: Create Bulk
      description: ''
      operationId: create-bulk
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      requestBody:
        content:
          application/json:
            schema: {}
            examples:
              Request Example:
                value:
                  insights:
                    - description: Identify cloud accounts which do not require special characters in the password
                      filters:
                        - name: divvy.query.cloud_max_password_age
                          config:
                            password_age: 90
                      name: Cloud Account Password Policy Maximum Age (90 Days)
                      owner_resource_id: ''
                      resource_types:
                        - divvyorganizationservice
                      scopes: []
                      selects: []
                      severity: 4
                      tags:
                        - security
                        - cis controls
                        - password policy
                      template_id: 95
                      timeseries: true
                    - description: Identify all AWS Cloud Accounts
                      filters:
                        - name: divvy.query.sample_filter
                          config: {}
                      name: AWS Cloud Accounts
                      owner_resource_id: ''
                      resource_types:
                        - divvyorganizationservice
                      scopes: []
                      selects: []
                      severity: 2
                      tags:
                        - security
                        - cis controls
                        - password policy
                      template_id: 90
                      timeseries: true
  /public/user/tfa_enable:
    post:
      summary: 2FA Enable
      description: Enable two-factor Auth for current X-Auth-Token session user.
      operationId: 2fa-enable
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                    "otp_secret":"ROPZWJLCGADDRISM"
                    }
              schema:
                type: object
                properties:
                  otp_secret:
                    type: string
                    example: ROPZWJLCGADDRISM
      deprecated: false
  /public/users/list:
    get:
      summary: User List
      description: List of current active users
      operationId: user-list
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/user/tfa_state:
    post:
      summary: 2FA status Session
      description: Determine whether two-factor authentication is enabled and/or required for the current user or, if the current user is an admin, for any arbitrary user given by user_id.
      operationId: 2fa-status-session
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: integer
                  format: int32
            examples:
              Request Example:
                value:
                  user_id: 6
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/user/{user_resource_id}/delete:
    delete:
      summary: Delete User
      description: Remove an existing non-Admin user from InsightCloudSec.
      operationId: delete-user
      parameters:
        - name: user_resource_id
          in: path
          description: The InsightCloudSec resource ID for the user.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/volume/{volume_resource_id}/modify:
    post:
      summary: Modify Volume
      description: Schedule the modification of a volume resource
      operationId: modify-volume
      parameters:
        - name: volume_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                iops:
                  type: integer
                  format: int32
                size:
                  type: integer
                  format: int32
                volume_type:
                  type: string
            examples:
              Request Example:
                value:
                  iops: 1
                  size: 4
                  volume_type: io1
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/user/tfa_disable:
    post:
      summary: 2FA Disable by User
      description: Disable two-factor Auth for the selected user..
      operationId: 2fa-disable
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: integer
                  format: int32
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                    "success":true
                    }
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    default: true
      deprecated: false
  /public/role/{role_resource_id}/update:
    post:
      summary: Update Role
      description: |-
        Update Role definition.

        It's important to note that All permission, the api endpoint does not automatically set view, provision, manage, or delete to false. This means in the UI you will see all values selected. It has no negative effect but does make the presentation of the data less clear to end users.

        Consider this and the create endpoints to be explicit APIs that require the exact permission rules you desire.
      operationId: update-role
      parameters:
        - name: role_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                all_permissions:
                  type: boolean
                view:
                  type: boolean
                provision:
                  type: boolean
                manage:
                  type: string
                delete:
                  type: boolean
                global_scope:
                  type: boolean
            examples:
              Request Example:
                value:
                  name: Test Role
                  description: Role defines permissions to scopes
                  all_permissions: true
                  view: false
                  provision: false
                  manage: false
                  delete: false
                  global_scope: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/volume/{volume_resource_id}/detach:
    post:
      summary: Detach Volume
      description: Detaches a volume from an instance.
      operationId: detach-volume
      parameters:
        - name: volume_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/roles/list:
    post:
      summary: List Roles
      description: |-
        List all roles user has accesss to view

        Requires Organization Admin
      operationId: list-roles
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "roles": [
                        {
                          "description": "Basic user role.",
                          "resource_id": "divvyrole:1:5",
                          "manage": true,
                          "cloud_scopes": [
                            "divvyorganizationservice:2",
                            "divvyorganizationservice:3"
                          ],
                          "view": true,
                          "groups": [
                            "divvyusergroup:5",
                            "divvyusergroup:10"
                          ],
                          "all_permissions": false,
                          "global_scope": false,
                          "delete": false,
                          "provision": true,
                          "resource_group_scopes": [
                            "resourcegroup:2:"
                          ],
                          "name": "basicRole"
                        },
                        {
                          "description": "Role defines permissions to scopes",
                          "resource_id": "divvyrole:1:9",
                          "manage": false,
                          "cloud_scopes": [],
                          "view": false,
                          "groups": [],
                          "all_permissions": true,
                          "global_scope": false,
                          "delete": false,
                          "provision": false,
                          "resource_group_scopes": [],
                          "name": "Test Role"
                        }
                      ]
                    }
              schema:
                type: object
                properties:
                  roles:
                    type: array
                    items:
                      type: object
                      properties:
                        description:
                          type: string
                          example: Basic user role.
                        resource_id:
                          type: string
                          example: divvyrole:1:5
                        manage:
                          type: boolean
                          example: true
                          default: true
                        cloud_scopes:
                          type: array
                          items:
                            type: string
                            example: divvyorganizationservice:2
                        view:
                          type: boolean
                          example: true
                          default: true
                        groups:
                          type: array
                          items:
                            type: string
                            example: divvyusergroup:5
                        all_permissions:
                          type: boolean
                          example: false
                          default: true
                        global_scope:
                          type: boolean
                          example: false
                          default: true
                        delete:
                          type: boolean
                          example: false
                          default: true
                        provision:
                          type: boolean
                          example: true
                          default: true
                        resource_group_scopes:
                          type: array
                          items:
                            type: string
                            example: 'resourcegroup:2:'
                        name:
                          type: string
                          example: basicRole
      deprecated: false
  /public/roles/{role_resource_id}/groups/update:
    get:
      summary: Update Role's User Groups
      description: |-
        Associate and Disassociate User groups from a role.

        Params: Body

        group_resource_ids: Resource IDs to add to the role's UserGroups. Compared with current User Groups set; additional ids are added, missing ids removed.

        Requires Organization Admin
      operationId: update-roles-user-groups
      parameters:
        - name: role_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                group_resource_ids:
                  type: string
                  default: divvyusergroup:10
            examples:
              Request Example:
                value:
                  group_resource_ids:
                    - divvyusergroup:10
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/groups/list:
    get:
      summary: List Groups
      description: |-
        Lists available basic user groups.

        *Requires Domain or Organization Admin permissions*
      operationId: list-groups
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "groups": [
                        {
                          "group_id": 2, 
                          "resource_id": "divvyusergroup:2", 
                          "name": "Basic User Group", 
                          "users": 1, 
                          "roles": 1, 
                          "entitlements_configured": true
                        }
                      ]
                    }
              schema:
                type: object
                properties:
                  groups:
                    type: array
                    items:
                      type: object
                      properties:
                        group_id:
                          type: integer
                          example: 2
                          default: 0
                        resource_id:
                          type: string
                          example: divvyusergroup:2
                        name:
                          type: string
                          example: Basic User Group
                        users:
                          type: integer
                          example: 1
                          default: 0
                        roles:
                          type: integer
                          example: 1
                          default: 0
                        entitlements_configured:
                          type: boolean
                          example: true
                          default: true
      deprecated: false
  /public/roles/{role_resource_id}/scope/update:
    post:
      summary: Update Role Scope; Clouds & Resource Groups
      description: |-
        Define what resources the role applies to by specifying Clouds (OrganizationServices) and/or ResourceGroups. Use for both Adding and Removing scopes from a role.

        Params: Body

        resource_ids: Resource IDs to add to the role scope.

        deprecated_resource_ids: Resource IDs to remove from the role scope.

        Requires Organization Admin
      operationId: update-role-scope-clouds-resource-groups
      parameters:
        - name: role_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_ids:
                  type: array
                  default:
                    - <resource_id>
                  items:
                    type: string
                deprecated_resource_ids:
                  type: array
                  default:
                    - <deprecated_resource_id>
                  items:
                    type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/group/{group_resource_id}/user/remove:
    post:
      summary: Remove User from Group
      description: |-
        Remove user from User Group

        Requires Modify permissions
      operationId: remove-user-from-group
      parameters:
        - name: group_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_resource_id:
                  type: string
            examples:
              Request Example:
                value:
                  user_resource_id: 'divvyuser:6:'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                    "group":{
                    "resource_id":"divvyusergroup:26"
                    "group_id":26
                    "users":[]
                    "roles":[]
                    "name":"boatface"
                    }
                    }
      deprecated: false
  /prototype/group/{group_resource_id}/delete:
    delete:
      summary: Delete Group
      description: |-
        Delete User group

        Requires Org admin permissions
      operationId: delete-group
      parameters:
        - name: group_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/group/create:
    post:
      summary: Create Group
      description: |-
        Create new user group

        Requires Org admin permission
      operationId: create-group
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                group_name:
                  type: string
            examples:
              Request Example:
                value:
                  group_name: Test UserGroup
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/group/{group_resource_id}/users/update:
    post:
      summary: Update Group Users
      description: |-
        Updates the entire User group

        Requires Org admin permissions
      operationId: update-group-users
      parameters:
        - name: group_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_resource_ids:
                  type: array
                  items:
                    type: string
            examples:
              Request Example:
                value:
                  user_resource_ids:
                    - 'divvyuser:6:'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                    "group":{
                    "resource_id":"divvyusergroup:26"
                    "group_id":26
                    "users":[
                    0:{
                    "username":"boatface"
                    "two_factor_enabled":false
                    "user_id":24
                    "name":"apitest2"
                    "resource_id":"divvyuser:24:"
                    "navigation_blacklist":[]
                    "two_factor_required":false
                    "organization_name":"Default Organization"
                    "domain_admin":false
                    "email_address":"boat@boatface.com"
                    "organization_admin":false
                    }
                    ]
                    "roles":[]
                    "name":"BoatFace"
                    }
                    }
      deprecated: false
  /public/botfactory/{bot_id}/ondemand:
    post:
      summary: Run Bot On Demand
      description: Runs a Bot on demand, which will apply the filters and actions to all resources within the scope of the bot.
      operationId: run-bot-ondemand
      parameters:
        - name: bot_id
          in: path
          description: 'The ID for the bot. For example: `divvybot:1:123`.'
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                silent_mode:
                  type: boolean
                  description: When enabled, Slack and Microsoft Teams notification actions will not be executed.
            examples:
              Request Example:
                value:
                  silent_mode: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/botfactory/{bot_id}/get:
    post:
      summary: Get Bot
      description: Fetch existing Bot's information using the ID.
      operationId: get-bot
      parameters:
        - name: bot_id
          in: path
          description: 'The ID for the bot. For example: `divvybot:1:123`.'
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "resource_id": "divvybot:1:1",
                        "name": "Database Instance Publicly Accessible",
                        "description": "Identify SQL Server instances which allow public access from the internet",
                        "notes": null,
                        "insight_id": null,
                        "source": "backoffice",
                        "insight_name": null,
                        "owner": "divvyuser:1:",
                        "owner_name": "sampleuser",
                        "state": "PAUSED",
                        "date_created": "2019-07-26 19:58:30",
                        "date_modified": "2020-01-21 18:51:38",
                        "category": "Security",
                        "badge_scope_operator": "OR",
                        "instructions": {
                            "resource_types": [
                                "dbinstance"
                            ],
                            "filters": [
                                {
                                    "config": {},
                                    "name": "divvy.query.database_instance_public_access"
                                },
                                {
                                    "config": {
                                        "states": [
                                            "available"
                                        ]
                                    },
                                    "name": "divvy.filter.instance_state"
                                }
                            ],
                            "actions": [
                                {
                                    "run_when_result_is": true,
                                    "config": {},
                                    "name": "divvy.action.mark_non_compliant"
                                },
                                {
                                    "run_when_result_is": true,
                                    "config": {
                                        "username": "Stop Public RDS",
                                        "recipient_badge_keys": [],
                                        "recipient_tag_keys": [],
                                        "message": "{{event.resource.get_resource_name()}} was detected in the {{event.resource.get_organization_service_name()}} account.   \\n\\nMore Details:\\n```{{resource.serialize(indent=2)}}```\n\n*RDS Instance _{{resource.get_resource_name()}}_ is publicly accessible.*\\n>*Account:* `{{resource.get_organization_service_name()}}`\\n>*Region:* `{{resource.region_name}}`\\n>*Priority:* `High`\\n>*Recommended Action:* Redeploy Instance with  Public Accessibility set to No.  This DB instance will be stopped automatically.",
                                        "channel": "samplechannel",
                                        "skip_duplicates": false
                                    },
                                    "name": "slack.action.send_slack_message"
                                },
                                {
                                    "run_when_result_is": true,
                                    "config": {
                                        "hours": 0
                                    },
                                    "name": "divvy.action.stop_db_instance"
                                }
                            ],
                            "groups": [],
                            "badges": [
                                {
                                    "key": "owner",
                                    "value": "sampleuser@divvycloud.com"
                                },
                                {
                                    "key": "system.cloud_type",
                                    "value": "amazon web services"
                                }
                            ],
                            "hookpoints": [
                                "divvycloud.resource.created",
                                "divvycloud.resource.modified"
                            ],
                            "schedule": "\"{\\\"_type\\\": \\\"Hourly\\\", \\\"minute_of_hour\\\": 15, \\\"second_of_hour\\\": 0}\"",
                            "schedule_description": "\"{\\\"_type\\\": \\\"Hourly\\\", \\\"minute_of_hour\\\": 15, \\\"second_of_hour\\\": 0}\""
                        },
                        "valid": true,
                        "errors": [],
                        "severity": "low",
                        "detailed_logging": false,
                        "scope": []
                    }
              schema:
                type: object
                properties:
                  resource_id:
                    type: string
                    example: divvybot:1:1
                  name:
                    type: string
                    example: Database Instance Publicly Accessible
                  description:
                    type: string
                    example: Identify SQL Server instances which allow public access from the internet
                  notes: {}
                  insight_id: {}
                  source:
                    type: string
                    example: backoffice
                  insight_name: {}
                  owner:
                    type: string
                    example: 'divvyuser:1:'
                  owner_name:
                    type: string
                    example: sampleuser
                  state:
                    type: string
                    example: PAUSED
                  date_created:
                    type: string
                    example: '2019-07-26 19:58:30'
                  date_modified:
                    type: string
                    example: '2020-01-21 18:51:38'
                  category:
                    type: string
                    example: Security
                  badge_scope_operator:
                    type: string
                    example: OR
                  instructions:
                    type: object
                    properties:
                      resource_types:
                        type: array
                        items:
                          type: string
                          example: dbinstance
                      filters:
                        type: array
                        items:
                          type: object
                          properties:
                            config:
                              type: object
                              properties: {}
                            name:
                              type: string
                              example: divvy.query.database_instance_public_access
                      actions:
                        type: array
                        items:
                          type: object
                          properties:
                            run_when_result_is:
                              type: boolean
                              example: true
                              default: true
                            config:
                              type: object
                              properties: {}
                            name:
                              type: string
                              example: divvy.action.mark_non_compliant
                      groups:
                        type: array
                      badges:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              example: owner
                            value:
                              type: string
                              example: sampleuser@divvycloud.com
                      hookpoints:
                        type: array
                        items:
                          type: string
                          example: divvycloud.resource.created
                      schedule:
                        type: string
                        example: '"{\"_type\": \"Hourly\", \"minute_of_hour\": 15, \"second_of_hour\": 0}"'
                      schedule_description:
                        type: string
                        example: '"{\"_type\": \"Hourly\", \"minute_of_hour\": 15, \"second_of_hour\": 0}"'
                  valid:
                    type: boolean
                    example: true
                    default: true
                  errors:
                    type: array
                  severity:
                    type: string
                    example: low
                  detailed_logging:
                    type: boolean
                    example: false
                    default: true
                  scope:
                    type: array
      deprecated: false
  /prototype/group/{group_resource_id}/users/list:
    post:
      summary: List Users in User Group
      description: ''
      operationId: list-users-in-user-group
      parameters:
        - name: group_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "users": [
                        {
                          "username": "chefec2",
                          "two_factor_enabled": false,
                          "user_id": 6,
                          "name": "Chef Estrada",
                          "resource_id": "divvyuser:6:",
                          "two_factor_required": false,
                          "organization_name": "Default Organization",
                          "domain_admin": false,
                          "email_address": "chef.ec2@divvycloud.com",
                          "organization_admin": true
                        }
                      ]
                    }
              schema:
                type: object
                properties:
                  users:
                    type: array
                    items:
                      type: object
                      properties:
                        username:
                          type: string
                          example: chefec2
                        two_factor_enabled:
                          type: boolean
                          example: false
                          default: true
                        user_id:
                          type: integer
                          example: 6
                          default: 0
                        name:
                          type: string
                          example: Chef Estrada
                        resource_id:
                          type: string
                          example: 'divvyuser:6:'
                        two_factor_required:
                          type: boolean
                          example: false
                          default: true
                        organization_name:
                          type: string
                          example: Default Organization
                        domain_admin:
                          type: boolean
                          example: false
                          default: true
                        email_address:
                          type: string
                          example: chef.ec2@divvycloud.com
                        organization_admin:
                          type: boolean
                          example: true
                          default: true
      deprecated: false
  /prototype/group/{group_resource_id}/roles/update:
    post:
      summary: Update Roles in User Group
      description: Update the roles associated with a User Group. This takes in a list of role resource ID strings. Requires Org Admin
      operationId: update-roles-in-user-group
      parameters:
        - name: group_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_ids:
                  type: array
                  default:
                    - divvyrole:1:5
                  items:
                    type: string
            examples:
              Request Example:
                value:
                  resource_ids:
                    - divvyrole:1:5
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "group": {
                        "resource_id": "divvyusergroup:10",
                        "group_id": 10,
                        "users": [
                          {
                            "username": "chefec2",
                            "two_factor_enabled": false,
                            "user_id": 6,
                            "name": "Chef Estrada",
                            "resource_id": "divvyuser:6:",
                            "two_factor_required": false,
                            "organization_name": "Default Organization",
                            "domain_admin": false,
                            "email_address": "chef.ec2@divvycloud.com",
                            "organization_admin": true
                          }
                        ],
                        "roles": [
                          {
                            "description": "Basic User priveleges.",
                            "resource_id": "divvyrole:1:5",
                            "manage": true,
                            "cloud_scopes": [
                              "divvyorganizationservice:2",
                              "divvyorganizationservice:3"
                            ],
                            "view": true,
                            "groups": [
                              "divvyusergroup:5",
                              "divvyusergroup:10"
                            ],
                            "all_permissions": false,
                            "global_scope": false,
                            "delete": false,
                            "provision": true,
                            "resource_group_scopes": [
                              "resourcegroup:2:"
                            ],
                            "name": "basicRole"
                          }
                        ],
                        "name": "Test UserGroup"
                      }
                    }
              schema:
                type: object
                properties:
                  group:
                    type: object
                    properties:
                      resource_id:
                        type: string
                        example: divvyusergroup:10
                      group_id:
                        type: integer
                        example: 10
                        default: 0
                      users:
                        type: array
                        items:
                          type: object
                          properties:
                            username:
                              type: string
                              example: chefec2
                            two_factor_enabled:
                              type: boolean
                              example: false
                              default: true
                            user_id:
                              type: integer
                              example: 6
                              default: 0
                            name:
                              type: string
                              example: Chef Estrada
                            resource_id:
                              type: string
                              example: 'divvyuser:6:'
                            two_factor_required:
                              type: boolean
                              example: false
                              default: true
                            organization_name:
                              type: string
                              example: Default Organization
                            domain_admin:
                              type: boolean
                              example: false
                              default: true
                            email_address:
                              type: string
                              example: chef.ec2@divvycloud.com
                            organization_admin:
                              type: boolean
                              example: true
                              default: true
                      roles:
                        type: array
                        items:
                          type: object
                          properties:
                            description:
                              type: string
                              example: Basic User priveleges.
                            resource_id:
                              type: string
                              example: divvyrole:1:5
                            manage:
                              type: boolean
                              example: true
                              default: true
                            cloud_scopes:
                              type: array
                              items:
                                type: string
                                example: divvyorganizationservice:2
                            view:
                              type: boolean
                              example: true
                              default: true
                            groups:
                              type: array
                              items:
                                type: string
                                example: divvyusergroup:5
                            all_permissions:
                              type: boolean
                              example: false
                              default: true
                            global_scope:
                              type: boolean
                              example: false
                              default: true
                            delete:
                              type: boolean
                              example: false
                              default: true
                            provision:
                              type: boolean
                              example: true
                              default: true
                            resource_group_scopes:
                              type: array
                              items:
                                type: string
                                example: 'resourcegroup:2:'
                            name:
                              type: string
                              example: basicRole
                      name:
                        type: string
                        example: Test UserGroup
      deprecated: false
  /prototype/group/{group_resource_id}/roles/list:
    post:
      summary: List Roles in User Group
      description: |-
        Lists all current Roles associated to User Group

        Requires Org Admin
      operationId: list-roles-in-user-group
      parameters:
        - name: group_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "roles": [
                            {
                                "name": "boatface",
                                "add_cloud": false,
                                "resource_id": "divvyrole:1:25",
                                "manage": false,
                                "cloud_scopes": [],
                                "groups": [
                                    "divvyusergroup:26"
                                ],
                                "all_permissions": true,
                                "global_scope": true,
                                "view": false,
                                "provision": false,
                                "resource_group_scopes": [],
                                "badge_scopes": [],
                                "delete": false
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  roles:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: boatface
                        add_cloud:
                          type: boolean
                          example: false
                          default: true
                        resource_id:
                          type: string
                          example: divvyrole:1:25
                        manage:
                          type: boolean
                          example: false
                          default: true
                        cloud_scopes:
                          type: array
                        groups:
                          type: array
                          items:
                            type: string
                            example: divvyusergroup:26
                        all_permissions:
                          type: boolean
                          example: true
                          default: true
                        global_scope:
                          type: boolean
                          example: true
                          default: true
                        view:
                          type: boolean
                          example: false
                          default: true
                        provision:
                          type: boolean
                          example: false
                          default: true
                        resource_group_scopes:
                          type: array
                        badge_scopes:
                          type: array
                        delete:
                          type: boolean
                          example: false
                          default: true
      deprecated: false
  /public/botfactory/{bot_id}/pause:
    post:
      summary: Pause Bot
      description: Pause a Bot.
      operationId: pause-bot
      parameters:
        - name: bot_id
          in: path
          description: 'The ID for the bot. For example: `divvybot:1:123`.'
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: A message to explain the pause action.
            examples:
              Request Example:
                value:
                  reason: Example of a reason text.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/botfactory/{bot_id}/resume:
    post:
      summary: Enable Bot
      description: Enables a Bot, allowing it to run as instructed.
      operationId: resume-bot
      parameters:
        - name: bot_id
          in: path
          description: 'The ID for the bot. For example: `divvybot:1:123`.'
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: A message to explain the resume action.
            examples:
              Request Example:
                value:
                  reason: Example of a reason text.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/botfactory/edit/{bot_id}:
    post:
      summary: Edit Bot
      description: Edits an existing Bot's configuration.
      operationId: edit-bot
      parameters:
        - name: bot_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - state
                - description
                - instructions
                - category
              properties:
                name:
                  type: string
                  description: The name for the Bot.
                state:
                  type: string
                  description: 'The status for the Bot. Options are: `Paused`, `Running`, `Archived`, or `Scanning`.'
                description:
                  type: string
                  description: The description for the Bot.
                instructions:
                  type: array
                  description: The instructions for the Bot.
                  items:
                    properties:
                      resource_types:
                        type: array
                        description: The type(s) of resource(s) to which the Bot applies. Review the [Resource Matrix](doc:resource-matrix) for more information.
                        default: []
                        items:
                          type: string
                      filters:
                        type: array
                        description: The name and configuration for a filter.
                        items:
                          properties:
                            name:
                              type: string
                              description: The full, unique ID for the filter; for example, `"divvy.filter.instance_cores_exceeds_threshold"`. Use the [Get Filter Registry](https://docs.divvycloud.com/reference#get-filter-registry) endpoint to obtain a filter's name.
                            config:
                              type: object
                              description: 'The configuration for the filter, which varies from filter to filter. If configuration is not necessary, a blank object must still be present, e.g., `"config": "{}"`. Use the [Get Filter Registry](https://docs.divvycloud.com/reference#get-filter-registry) endpoint to obtain a filter''s configuration.'
                          required:
                            - name
                            - config
                          type: object
                      actions:
                        type: array
                        description: The bot actions to run.
                        items:
                          properties:
                            name:
                              type: string
                              description: The full, unique ID for the Bot action; for example, `"divvy.action.scheduled_stop"`. Use the [List Bot Actions](https://docs.divvycloud.com/reference#list-bot-actions) endpoint to obtain Bot action's name.
                            config:
                              type: object
                              description: The configuration for the Bot action, which varies from action to action. Use the [List Bot Actions](https://docs.divvycloud.com/reference#list-bot-actions) endpoint to obtain a Bot action's configuration.
                            run_when_result_is:
                              type: boolean
                              description: Boolean indicating when to run the action.
                              default: true
                          required:
                            - name
                            - config
                            - run_when_result_is
                          type: object
                      groups:
                        type: array
                        description: A list of the Cloud Organization Resource ID(s) and/or Resource Group ID(s) to which to scope the query. Use the [List Clouds](https://docs.divvycloud.com/reference#list-clouds) endpoint to obtain Cloud Organization resource ID(s); use the [List Resource Group Associations endpoint](https://docs.divvycloud.com/reference#get-resource-associations) to obtain resource group ID(s).
                        default: []
                        items:
                          type: string
                      badges:
                        type: array
                        description: The key-value pairs for badges. At least two badges must be present to apply changes to `badge_scope_operator`.
                        items:
                          properties:
                            key:
                              type: string
                              description: Key for the badge.
                            value:
                              type: string
                              description: Value for the badge.
                          type: object
                      hookpoints:
                        type: array
                        description: Reactive run options to trigger the Bot to run automatically. Options are `divvycloud.resource.created`, `divvycloud.resource.tags_modified`, `divvycloud.resource.modified`, `divvycloud.resource.destroyed`, and/or `divvycloud.resource.threat_finding_discovered`. Review the [Creating Bots](doc:creating-bots) documentation for more information.
                        default: []
                        items:
                          type: string
                      schedule:
                        type: object
                        description: The schedule for when the bot will run. Default is no schedule.
                        required:
                          - _type
                        properties:
                          _type:
                            type: string
                            description: 'The type of schedule. Options are: `hourly`, `daily`, `weekly`, or `monthly`.'
                          time_of_day:
                            type: object
                            description: Time of day configuration. Only valid for `daily`, `weekly`, or `monthly` schedule types.
                            properties: {}
                          exclude_days:
                            type: array
                            description: 'Days of the week to exclude from the schedule. Integers correspond to the days of the week: Monday = 1, Tuesday = 2, etc.'
                            items:
                              type: integer
                              format: int32
                    required:
                      - resource_types
                    type: object
                category:
                  type: string
                  description: 'The category for the Bot. Options are: `Security`, `Best Practices`, `Optimization`, `Curation`, and `Miscellaneous`.'
                severity:
                  type: string
                  description: 'The severity for the Bot. Options are: `low`, `medium`, or `high`.'
                  default: low
                retain_data:
                  type: boolean
                  description: 'If `false`, upon successful edit Bot operation, all non-compliant resources originally found by the bot are cleared. *Note: If your bot edits do not include group/scope or filter changes, then we highly recommend setting this to `true` to retain any scheduled actions.*'
                  default: false
                badge_scope_operator:
                  type: string
                  description: 'Operator for evaluating multiple badges. Requires at least two badges present to apply any changes. Options are: `OR` or `AND`.'
                  default: OR
                insight_id:
                  type: integer
                  description: '*Attempting to change the Insight ID may yield unexpected results: changing the Insight ID **will not** change the Insight name, source, or severity. If you want to change the linked Insight, we highly recommend creating a new Bot instead.*  The ID for the Insight.'
                  format: int32
                source:
                  type: string
                  description: '*Attempting to change the source may yield unexpected results: changing the source **will not** change the Insight name, source, or severity. If you want to change the linked Insight, we highly recommend creating a new Bot instead.*  The Insight type. Options are: `custom` (user-authored) or `backoffice` (InsightCloudSec-authored).'
            examples:
              Request Example:
                value:
                  name: Example bot edited
                  description: Demo for API documentation
                  severity: low
                  category: Security
                  ondemand_enabled: true
                  state: PAUSED
                  instructions:
                    resource_types:
                      - instance
                    groups: []
                    filters:
                      - config:
                          cores: 2
                        name: divvy.filter.instance_cores_exceeds_threshold
                    schedule: null
                    schedule_description: null
                    badges:
                      - value: wheat
                        key: grain
                    ondemand_enabled: true
                    hookpoints: []
                    actions:
                      - run_when_result_is: true
                        config:
                          hours: 0
                        name: divvy.action.scheduled_stop
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/botfactory/bot/create:
    post:
      summary: Create Bot
      description: ''
      operationId: create-bot
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - description
                - category
                - instructions
              properties:
                name:
                  type: string
                  description: The name for the Bot.
                description:
                  type: string
                  description: The description for the Bot.
                  default: example bot description
                category:
                  type: string
                  description: 'The category for the Bot. Options are: `Security`, `Best Practices`, `Optimization`, `Curation`, and `Miscellaneous`.'
                instructions:
                  type: object
                  description: The instructions for the Bot.
                  required:
                    - resource_types
                  properties:
                    resource_types:
                      type: array
                      description: The type(s) of resource(s) to which the Bot applies. Review the [Resource Matrix](doc:resource-matrix) for more information.
                      items:
                        type: string
                    filters:
                      type: array
                      description: The name and configuration for a filter.
                      items:
                        properties:
                          name:
                            type: string
                            description: The full, unique ID for the filter; for example, `"divvy.filter.instance_cores_exceeds_threshold"`. Use the [Get Filter Registry](https://docs.divvycloud.com/reference#get-filter-registry) endpoint to obtain a filter's name.
                          config:
                            type: object
                            description: 'The configuration for the filter, which varies from filter to filter. If configuration is not necessary, a blank object must still be present, e.g., `"config": "{}"`. Use the [Get Filter Registry](https://docs.divvycloud.com/reference#get-filter-registry) endpoint to obtain a filter''s configuration.'
                        required:
                          - name
                          - config
                        type: object
                    actions:
                      type: array
                      description: The bot actions to run.
                      items:
                        properties:
                          name:
                            type: string
                            description: The full, unique ID for the Bot action; for example, `"divvy.action.scheduled_stop"`. Use the [List Bot Actions](https://docs.divvycloud.com/reference#list-bot-actions) endpoint to obtain Bot action's name.
                          config:
                            type: object
                            description: The configuration for the Bot action, which varies from action to action. Use the [List Bot Actions](https://docs.divvycloud.com/reference#list-bot-actions) endpoint to obtain a Bot action's configuration.
                          run_when_result_is:
                            type: boolean
                            description: Boolean indicating when to run the action.
                            default: true
                        required:
                          - name
                          - config
                          - run_when_result_is
                        type: object
                    groups:
                      type: array
                      description: A list of the Cloud Organization Resource ID(s) and/or Resource Group ID(s) to which to scope the query. Use the [List Clouds](https://docs.divvycloud.com/reference#list-clouds) endpoint to obtain Cloud Organization resource ID(s); use the [List Resource Group Associations endpoint](https://docs.divvycloud.com/reference#get-resource-associations) to obtain resource group ID(s).
                      items:
                        type: string
                    badges:
                      type: array
                      description: The key-value pairs for badges. At least two badges must be present to apply changes to `badge_scope_operator`.
                      items:
                        properties:
                          key:
                            type: string
                            description: Key for the badge.
                          value:
                            type: string
                            description: Value for the badge.
                        type: object
                    hookpoints:
                      type: array
                      description: Reactive run options to trigger the Bot to run automatically. Options are `divvycloud.resource.created`, `divvycloud.resource.tags_modified`, `divvycloud.resource.modified`, `divvycloud.resource.destroyed`, and/or `divvycloud.resource.threat_finding_discovered`. Review the [Creating Bots](doc:creating-bots) documentation for more information.
                      items:
                        type: string
                    schedule:
                      type: object
                      description: The schedule for when the bot will run. Default is no schedule.
                      required:
                        - _type
                      properties:
                        _type:
                          type: string
                          description: 'The type of schedule. Options are: `hourly`, `daily`, `weekly`, or `monthly`.'
                        time_of_day:
                          type: object
                          description: Time of day configuration. Only valid for `daily`, `weekly`, or `monthly` schedule types.
                          properties: {}
                        exclude_days:
                          type: array
                          description: 'Days of the week to exclude from the schedule. Integers correspond to the days of the week: Monday = 1, Tuesday = 2, etc.'
                          items:
                            type: integer
                            format: int32
                severity:
                  type: string
                  description: 'The severity for the Bot. Options are: `low`, `medium`, or `high`.'
                  default: low
                badge_scope_operator:
                  type: string
                  description: 'Operator for evaluating multiple badges. Requires at least two badges present to apply any changes. Options are: `OR` or `AND`.'
                  default: AND
                insight_id:
                  type: integer
                  description: The ID for the Insight.
                  format: int32
                source:
                  type: string
                  description: 'The Insight type. Options are: `custom` (user-authored) or `backoffice` (InsightCloudSec-authored).'
                state:
                  type: string
                  description: 'The status for the Bot. Options are: `Paused`, `Running`, `Archived`, or `Scanning`.'
            examples:
              Example Bot:
                value:
                  name: Example bot
                  description: Demo for API documentation
                  severity: low
                  category: Security
                  ondemand_enabled: true
                  state: PAUSED
                  instructions:
                    resource_types:
                      - instance
                    groups: []
                    filters:
                      - config:
                          cores: 2
                        name: divvy.filter.instance_cores_exceeds_threshold
                    schedule: null
                    schedule_description: null
                    badges:
                      - value: wheat
                        key: grain
                    ondemand_enabled: true
                    hookpoints: []
                    actions:
                      - run_when_result_is: true
                        config:
                          hours: 0
                        name: divvy.action.scheduled_stop
              Example Bot (with Schedule):
                value:
                  name: Docs Example Bot
                  description: Bot description goes here.
                  category: Best Practices
                  severity: low
                  instructions:
                    resource_types:
                      - instance
                    filters:
                      - name: instances_exposing_all_ports
                        config:
                          egress: true
                    actions:
                      - name: divvy.action.send_to_syslog
                        config:
                          log_message: Instance is exposed to the outside world!
                          priority: LOG_EMERG
                          facility: local1
                          serialize: true
                        run_when_result_is: true
                    groups: []
                    badges:
                      - key: Bulk
                        value: Duplicates
                    hookpoints:
                      - divvycloud.resource.created
                      - divvycloud.resource.modified
                    schedule:
                      _type: Daily
                      time_of_day:
                        _type: TimeOfDay
                        second: 0
                        minute: 0
                        hour: 1
                      exclude_days: []
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Example Bot (with Schedule):
                  value: |-
                    {
                        "resource_id": "divvybot:1:2884",
                        "name": "Docs Example Bot",
                        "description": "Bot description goes here.",
                        "notes": null,
                        "insight_id": null,
                        "source": null,
                        "insight_name": null,
                        "insight_severity": null,
                        "owner": "divvyuser:2442:",
                        "owner_name": "John Doe",
                        "state": "PAUSED",
                        "date_created": "2022-02-16 16:26:56",
                        "date_modified": "2022-02-16 16:26:56",
                        "category": "Best Practices",
                        "badge_scope_operator": "AND",
                        "instructions": {
                            "resource_types": [
                                "instance"
                            ],
                            "filters": [
                                {
                                    "name": "instances_exposing_all_ports",
                                    "config": {
                                        "egress": true
                                    }
                                }
                            ],
                            "actions": [
                                {
                                    "name": "divvy.action.send_to_syslog",
                                    "config": {
                                        "log_message": "Instance is exposed to the outside world!",
                                        "priority": "LOG_EMERG",
                                        "facility": "local1",
                                        "serialize": true
                                    },
                                    "run_when_result_is": true
                                }
                            ],
                            "groups": [],
                            "badges": [
                                {
                                    "key": "Bulk",
                                    "value": "Duplicates"
                                }
                            ],
                            "hookpoints": [
                                "divvycloud.resource.created",
                                "divvycloud.resource.modified"
                            ],
                            "schedule": "{\"_type\": \"Daily\", \"time_of_day\": {\"_type\": \"TimeOfDay\", \"second\": 0, \"minute\": 0, \"hour\": 1}, \"exclude_days\": []}",
                            "schedule_description": "{\"_type\": \"Daily\", \"time_of_day\": {\"_type\": \"TimeOfDay\", \"second\": 0, \"minute\": 0, \"hour\": 1}, \"exclude_days\": []}"
                        },
                        "valid": true,
                        "errors": [],
                        "severity": "low",
                        "detailed_logging": false
                    }
                Example Bot:
                  value: |-
                    {
                        "resource_id": "divvybot:1:2885",
                        "name": "Example bot",
                        "description": "Demo for API documentation",
                        "notes": null,
                        "insight_id": null,
                        "source": null,
                        "insight_name": null,
                        "insight_severity": null,
                        "owner": "divvyuser:2442:",
                        "owner_name": "John Doe",
                        "state": "PAUSED",
                        "date_created": "2022-02-16 19:42:15",
                        "date_modified": "2022-02-16 19:42:15",
                        "category": "Security",
                        "badge_scope_operator": "AND",
                        "instructions": {
                            "resource_types": [
                                "instance"
                            ],
                            "filters": [
                                {
                                    "name": "divvy.filter.instance_cores_exceeds_threshold",
                                    "config": {
                                        "cores": 2
                                    }
                                }
                            ],
                            "actions": [
                                {
                                    "name": "divvy.action.scheduled_stop",
                                    "config": {
                                        "hours": 0
                                    },
                                    "run_when_result_is": true
                                }
                            ],
                            "groups": [],
                            "badges": [
                                {
                                    "key": "grain",
                                    "value": "wheat"
                                }
                            ],
                            "hookpoints": [],
                            "schedule": null,
                            "schedule_description": null
                        },
                        "valid": true,
                        "errors": [],
                        "severity": "low",
                        "detailed_logging": false
                    }
              schema:
                oneOf:
                  - title: Example Bot (with Schedule)
                    type: object
                    properties:
                      resource_id:
                        type: string
                        example: divvybot:1:2884
                      name:
                        type: string
                        example: Docs Example Bot
                      description:
                        type: string
                        example: Bot description goes here.
                      notes: {}
                      insight_id: {}
                      source: {}
                      insight_name: {}
                      insight_severity: {}
                      owner:
                        type: string
                        example: 'divvyuser:2442:'
                      owner_name:
                        type: string
                        example: John Doe
                      state:
                        type: string
                        example: PAUSED
                      date_created:
                        type: string
                        example: '2022-02-16 16:26:56'
                      date_modified:
                        type: string
                        example: '2022-02-16 16:26:56'
                      category:
                        type: string
                        example: Best Practices
                      badge_scope_operator:
                        type: string
                        example: AND
                      instructions:
                        type: object
                        properties:
                          resource_types:
                            type: array
                            items:
                              type: string
                              example: instance
                          filters:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                  example: instances_exposing_all_ports
                                config:
                                  type: object
                                  properties:
                                    egress:
                                      type: boolean
                                      example: true
                                      default: true
                          actions:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                  example: divvy.action.send_to_syslog
                                config:
                                  type: object
                                  properties:
                                    log_message:
                                      type: string
                                      example: Instance is exposed to the outside world!
                                    priority:
                                      type: string
                                      example: LOG_EMERG
                                    facility:
                                      type: string
                                      example: local1
                                    serialize:
                                      type: boolean
                                      example: true
                                      default: true
                                run_when_result_is:
                                  type: boolean
                                  example: true
                                  default: true
                          groups:
                            type: array
                          badges:
                            type: array
                            items:
                              type: object
                              properties:
                                key:
                                  type: string
                                  example: Bulk
                                value:
                                  type: string
                                  example: Duplicates
                          hookpoints:
                            type: array
                            items:
                              type: string
                              example: divvycloud.resource.created
                          schedule:
                            type: string
                            example: '{"_type": "Daily", "time_of_day": {"_type": "TimeOfDay", "second": 0, "minute": 0, "hour": 1}, "exclude_days": []}'
                          schedule_description:
                            type: string
                            example: '{"_type": "Daily", "time_of_day": {"_type": "TimeOfDay", "second": 0, "minute": 0, "hour": 1}, "exclude_days": []}'
                      valid:
                        type: boolean
                        example: true
                        default: true
                      errors:
                        type: array
                      severity:
                        type: string
                        example: low
                      detailed_logging:
                        type: boolean
                        example: false
                        default: true
                  - title: Example Bot
                    type: object
                    properties:
                      resource_id:
                        type: string
                        example: divvybot:1:2885
                      name:
                        type: string
                        example: Example bot
                      description:
                        type: string
                        example: Demo for API documentation
                      notes: {}
                      insight_id: {}
                      source: {}
                      insight_name: {}
                      insight_severity: {}
                      owner:
                        type: string
                        example: 'divvyuser:2442:'
                      owner_name:
                        type: string
                        example: John Doe
                      state:
                        type: string
                        example: PAUSED
                      date_created:
                        type: string
                        example: '2022-02-16 19:42:15'
                      date_modified:
                        type: string
                        example: '2022-02-16 19:42:15'
                      category:
                        type: string
                        example: Security
                      badge_scope_operator:
                        type: string
                        example: AND
                      instructions:
                        type: object
                        properties:
                          resource_types:
                            type: array
                            items:
                              type: string
                              example: instance
                          filters:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                  example: divvy.filter.instance_cores_exceeds_threshold
                                config:
                                  type: object
                                  properties:
                                    cores:
                                      type: integer
                                      example: 2
                                      default: 0
                          actions:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                  example: divvy.action.scheduled_stop
                                config:
                                  type: object
                                  properties:
                                    hours:
                                      type: integer
                                      example: 0
                                      default: 0
                                run_when_result_is:
                                  type: boolean
                                  example: true
                                  default: true
                          groups:
                            type: array
                          badges:
                            type: array
                            items:
                              type: object
                              properties:
                                key:
                                  type: string
                                  example: grain
                                value:
                                  type: string
                                  example: wheat
                          hookpoints:
                            type: array
                          schedule: {}
                          schedule_description: {}
                      valid:
                        type: boolean
                        example: true
                        default: true
                      errors:
                        type: array
                      severity:
                        type: string
                        example: low
                      detailed_logging:
                        type: boolean
                        example: false
                        default: true
      deprecated: false
  /public/botfactory/{bot_id}/archive:
    post:
      summary: Archive Bot
      description: |-
        Archiving bot will remove scheduled events and compliance data and hide the bot from listing calls as well as the Botfactory page in the UI.

        *Note: There is currently no way to un-archive a bot and this action should be seen as a delete.*
      operationId: archive-bot
      parameters:
        - name: bot_id
          in: path
          description: 'The ID for the bot. For example: `divvybot:1:123`.'
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: A message to explain the archive action.
            examples:
              Request Example:
                value:
                  reason: Example of a reason text.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/dnszone/{dnszone_resource_id}/dnsrecords/list:
    post:
      summary: List DNS Zone Records
      description: List the DNS records within a particular zone.
      operationId: list-dns-zone-records
      parameters:
        - name: dnszone_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/badges/count:
    post:
      summary: List Resources Badge Count
      description: Returns a list of badge counts for all resources.
      operationId: list-resources-badge-count
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/badges/create:
    post:
      summary: Create Badges
      description: |-
        Create one or more badges for the provided cloud account(s). If you are adding badges to multiple cloud accounts, the badges will all be the same for the multiple accounts chosen.

        *Note: This requires InsightCloudSec version 18.1 or later.*
      operationId: create-badges
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                target_resource_ids:
                  type: array
                  description: A list of resource IDs associated with cloud accounts.
                  items:
                    type: string
                badges:
                  type: array
                  description: List of objects containing the key-value pairs of the badges to be added to the provided cloud accounts.
                  items:
                    properties:
                      key:
                        type: string
                        description: Key for the badge.
                      value:
                        type: string
                        description: Value for the badge.
                    type: object
            examples:
              Request Example:
                value:
                  target_resource_ids:
                    - divvyorganizationservice:3
                    - divvyorganizationservice:1
                  badges:
                    - key: environment
                      value: development
                    - key: user
                      value: basic
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/badges/{org_resource_id}/list:
    post:
      summary: List Resource Badges
      description: Returns a list of badges for a particular resource
      operationId: list-resource-badges
      parameters:
        - name: org_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/badge/clouds/list:
    post:
      summary: List Clouds With Badges
      description: Return a list of cloud accounts that are badged.
      operationId: list-clouds-with-badges
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                badges:
                  type: array
                  description: The key-value pairs for badges.
                  items:
                    properties:
                      key:
                        type: string
                        description: Key for the badge.
                      value:
                        type: string
                        description: Value for the badge.
                    type: object
            examples:
              Request Example:
                value:
                  badges:
                    - key: badge_key
                      value: badge_value
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    [
                      {
                        "resource_id": "divvyorganizationservice:1",
                        "name": "Cloud Account 1"
                      },
                      {
                        "resource_id": "divvyorganizationservice:10",
                        "name": "Cloud Account 2"
                      }
                    ]
              schema:
                type: array
                items:
                  type: object
                  properties:
                    resource_id:
                      type: string
                      example: divvyorganizationservice:1
                    name:
                      type: string
                      example: Cloud Account 1
      deprecated: false
  /public/badges/delete:
    post:
      summary: Delete Badges
      description: Delete one or more badges from one or more cloud accounts/organizations.
      operationId: delete-badges
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - target_resource_ids
                - badges
              properties:
                target_resource_ids:
                  type: array
                  description: A list of InsightCloudSec resource IDs for cloud account(s) or organization(s).
                  items:
                    type: string
                badges:
                  type: array
                  description: 'A list of badges (as key-value pair objects) to update. Any badges not sent with the request will be removed. *Note: System and auto-generated badges cannot be modified. See [Badges](doc:badges) for more information.*'
                  items:
                    properties:
                      key:
                        type: string
                        description: Key for the badge.
                      value:
                        type: string
                        description: Value for the badge.
                    type: object
            examples:
              Request Example:
                value:
                  target_resource_ids:
                    - divvyorganizationservice:3
                  badges:
                    - key: environment
                      value: development
                    - key: user
                      value: basic
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/autoscalinggroup/{autoscalinggroup_resource_id}/detach:
    post:
      summary: Detach Instance From ASG
      description: ''
      operationId: detach-instance-from-asg
      parameters:
        - name: autoscalinggroup_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                RAW_BODY:
                  type: string
                  format: json
            examples:
              Request Example:
                value:
                  instance:
                    - instance_resource_id
                    - instance_id
                  decrement_capacity: boolean
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/resource/{autoscalinggroup_resource_id}/supported_actions/get:
    get:
      summary: List ASG Supported Actions
      description: Available Auto scaling Group actions.
      operationId: list-asg-supported-actions
      parameters:
        - name: autoscalinggroup_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "supported_actions": [
                        "detach_instance_from_auto_scaling_group"
                      ]
                    }
              schema:
                type: object
                properties:
                  supported_actions:
                    type: array
                    items:
                      type: string
                      example: detach_instance_from_auto_scaling_group
      deprecated: false
  /public/serviceuser/{resource_id}/accesskeys/list:
    post:
      summary: List Access Keys
      description: List the assigned service access keys for a service user.
      operationId: list-access-keys
      parameters:
        - name: resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/{resource_id}/policy/{policy_resource_id}/detach:
    post:
      summary: Detach Policy
      description: Detach a policy from a service user, group, or role.
      operationId: detach-policy
      parameters:
        - name: resource_id
          in: path
          schema:
            type: string
          required: true
        - name: policy_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/user/create:
    post:
      summary: Create User - SAML
      description: Create a user backed by SAML authenticaiton
      operationId: create-user-saml
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                authentication_type:
                  type: string
                  default: saml
                access_level:
                  type: string
                username:
                  type: string
                authentication_server_id:
                  type: integer
                  format: int32
                name:
                  type: string
                email:
                  type: string
            examples:
              Request Example:
                value:
                  authentication_type: saml
                  access_level: BASIC_USER
                  username: Boatface
                  authentication_server_id: 1
                  name: Boaty McBoatFace
                  email: boat@boatface.com
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                    "username":"Boatface""
                    "two_factor_enabled":false
                    "user_id":22
                    "name":"Boaty McBoatFace""
                    "resource_id":"divvyuser:22:"
                    "navigation_blacklist":[]
                    "two_factor_required":false
                    "organization_name":"Default Organization"
                    "domain_admin":false
                    "email_address":"saml@test.com"
                    "organization_admin":false
                    }
      deprecated: false
  /public/{resource_id}/policies/list:
    post:
      summary: List Policies
      description: List the assigned policies to a service user, group or role.
      operationId: list-policies
      parameters:
        - name: resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/domain/switch_organization:
    post:
      summary: Switch Organization
      description: |-
        After this request all future API requests made will be in the context of this organization. On the next login, the user will remain in the context of the last organization they were in.

        Switching organizations is restricted to Domain Admins.
      operationId: switch-organization
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                organization_name:
                  type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/domain/organization/create:
    post:
      summary: Create Organization
      description: Creates a new isolated environment. After creating organizations a domain admin user must switch contexts into the organization using the `Switch organization` endpoint.
      operationId: create-new-organization
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                organization_name:
                  type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/clouds/status/set:
    post:
      summary: Resume Harvesting
      description: Resumes harvesting for a cloud account
      operationId: resume-harvesting
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_ids:
                  type: string
                status:
                  type: string
            examples:
              Request Example:
                value:
                  resource_ids:
                    - divvyorganizationservice:24
                  status: DEFAULT
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/botfactory/function-registry/list:
    get:
      summary: List Bot Actions
      description: Outputs a list of all available bot actions.
      operationId: list-bot-actions
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "filters": [
                            {
                                "uid": "divvy.query.access_analyzer_finding_count",
                                "deprecated_uids": [],
                                "registry": "filter",
                                "name": "Access Analyzer Finding Count By Type",
                                "description": "Identify access analyzer resources by their finding type/count",
                                "author": "Rapid7",
                                "admin_only": false,
                                "expensive": false,
                                "supported_resources": [
                                    "accessanalyzer"
                                ],
                                "supported_clouds": [
                                    "AWS",
                                    "AWS_GOV",
                                    "AWS_CHINA"
                                ],
                                "settings_config": [
                                    {
                                        "field_type": "select",
                                        "name": "finding_type",
                                        "display_name": "Finding Type",
                                        "description": "The finding type to validate against",
                                        "options": [
                                            "required"
                                        ],
                                        "choices": [
                                            {
                                                "value": "active_finding_count",
                                                "display_value": "Total Findings"
                                            },
                                            {
                                                "value": "public_finding_count",
                                                "display_value": "Public Access Findings"
                                            },
                                            {
                                                "value": "cross_account_count",
                                                "display_value": "Cross Account Findings"
                                            },
                                            {
                                                "value": "unknown_account_count",
                                                "display_value": "Unknown Account Findings"
                                            }
                                        ],
                                        "_state_hash": "7198468a46d5f3af5f5c4a86ddee136b"
                                    },
                                    {
                                        "field_type": "int",
                                        "name": "finding_count",
                                        "display_name": "Finding Count",
                                        "description": "The count to search for",
                                        "options": [
                                            "required"
                                        ],
                                        "_state_hash": "e773e59039ca4328c05de65bdabec958"
                                    },
                                    {
                                        "field_type": "select",
                                        "name": "operator",
                                        "display_name": "Operator",
                                        "description": "The operator to use against specified criterion (Defaults to Greater Than Or Equal To)",
                                        "options": [],
                                        "choices": [
                                            {
                                                "value": "lt",
                                                "display_value": "<"
                                            },
                                            {
                                                "value": "lte",
                                                "display_value": "<="
                                            },
                                            {
                                                "value": "eq",
                                                "display_value": "=="
                                            },
                                            {
                                                "value": "gte",
                                                "display_value": ">="
                                            },
                                            {
                                                "value": "gt",
                                                "display_value": ">"
                                            },
                                            {
                                                "value": "ne",
                                                "display_value": "!="
                                            }
                                        ],
                                        "_state_hash": "6579b6d595d814869681f2c64ff37f29"
                                    }
                                ],
                                "bulk_action": false,
                                "accepts_complement": false,
                                "version": "19.5",
                                "permissions": null
                            }
                            //, ...
                        ]
                        "actions": [
                            {
                                "uid": "divvy.action.mark_non_compliant",
                                "deprecated_uids": [],
                                "registry": "action",
                                "name": "Mark Resource Noncompliant",
                                "description": "Provides a bot report of resources matching your conditions with automatic cleanup when a resource no longer matches all conditions.",
                                "author": "Rapid7",
                                "admin_only": false,
                                "expensive": false,
                                "supported_resources": [],
                                "supported_clouds": [],
                                "settings_config": [],
                                "bulk_action": true,
                                "accepts_complement": true,
                                "version": null,
                                "permissions": null
                            }
                            //, ...
                        ]
                    }
      deprecated: false
  /prototype/domain/organization/{organization_resource_id}/update:
    post:
      summary: Edit Organization Name
      description: Changes name of organization. Organization names are globally unique for installations. Conflicting names will raise an error.
      operationId: edit-organization-name
      parameters:
        - name: organization_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                organization_name:
                  type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/resource/{resource_id}/notes/create:
    post:
      summary: Create Resource Note
      description: 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.
      operationId: create-resource-note
      parameters:
        - name: resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      requestBody:
        content:
          application/json:
            schema: {}
            examples:
              Request Example:
                value:
                  note_text: Example of a note text.
  /public/resource/{resource_id}/notes/list:
    post:
      summary: Get Resource Notes
      description: Get all of the notes about a particular resource which were created by users.
      operationId: get-resource-notes
      parameters:
        - name: resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"resource_notes": []}'
              schema:
                type: object
                properties:
                  resource_notes:
                    type: array
      deprecated: false
  /prototype/domain/organization/{organization_resource_id}/delete:
    delete:
      summary: Delete Organization
      description: Deletes organization and deletes all cloud account and resource data as well as all users and bot data.
      operationId: delete-organization
      parameters:
        - name: organization_resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/group/{group_resource_id}/users/add:
    post:
      summary: Add Users to Group
      description: ''
      operationId: add-users-to-group
      parameters:
        - name: group_resource_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_resource_ids:
                  type: string
            examples:
              Request Example:
                value:
                  user_resource_ids:
                    - 'divvyuser:26:'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-

                    "group":{
                    "resource_id":"divvyusergroup:26"
                    "group_id":26
                    "users":[
                    0:{
                    "username":"boatface"
                    "two_factor_enabled":false
                    "user_id":24
                    "name":"apitest2"
                    "resource_id":"divvyuser:24:"
                    "navigation_blacklist":[]
                    "two_factor_required":false
                    "organization_name":"Default Organization"
                    "domain_admin":false
                    "email_address":"boat@boatface.com"
                    "organization_admin":false
                    }
                    ]
                    "roles":[]
                    "name":"BoatFace"
                    }
                    }
      deprecated: false
  /public/resource/{resource_id}/settings/list:
    post:
      summary: List Resource Settings
      description: List settings for a given resource.
      operationId: list-resource-settings
      parameters:
        - name: resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"setting_list": []}'
              schema:
                type: object
                properties:
                  setting_list:
                    type: array
      deprecated: false
  /harvestingstrategy/strategy:
    post:
      summary: Create Harvesting Strategy
      description: Create a harvesting strategy
      operationId: create-harvesting-strategy
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                strategy_name:
                  type: string
                cloud_type_id:
                  type: string
            examples:
              Request Example:
                value:
                  strategy_name: Divvycloud
                  cloud_type_id: AWS
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"strategy_id": 13}'
              schema:
                type: object
                properties:
                  strategy_id:
                    type: integer
                    example: 13
                    default: 0
      deprecated: false
    get:
      summary: List Harvesting Strategies
      description: Lists all harvesting strategies including default strategies
      operationId: list-harvesting-strategies
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"strategies": [{"organization_services": 2, "type_default": true, "cloud_type_id": "AWS", "organization_id": 1, "id": 1, "name": "Default Provider Strategy"}, {"organization_services": 0, "type_default": true, "cloud_type_id": "GCE", "organization_id": 1, "id": 2, "name": "Default Provider Strategy"}, {"organization_services": 0, "type_default": true, "cloud_type_id": "AZURE_ARM", "organization_id": 1, "id": 3, "name": "Default Provider Strategy"}, {"organization_services": 0, "type_default": true, "cloud_type_id": "AWS_GOV", "organization_id": 1, "id": 4, "name": "Default Provider Strategy"}, {"organization_services": 0, "type_default": true, "cloud_type_id": "VMWARE_VSPHERE", "organization_id": 1, "id": 5, "name": "Default Provider Strategy"}, {"organization_services": 1, "type_default": false, "cloud_type_id": "AWS", "organization_id": 1, "id": 6, "name": "Divvycloud AWS"}, {"organization_services": 1, "type_default": false, "cloud_type_id": "AZURE_ARM", "organization_id": 1, "id": 7, "name": "Divvycloud Azure"}, {"organization_services": 0, "type_default": false, "cloud_type_id": "GCE", "organization_id": 1, "id": 8, "name": "Divvycloud GCP"}, {"organization_services": 1, "type_default": true, "cloud_type_id": "GCE", "organization_id": 1, "id": 11, "name": "Default Provider Strategy"}, {"organization_services": 0, "type_default": false, "cloud_type_id": "AWS", "organization_id": 1, "id": 12, "name": "Divvycloud"}]}'
              schema:
                type: object
                properties:
                  strategies:
                    type: array
                    items:
                      type: object
                      properties:
                        organization_services:
                          type: integer
                          example: 2
                          default: 0
                        type_default:
                          type: boolean
                          example: true
                          default: true
                        cloud_type_id:
                          type: string
                          example: AWS
                        organization_id:
                          type: integer
                          example: 1
                          default: 0
                        id:
                          type: integer
                          example: 1
                          default: 0
                        name:
                          type: string
                          example: Default Provider Strategy
      deprecated: false
  /public/resource/owner/set:
    post:
      summary: Set Resource Owner
      description: Set the owner for one or more resources. Only administrators can set owners.
      operationId: set-resource-owner
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_id:
                  type: string
            examples:
              Request Example:
                value:
                  resource_ids:
                    - '{resource_id}'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/resource/{resource_id}/tags/list:
    get:
      summary: List Resource Tags
      description: List tags for a given resource.
      operationId: list-resource-tags
      parameters:
        - name: resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"resource_tags": [{"key": "divvy-2038", "value": "bot"}]}'
              schema:
                type: object
                properties:
                  resource_tags:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                          example: divvy-2038
                        value:
                          type: string
                          example: bot
      deprecated: false
  /public/resource/{resource_id}/associations/get:
    post:
      summary: Get Resource Associations
      description: Get the resource group associations for a particular resource.
      operationId: get-resource-associations
      parameters:
        - name: resource_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "resource_groups": [
                            {
                                "name": "test",
                                "owner_type": "organization",
                                "owner_resource_id": "divvyuser:1:",
                                "group_type": "user",
                                "id": "resourcegroup:3:"
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  resource_groups:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: test
                        owner_type:
                          type: string
                          example: organization
                        owner_resource_id:
                          type: string
                          example: 'divvyuser:1:'
                        group_type:
                          type: string
                          example: user
                        id:
                          type: string
                          example: 'resourcegroup:3:'
      deprecated: false
  /harvestingstrategy/strategy/{strategy_id}/overrides/global:
    post:
      summary: Set Harvesting Strategy Cadence
      description: 'Configures the harvest strategy cadence. You can substitute AWS with any cloud type like: AWS, AWS_GOV, ALIBABA CLOUD, AZURE_ARM, DO, K8S, OS, RAX, OR SOFTLAYER.'
      operationId: set-harvesting-strategy-cadence
      parameters:
        - name: strategy_id
          in: path
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                body:
                  type: string
                  format: json
            examples:
              Request Example:
                value:
                  mapping:
                    AWS:ServiceCertificateHarvest:
                      defaultInterval: 60
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 10
                    AWS:StorageContainerHarvester:
                      defaultInterval: 30
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 5
                    AWS:PasswordPolicyHarvester:
                      defaultInterval: 240
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 40
                    AWS:IdentitySummaryHarvester:
                      defaultInterval: 240
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 40
                    AWS:ServiceLimitHarvest:
                      defaultInterval: 480
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 80
                    AWS:AwsPlacementGroupHarvester:
                      defaultInterval: 240
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 40
                    AWS:IdentityProviderHarvester:
                      defaultInterval: 240
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 40
                    AWS:ServicePolicyHarvester:
                      defaultInterval: 120
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 20
                    AWS:ServiceUserHarvester:
                      defaultInterval: 120
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 20
                    AWS:ServiceCheckHarvest:
                      defaultInterval: 120
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 20
                    AWS:IdentityDetailHarvester:
                      defaultInterval: 30
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 5
                    AWS:ServiceRoleHarvester:
                      defaultInterval: 120
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 20
                    AWS:ServiceAccessKeyHarvest:
                      defaultInterval: 360
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 60
                    AWS:CloudAccountsHarvester:
                      defaultInterval: 240
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 40
                    AWS:RegionHarvester:
                      defaultInterval: 480
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 80
                    AWS:DnsZoneHarvester:
                      defaultInterval: 180
                      regions:
                        - global
                      global: true
                      changed: true
                      interval: 30
                  copy_to: null
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /harvestingstrategy/strategy/{strategy_id}:
    post:
      summary: Assign Harvesting Strategy
      description: Assigns a harvesting strategy to a cloud
      operationId: assign-harvesting-strategy
      parameters:
        - name: strategy_id
          in: path
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                organization_service_ids:
                  type: integer
                  format: int32
                cloud_type_id:
                  type: string
                badges:
                  type: string
            examples:
              Request Example:
                value:
                  organization_service_ids:
                    - 29
                  cloud_type_id: AWS
                  badges: []
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"modified": 1}'
              schema:
                type: object
                properties:
                  modified:
                    type: integer
                    example: 1
                    default: 0
      deprecated: false
  /prototype/resourcegroups/resources/add:
    post:
      summary: Add Resource to Resource Group
      description: This adds a resource to the selected resource group
      operationId: add-resource-to-resource-group
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_group_ids:
                  type: string
                resource_ids:
                  type: string
            examples:
              Request Example:
                value:
                  resource_group_ids:
                    - 'resourcegroup:3:'
                  resource_ids:
                    - 'instance:24:us-east-2:i-03beb3f6c5aac378c:'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"resource_ids": ["instance:24:us-east-2:i-03beb3f6c5aac378c:"]}'
              schema:
                type: object
                properties:
                  resource_ids:
                    type: array
                    items:
                      type: string
                      example: 'instance:24:us-east-2:i-03beb3f6c5aac378c:'
      deprecated: false
  /prototype/diagnostics/system/status/get:
    get:
      summary: Get System Status
      description: Provides the NTP details, last harvest time and impaired organizations.
      operationId: get-system-status
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "diagnostics": [
                            {
                                "category": "ntp",
                                "status": 1,
                                "details": "System clock is in-sync",
                                "offset": -0.0038368701934814453
                            },
                            {
                                "category": "harvester",
                                "status": 1,
                                "last_harvest_time": "2019-02-22 13:30:26",
                                "impaired_orgs": {},
                                "details": "Harvesters are running"
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  diagnostics:
                    type: array
                    items:
                      type: object
                      properties:
                        category:
                          type: string
                          example: ntp
                        status:
                          type: integer
                          example: 1
                          default: 0
                        details:
                          type: string
                          example: System clock is in-sync
                        offset:
                          type: number
                          example: -0.0038368701934814453
                          default: 0
      deprecated: false
  /prototype/diagnostics/queues/status/get:
    get:
      summary: Get Queue Status
      description: Shows the slowest jobs, worker count and statistics and job speed
      operationId: get-queue-status
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "p2": 0,
                        "p0": 0,
                        "p1": 0,
                        "slowest_jobs": [
                            [
                                "GCE:MapReduceClusterHarvester",
                                15.280488
                            ],
                            [
                                "AZURE_ARM:AzureArmStorageContainerHarvester",
                                11.226849
                            ],
                            [
                                "DivvyFilterManager",
                                9.402082
                            ],
                            [
                                "AWS:ServiceCertificateHarvest",
                                9.148045333333334
                            ],
                            [
                                "AWSEventBusConsumer",
                                8.909614142857142
                            ],
                            [
                                "GCE:GoogleSubnetHarvester",
                                7.135402
                            ],
                            [
                                "AZURE_ARM:NetworkPeerHarvester",
                                5.313696
                            ],
                            [
                                "AWS:ServiceUserHarvester",
                                4.636979
                            ],
                            [
                                "AZURE_ARM:SharedFileSystemHarvester",
                                4.389165
                            ],
                            [
                                "ALICLOUD:StorageContainerHarvester",
                                3.968515
                            ],
                            [
                                "GCE:DistributedTableClusterHarvester",
                                3.806011
                            ],
                            [
                                "AWS:StorageContainerHarvester",
                                3.5808968333333326
                            ],
                            [
                                "GCE:GoogleComputeEngineNetworkAclHarvest",
                                3.558788
                            ],
                            [
                                "ALICLOUD:InstanceInterfaceIpHarvester",
                                3.2020592763157882
                            ],
                            [
                                "AZURE_ARM:WebAppHarvester",
                                2.907902
                            ],
                            [
                                "ALICLOUD:AvailabilityZoneHarvester",
                                2.8897190526315786
                            ],
                            [
                                "AWS:WorkspaceHarvester",
                                2.5722628409090915
                            ],
                            [
                                "AZURE_ARM:AzureArmInstanceInterfaceIpHarvest",
                                2.4660735
                            ],
                            [
                                "GCE:ServerlessFunctionHarvester",
                                2.407109
                            ],
                            [
                                "ALICLOUD:ApiAccountingConfigHarvester",
                                2.2879886315789473
                            ],
                            [
                                "ALICLOUD:DatabaseInstanceHarvester",
                                2.2771493421052638
                            ],
                            [
                                "GCE:InstanceInterfaceIpHarvester",
                                2.2328605
                            ]
                        ],
                        "process_time": {
                            "count": 3601,
                            "min": 0.003476,
                            "max": 15.280488,
                            "sum": 3160.407532999996,
                            "sumsq": 7520.6560858188195,
                            "stddev": 1.148299865699771,
                            "average": 0.8776471905026371
                        },
                        "workers": 8,
                        "queue_wait": {
                            "count": 3558,
                            "min": 0.003239,
                            "max": 4.759295,
                            "sum": 3808.9797149999986,
                            "sumsq": 6281.956512760676,
                            "stddev": 0.7872138688149389,
                            "average": 1.0705395489038783
                        }
                    }
              schema:
                type: object
                properties:
                  p2:
                    type: integer
                    example: 0
                    default: 0
                  p0:
                    type: integer
                    example: 0
                    default: 0
                  p1:
                    type: integer
                    example: 0
                    default: 0
                  slowest_jobs:
                    type: array
                    items:
                      type: array
                  process_time:
                    type: object
                    properties:
                      count:
                        type: integer
                        example: 3601
                        default: 0
                      min:
                        type: number
                        example: 0.003476
                        default: 0
                      max:
                        type: number
                        example: 15.280488
                        default: 0
                      sum:
                        type: number
                        example: 3160.407532999996
                        default: 0
                      sumsq:
                        type: number
                        example: 7520.6560858188195
                        default: 0
                      stddev:
                        type: number
                        example: 1.148299865699771
                        default: 0
                      average:
                        type: number
                        example: 0.8776471905026371
                        default: 0
                  workers:
                    type: integer
                    example: 8
                    default: 0
                  queue_wait:
                    type: object
                    properties:
                      count:
                        type: integer
                        example: 3558
                        default: 0
                      min:
                        type: number
                        example: 0.003239
                        default: 0
                      max:
                        type: number
                        example: 4.759295
                        default: 0
                      sum:
                        type: number
                        example: 3808.9797149999986
                        default: 0
                      sumsq:
                        type: number
                        example: 6281.956512760676
                        default: 0
                      stddev:
                        type: number
                        example: 0.7872138688149389
                        default: 0
                      average:
                        type: number
                        example: 1.0705395489038783
                        default: 0
      deprecated: false
  /public/cloud/eventdrivenharvest/consumer/{organizationid}/producers/add:
    post:
      summary: Add Producer
      description: Adding an EDH Producer
      operationId: add-edh-producer
      parameters:
        - name: organizationid
          in: path
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"dropped": []}'
              schema:
                type: object
                properties:
                  dropped:
                    type: array
      deprecated: false
      requestBody:
        content:
          application/json:
            schema: {}
            examples:
              Request Example:
                value:
                  organization_service_ids:
                    - 13
                  regions:
                    - us-east-1
                    - us-east-2
                    - us-west-1
                    - us-west-2
                    - eu-west-1
                    - eu-west-2
                    - eu-west-3
                    - eu-central-1
                    - ap-northeast-1
                    - ap-northeast-2
                    - ap-southeast-1
                    - ap-southeast-2
                    - sa-east-1
                    - ap-south-1
                    - ca-central-1
                    - eu-north-1
                  resource_types:
                    - bigdatainstance
                    - autoscalinggroup
                    - autoscalinglaunchconfiguration
                    - instance
                    - volume
                    - snapshot
                    - storagecontainer
                    - resourceaccesslist
                    - loadbalancer
                    - privatenetwork
                    - privatesubnet
                    - secret
                    - serviceuser
                    - servicegroup
                    - servicerole
                    - serviceaccesskey
                    - serviceencryptionkey
                    - sshkeypair
                    - networkinterface
                    - internetgateway
                    - natgateway
                    - routetable
                    - servicepolicy
                    - dbinstance
                    - dbcluster
                    - dbsnapshot
                    - identityprovider
                    - serviceloggroup
                    - hypervisor
                    - networkflowlog
                    - networkpeer
                    - awsplacementgroup
                    - mcinstance
                    - esinstance
                    - notificationtopic
                    - notificationsubscription
                    - stacktemplate
                    - divvyorganizationservice
                    - restapikey
                  enable_all_types: false
                  propagate:
                    by_badge: false
                    badges: []
                    by_consumer: false
                  should_provision_iam: true
                  should_provision_cloudwatch: true
  /public/cloud/eventdrivenharvest/{organization}/disable-consumer:
    delete:
      summary: Remove EDH Consumer
      description: ''
      operationId: remove-edh-consumer
      parameters:
        - name: organization
          in: path
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/cloud/producers/list:
    post:
      summary: List Producers
      description: ''
      operationId: list-producers
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "producers": [
                            {
                                "account_id": "123456789",
                                "resource_id": "divvyorganizationservice:26",
                                "target_organization_service_id": 24,
                                "resource_types": 18,
                                "enable_all_types": false,
                                "errors": [],
                                "organization_service_id": 26,
                                "name": "Divvycloud - Producer",
                                "cloud_type_id": "AWS",
                                "regions": 15,
                                "events": 0,
                                "pending": false
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  producers:
                    type: array
                    items:
                      type: object
                      properties:
                        account_id:
                          type: string
                          example: '123456789'
                        resource_id:
                          type: string
                          example: divvyorganizationservice:26
                        target_organization_service_id:
                          type: integer
                          example: 24
                          default: 0
                        resource_types:
                          type: integer
                          example: 18
                          default: 0
                        enable_all_types:
                          type: boolean
                          example: false
                          default: true
                        errors:
                          type: array
                        organization_service_id:
                          type: integer
                          example: 26
                          default: 0
                        name:
                          type: string
                          example: Divvycloud - Producer
                        cloud_type_id:
                          type: string
                          example: AWS
                        regions:
                          type: integer
                          example: 15
                          default: 0
                        events:
                          type: integer
                          example: 0
                          default: 0
                        pending:
                          type: boolean
                          example: false
                          default: true
      deprecated: false
  /public/cloud/eventdrivenharvest/producers/disable:
    post:
      summary: Remove EDH Producer
      description: ''
      operationId: remove-edh-producer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_ids:
                  type: string
            examples:
              Request Example:
                value:
                  resource_ids:
                    - divvyorganizationservice:14
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/resource/{org_id}/properties/set:
    post:
      summary: Add Custom Properties
      description: ''
      operationId: add-custom-properties
      parameters:
        - name: org_id
          in: path
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                RAW_BODY:
                  type: string
            examples:
              Request Example:
                value:
                  property_list:
                    - name: marketing
                      value: department
                      type_hint: int
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/cloud/eventdrivenharvest/{organizationid}:
    post:
      summary: Add Consumer
      description: Adds a EDH Consumer by organization ID
      operationId: add-edh-consumer
      parameters:
        - name: organizationid
          in: path
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/cloud/consumers:
    get:
      summary: List Consumers
      description: ''
      operationId: list-consumers
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "consumers": [
                            {
                                "producers": 0,
                                "errors": [],
                                "organization_service_id": 10,
                                "name": "Divvycloud - Consumer",
                                "cloud_type_id": "AWS",
                                "events": 38,
                                "pending": false,
                                "account_id": "123456789"
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  consumers:
                    type: array
                    items:
                      type: object
                      properties:
                        producers:
                          type: integer
                          example: 0
                          default: 0
                        errors:
                          type: array
                        organization_service_id:
                          type: integer
                          example: 10
                          default: 0
                        name:
                          type: string
                          example: Divvycloud - Consumer
                        cloud_type_id:
                          type: string
                          example: AWS
                        events:
                          type: integer
                          example: 38
                          default: 0
                        pending:
                          type: boolean
                          example: false
                          default: true
                        account_id:
                          type: string
                          example: '123456789'
      deprecated: false
  /public/cloud/domain/{organization_name}/edit:
    post:
      summary: Update Cloud Organization
      description: Update credentials and settings for an existing Cloud Organization.
      operationId: edit-cloud-organization
      parameters:
        - name: organization_name
          in: path
          description: The name of the existing Cloud organization within InsightCloudSec.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - cloud_type
                - nickname
                - credentials
              properties:
                cloud_type:
                  type: string
                  description: 'The type of Cloud Organization to add. Options are: `AWS`, `AZURE_ARM`, or `GCE`.'
                nickname:
                  type: string
                  description: '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.*'
                credentials:
                  type: string
                  description: The credentials necessary for InsightCloudSec to interact with the organization. Since the credentials vary depending on the `cloud_type`, review the examples above for more information. The string must contain a JSON object, but any double quotes must be escaped (`\"`).
                parent_folder_id:
                  type: string
                  description: An ID for a parent folder. Only projects/subscriptions/accounts under the matching ID will be added to InsightCloudSec.
                auto_add:
                  type: boolean
                  description: '*GCP only*. If `true`, automatically adds all projects associated with the organization. If `false`, each project must be added to InsightCloudSec manually.'
                  default: false
                auto_remove:
                  type: boolean
                  description: '*GCP only*. If `true`, InsightCloudSec will automatically remove projects that have been deleted within GCP.'
                  default: false
                auto_badge:
                  type: boolean
                  description: '*GCP only*. If `true`, InsightCloudSec will automatically badge projects within the organization with folder-related information.'
                  default: false
                skip_prefixes:
                  type: array
                  description: Prefix for projects/subscriptions/accounts to skip adding to InsightCloudSec.
                  items:
                    type: string
                remove_suspended:
                  type: boolean
                  description: '*AWS and Azure only*. If `true`, InsightCloudSec will automatically remove accounts/subscriptions that have been suspended within AWS.'
                  default: false
            examples:
              AWS:
                value:
                  cloud_type: AWS
                  nickname: aws-org-nickname
                  credentials: '{"organization_assumed_role_config":{"RoleArn":"{{aws_role_arn}}","RoleSessionName":"{{aws_role_session_name}}","DurationSeconds":3600,"ExternalId": ""},"member_accounts_assumed_role_config":{"RoleArnSuffix":"{{aws_role_arn_suffix}}","RoleSessionName":"{{aws_role_session_name}}","DurationSeconds":3600,"ExternalId": ""},"long_term_credentials":{"AccessKeyId":"{{aws_access_key_id}}","SecretAccessKey":"{{aws_secret_access_key}}"}}'
                  skip_prefixes: []
                  parent_folder_id: []
                  remove_suspended: false
              Azure:
                value:
                  cloud_type: AZURE_ARM
                  nickname: az-org-nickname
                  credentials: '{"api_key":"{{az_api_key}}","app_id":"{{az_app_id}}","tenant_id":"{{az_tenant_id}}"}'
                  skip_prefixes: []
                  parent_folder_id: []
                  auto_remove: false
              GCP:
                value:
                  cloud_type: GCE
                  nickname: gcp-org-nickname
                  credentials: '{"type": "service_account","project_id": "gcp_project","private_key_id": "123456c03b40edc187b2de0f8b425d43f587b","private_key": "-----BEGIN PRIVATE KEY-----\qwewrteyru\nPHertertwerwerqwf+5rmmk8bHPjddfgdfgd82jL7ZRDPAfzAy+FJIDqwepcKFEf3Ovuyi+KI7mI9EpiYLOPR1RyS6x\nyuiyuigsdfs\asdasdaiskjfdhsgdfgd\sadfas123dasda1234234hdpAbXMlJvvXyr2SB9h61C4r9SseUXDlIKoxJLTj4gmyBZ7aD6lvpaK0X1DEHWtw\noN8ODN4X6bvG5m7HeZAKQUXJQ8/C221gPM5Dasd45567fgnxSsbLqNGKJecMgJjl4asdasdVrdUqMOY/jL\nxtcb4LKDFJLDGKJG787sfakj621mnbFSJHgadsfsdfsdgWtz2az\nsuRWzN/+VDlcNFYK/WiXTKoH9SeSpYD4DW/sOT52pWyXM5BM9OOo2R8iNe0CYxcw\nnmM/nKCZAgMBAAECggqweqwefsdfasdasdb019823085e6dvbjsdfhgkwjyhrwerJKJ(98787SJHDJSD656SDHg65hgNbasdfu65asdasdqasdfqweqweqweqwerwerwerzfgdfgdfgfgLKSFLKSDFLKasdasdDFX1aznyasdLP+zYe+8Sasd2cPtasdasda\n-----END PRIVATE KEY-----\n","client_email": "person@gcp_project.iam.gserviceaccount.com","client_id": "12312323232355689067856858567","auth_uri": "https://accounts.google.com/o/oauth2/auth","token_uri": "https://oauth2.googleapis.com/token","auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/person%40gcp_project.iam.gserviceaccount.com"}'
                  skip_prefixes:
                    - test_prefix
                  auto_add: false
                  auto_remove: false
                  auto_badge: false
                  parent_folder_id: []
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/cloud/domain/add:
    post:
      summary: Add Cloud Organization
      description: Add a Cloud Organization to InsightCloudSec.
      operationId: add-cloud-organization
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - cloud_type
                - credentials
                - nickname
              properties:
                cloud_type:
                  type: string
                  description: 'The type of Cloud Organization to add. Options are: `AWS`, `AZURE_ARM`, or `GCE`.'
                credentials:
                  type: string
                  description: The credentials necessary for InsightCloudSec to interact with the organization. Since the credentials vary depending on the `cloud_type`, review the examples above for more information. The string must contain a JSON object, but any double quotes must be escaped (`\"`).
                nickname:
                  type: string
                  description: '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.*'
                auto_add:
                  type: boolean
                  description: '*GCP only*. If `true`, automatically adds all projects associated with the organization. If `false`, each project must be added to InsightCloudSec manually.'
                  default: false
                auto_badge:
                  type: boolean
                  description: '*GCP only*. If `true`, InsightCloudSec will automatically badge projects within the organization with folder-related information.'
                  default: false
                auto_remove:
                  type: boolean
                  description: '*GCP only*. If `true`, InsightCloudSec will automatically remove projects that have been deleted within GCP.'
                  default: false
                domain_name:
                  type: string
                  description: A domain name for the Cloud Organization.
                parent_folder_id:
                  type: array
                  description: An ID for a parent folder. Only projects/subscriptions/accounts under the matching ID will be added to InsightCloudSec.
                  items:
                    type: string
                remove_suspended:
                  type: boolean
                  description: '*AWS and Azure only*. If `true`, InsightCloudSec will automatically remove accounts/subscriptions that have been suspended within AWS.'
                  default: false
                skip_prefixes:
                  type: array
                  description: Prefix for projects/subscriptions/accounts to skip adding to InsightCloudSec.
                  items:
                    type: string
            examples:
              AWS:
                value:
                  cloud_type: AWS
                  nickname: aws-org-nickname
                  credentials: '{"organization_assumed_role_config":{"RoleArn":"{{aws_role_arn}}","RoleSessionName":"{{aws_role_session_name}}","DurationSeconds":3600,"ExternalId": ""},"member_accounts_assumed_role_config":{"RoleArnSuffix":"{{aws_role_arn_suffix}}","RoleSessionName":"{{aws_role_session_name}}","DurationSeconds":3600,"ExternalId": ""},"long_term_credentials":{"AccessKeyId":"{{aws_access_key_id}}","SecretAccessKey":"{{aws_secret_access_key}}"}}'
                  skip_prefixes: []
                  parent_folder_id: []
                  remove_suspended: false
              Azure:
                value:
                  cloud_type: AZURE_ARM
                  nickname: az-org-nickname
                  credentials: '{"api_key":"{{az_api_key}}","app_id":"{{az_app_id}}","tenant_id":"{{az_tenant_id}}"}'
                  skip_prefixes: []
                  parent_folder_id: []
                  auto_remove: false
              GCP:
                value:
                  cloud_type: GCE
                  nickname: gcp-org-nickname
                  credentials: '{"type": "service_account","project_id": "gcp_project","private_key_id": "123456c03b40edc187b2de0f8b425d43f587b","private_key": "-----BEGIN PRIVATE KEY-----\qwewrteyru\nPHertertwerwerqwf+5rmmk8bHPjddfgdfgd82jL7ZRDPAfzAy+FJIDqwepcKFEf3Ovuyi+KI7mI9EpiYLOPR1RyS6x\nyuiyuigsdfs\asdasdaiskjfdhsgdfgd\sadfas123dasda1234234hdpAbXMlJvvXyr2SB9h61C4r9SseUXDlIKoxJLTj4gmyBZ7aD6lvpaK0X1DEHWtw\noN8ODN4X6bvG5m7HeZAKQUXJQ8/C221gPM5Dasd45567fgnxSsbLqNGKJecMgJjl4asdasdVrdUqMOY/jL\nxtcb4LKDFJLDGKJG787sfakj621mnbFSJHgadsfsdfsdgWtz2az\nsuRWzN/+VDlcNFYK/WiXTKoH9SeSpYD4DW/sOT52pWyXM5BM9OOo2R8iNe0CYxcw\nnmM/nKCZAgMBAAECggqweqwefsdfasdasdb019823085e6dvbjsdfhgkwjyhrwerJKJ(98787SJHDJSD656SDHg65hgNbasdfu65asdasdqasdfqweqweqweqwerwerwerzfgdfgdfgfgLKSFLKSDFLKasdasdDFX1aznyasdLP+zYe+8Sasd2cPtasdasda\n-----END PRIVATE KEY-----\n","client_email": "person@gcp_project.iam.gserviceaccount.com","client_id": "12312323232355689067856858567","auth_uri": "https://accounts.google.com/o/oauth2/auth","token_uri": "https://oauth2.googleapis.com/token","auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/person%40gcp_project.iam.gserviceaccount.com"}'
                  skip_prefixes:
                    - test_prefix
                  auto_add: false
                  auto_remove: false
                  auto_badge: false
                  parent_folder_id: []
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/cloud/domain/remove:
    post:
      summary: Delete Cloud Organization
      description: ''
      operationId: delete-cloud-organization
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      requestBody:
        content:
          application/json:
            schema: {}
            examples:
              Request Example:
                value:
                  domain_ids:
                    - '170005165293'
  /public/cloud/domains:
    get:
      summary: List Cloud Organizations
      description: ''
      operationId: list-cloud-organizations
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"domains": [{"organization_id": 1, "status": 1, "auto_badge": false, "auto_add": false, "added_timestamp": "2019-05-01T16:08:48Z", "failures": 0, "cloud_type_id": "GCE", "domain_id": "170005165293", "projects": 0, "domain_name": "divvycloud.com"}]}'
              schema:
                type: object
                properties:
                  domains:
                    type: array
                    items:
                      type: object
                      properties:
                        organization_id:
                          type: integer
                          example: 1
                          default: 0
                        status:
                          type: integer
                          example: 1
                          default: 0
                        auto_badge:
                          type: boolean
                          example: false
                          default: true
                        auto_add:
                          type: boolean
                          example: false
                          default: true
                        added_timestamp:
                          type: string
                          example: '2019-05-01T16:08:48Z'
                        failures:
                          type: integer
                          example: 0
                          default: 0
                        cloud_type_id:
                          type: string
                          example: GCE
                        domain_id:
                          type: string
                          example: '170005165293'
                        projects:
                          type: integer
                          example: 0
                          default: 0
                        domain_name:
                          type: string
                          example: divvycloud.com
      deprecated: false
  /datacollections:
    get:
      summary: List Data Collections
      description: ''
      operationId: list-data-collections
      parameters:
        - name: detailed_counts
          in: query
          description: If `'true'`, include detailed counts, like the number of dependent insights.
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "collections": [
                        {
                          "insights_count": 0,
                          "name": "Known Accounts",
                          "data_count": 2,
                          "inserted_at": "2019-05-08T16:12:07Z",
                          "bots_count": 0,
                          "updated_at": "2019-05-08T16:12:07Z",
                          "organization_id": 1,
                          "id": 3
                        },
                        {
                          "insights_count": 0,
                          "name": "Known External Accounts",
                          "data_count": 4,
                          "inserted_at": "2019-05-10T15:50:25Z",
                          "bots_count": 0,
                          "updated_at": "2019-05-10T15:50:25Z",
                          "organization_id": 1,
                          "id": 6
                        },
                        {
                          "insights_count": 0,
                          "name": "Invalid Actions",
                          "data_count": 2,
                          "inserted_at": "2019-05-10T15:54:36Z",
                          "bots_count": 0,
                          "updated_at": "2019-05-10T15:54:36Z",
                          "organization_id": 1,
                          "id": 7
                        },
                        {
                          "insights_count": 0,
                          "name": "Known Service Account Whitelist",
                          "data_count": 10,
                          "inserted_at": "2019-05-10T16:11:49Z",
                          "bots_count": 0,
                          "updated_at": "2019-05-10T16:11:49Z",
                          "organization_id": 1,
                          "id": 8
                        },
                        {
                          "insights_count": 0,
                          "name": "Blacklisted IAM Policies",
                          "data_count": 4,
                          "inserted_at": "2019-05-14T15:55:02Z",
                          "bots_count": 0,
                          "updated_at": "2019-05-14T15:55:02Z",
                          "organization_id": 1,
                          "id": 9
                        }
                      ]
                    }
              schema:
                type: object
                properties:
                  collections:
                    type: array
                    items:
                      type: object
                      properties:
                        insights_count:
                          type: integer
                          example: 0
                          default: 0
                        name:
                          type: string
                          example: Known Accounts
                        data_count:
                          type: integer
                          example: 2
                          default: 0
                        inserted_at:
                          type: string
                          example: '2019-05-08T16:12:07Z'
                        bots_count:
                          type: integer
                          example: 0
                          default: 0
                        updated_at:
                          type: string
                          example: '2019-05-08T16:12:07Z'
                        organization_id:
                          type: integer
                          example: 1
                          default: 0
                        id:
                          type: integer
                          example: 3
                          default: 0
      deprecated: false
    post:
      summary: Create Data Collections
      description: Creates a data collection.
      operationId: create-data-collections
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - collection_name
                - collection_data
              properties:
                collection_name:
                  type: string
                  description: Name of the collection to be created.
                collection_data:
                  type: object
                  description: Key-value pairs to initialize the data collection with.
                  properties:
                    key:
                      type: string
                      description: 'Pair consisting of a value ("key") and an optional description ("value"); the description must still be passed as a empty string (`""`). *Note: The key in a given pair can be custom (for example: `"test-value": "test-value description"`), but due to a limitation with Readme, it can''t be changed using this tool. Remember to update it after copying the example to your code.*'
            examples:
              Request Example:
                value:
                  collection_name: API-created collection
                  collection_data: {}
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "collection": {
                        "name": "API-created collection",
                        "data_count": 1,
                        "inserted_at": "2019-05-14T18:43:40Z",
                        "updated_at": "2019-05-14T18:43:40Z",
                        "organization_id": 1,
                        "id": 15
                      }
                    }
              schema:
                type: object
                properties:
                  collection:
                    type: object
                    properties:
                      name:
                        type: string
                        example: API-created collection
                      data_count:
                        type: integer
                        example: 1
                        default: 0
                      inserted_at:
                        type: string
                        example: '2019-05-14T18:43:40Z'
                      updated_at:
                        type: string
                        example: '2019-05-14T18:43:40Z'
                      organization_id:
                        type: integer
                        example: 1
                        default: 0
                      id:
                        type: integer
                        example: 15
                        default: 0
      deprecated: false
    delete:
      summary: Delete Data Collections
      description: ''
      operationId: delete-data-collections
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - collection_ids
              properties:
                collection_ids:
                  type: array
                  description: Array containing IDs of collections to be deleted.
                  items:
                    type: integer
                    format: int32
            examples:
              Request Example:
                value:
                  collection_ids:
                    - 13
                    - 15
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{"deleted": [13, 15]}'
              schema:
                type: object
                properties:
                  deleted:
                    type: array
                    items:
                      type: integer
                      example: 13
                      default: 0
      deprecated: false
  /public/insights/pack/create:
    post:
      summary: Create Insight Pack
      description: Creates a custom insight pack.
      operationId: create-insight-pack
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                backoffice:
                  type: array
                  items:
                    type: integer
                custom:
                  type: array
                  items:
                    type: integer
                badges:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                      value:
                        type: string
                badge_filter_operator:
                  type: string
                  default: OR
                base_pack_ids:
                  type: array
                  items:
                    type: string
            examples:
              Request Example:
                value:
                  name: InsightCloudSec
                  description: Documentation
                  backoffice: []
                  custom: []
                  badges: []
                  badge_filter_operator: OR
                  base_pack_ids: []
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n\t\"description\": \"Documentation\",\n\t\"pack_id\": 7,\n\t\"organization_id\": 1,\n\t\"base_pack_id\": null,\n\t\"badges\": null,\n\t\"badge_filter_operator\": null,\n\t\"name\": \"name\",\n\t\"custom\": [],\n\t\"source\": \"custom\",\n\t\"logo_url\": null,\n\t\"backoffice\": []\n}"
      deprecated: false
  /subscriptions:
    post:
      summary: Create Email Subscription
      description: Creates an email subscription for an insight pack or a compliance scorecard. Requires an ID from an existing [compliance scorecard configuration](#list-compliance-scorecard-configurations) or [insight pack](#list-packs).
      operationId: create-subscription
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - schedule
                - day_of_month
                - day_of_week
                - hour
                - minute
                - email_addresses
                - item_type
                - item_id
              properties:
                name:
                  type: string
                  description: The name of the subscription.
                schedule:
                  type: string
                  description: 'The cadence at which the subscription will be sent. Options: `daily`, `weekly`, `monthly`'
                  default: weekly
                day_of_month:
                  type: integer
                  description: The numbered day of the month the subscription will be sent. Use `-1` if the `schedule` is set to `daily` or `weekly`.
                  default: -1
                  format: int32
                day_of_week:
                  type: string
                  description: The day of the week the subscription will be sent. Use `null` if the `schedule` is set to `daily` or `monthly`.
                  default: Monday
                hour:
                  type: integer
                  description: The hour the subscription will be sent.
                  default: 1
                  format: int32
                minute:
                  type: integer
                  description: The minute the subscription will be sent.
                  default: 15
                  format: int32
                email_addresses:
                  type: array
                  description: List of email addresses to which to send the subscription.
                  items:
                    type: string
                email_sub_title:
                  type: string
                  description: Optional email sub-title for the subscription.
                item_type:
                  type: string
                  description: 'Type of subscription. Options: `scorecard`, `pack`'
                  enum:
                    - scorecard
                    - pack
                item_id:
                  type: integer
                  description: ID for the item initiating the subscription (insight pack or compliance scorecard). See [Create Compliance Scorecard Configuration](ref:create-compliance-scorecard-configuration) and [Generate Compliance Scorecard Configuration Export ID](ref:generate-compliance-scorecard-configuration-export-id) for more information.
                  format: int32
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "id": 4, 
                      "organization_id": 1, 
                      "name": "my-subscription", 
                      "schedule": "weekly", 
                      "day_of_month": -1, 
                      "day_of_week": "Monday", 
                      "hour": 1, 
                      "minute": 15, 
                      "email_addresses": [
                        "user@divvycloud.com"
                      ], 
                      "email_sub_title": "Hello World!", 
                      "badges": null, 
                      "badge_filter_operator": null
                    }
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 4
                    default: 0
                  organization_id:
                    type: integer
                    example: 1
                    default: 0
                  name:
                    type: string
                    example: my-subscription
                  schedule:
                    type: string
                    example: weekly
                  day_of_month:
                    type: integer
                    example: -1
                    default: 0
                  day_of_week:
                    type: string
                    example: Monday
                  hour:
                    type: integer
                    example: 1
                    default: 0
                  minute:
                    type: integer
                    example: 15
                    default: 0
                  email_addresses:
                    type: array
                    items:
                      type: string
                      example: user@divvycloud.com
                  email_sub_title:
                    type: string
                    example: Hello World!
                  badges: {}
                  badge_filter_operator: {}
      deprecated: false
    get:
      summary: List Email Subscriptions
      description: Lists email subscriptions for insight packs and compliance scorecards.
      operationId: list-compliance-scorecard-email-subscriptions
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "pack": [
                          {
                            "id": 5,
                            "organization_id": 1,
                            "name": "my-custom-insight-pack-sub",
                            "schedule": "weekly",
                            "day_of_month": -1,
                            "day_of_week": "monday",
                            "hour": 3,
                            "minute": 0,
                            "email_addresses": ["email@divvycloud.com"],
                            "email_sub_title": "",
                            "badges": [],
                            "badge_filter_operator": null,
                            "pack_type": "custom",
                            "pack_id": 1
                          }
                        ],
                        "scorecard": [
                          {
                            "export_id": 1,
                            "export_name": "test-export-group",
                            "resource_tags": [],
                            "resource_badges": [],
                            "id": 1,
                            "organization_id": 1,
                            "name": "test-email-sub",
                            "schedule": "daily",
                            "day_of_month": -1,
                            "day_of_week": null,
                            "hour": 0,
                            "minute": 0,
                            "email_addresses": ["jkauffman503@gmail.com"],
                            "email_sub_title": "hello!",
                            "badges": [],
                            "badge_filter_operator": "OR"
                          }
                       ]
                    }
              schema:
                type: object
                properties:
                  pack:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 5
                          default: 0
                        organization_id:
                          type: integer
                          example: 1
                          default: 0
                        name:
                          type: string
                          example: my-custom-insight-pack-sub
                        schedule:
                          type: string
                          example: weekly
                        day_of_month:
                          type: integer
                          example: -1
                          default: 0
                        day_of_week:
                          type: string
                          example: monday
                        hour:
                          type: integer
                          example: 3
                          default: 0
                        minute:
                          type: integer
                          example: 0
                          default: 0
                        email_addresses:
                          type: array
                          items:
                            type: string
                            example: email@divvycloud.com
                        email_sub_title:
                          type: string
                          example: ''
                        badges:
                          type: array
                        badge_filter_operator: {}
                        pack_type:
                          type: string
                          example: custom
                        pack_id:
                          type: integer
                          example: 1
                          default: 0
                  scorecard:
                    type: array
                    items:
                      type: object
                      properties:
                        export_id:
                          type: integer
                          example: 1
                          default: 0
                        export_name:
                          type: string
                          example: test-export-group
                        resource_tags:
                          type: array
                        resource_badges:
                          type: array
                        id:
                          type: integer
                          example: 1
                          default: 0
                        organization_id:
                          type: integer
                          example: 1
                          default: 0
                        name:
                          type: string
                          example: test-email-sub
                        schedule:
                          type: string
                          example: daily
                        day_of_month:
                          type: integer
                          example: -1
                          default: 0
                        day_of_week: {}
                        hour:
                          type: integer
                          example: 0
                          default: 0
                        minute:
                          type: integer
                          example: 0
                          default: 0
                        email_addresses:
                          type: array
                          items:
                            type: string
                            example: jkauffman503@gmail.com
                        email_sub_title:
                          type: string
                          example: hello!
                        badges:
                          type: array
                        badge_filter_operator:
                          type: string
                          example: OR
      deprecated: false
  /datacollections/{collection_id}:
    get:
      summary: Get Data Collection Data
      description: ''
      operationId: get-data-collection-data
      parameters:
        - name: collection_id
          in: path
          description: The ID of the data collection we want to list the contents of.
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "collection": {
                        "name": "Known External Accounts",
                        "data_count": 4,
                        "inserted_at": "2019-05-10T15:50:25Z",
                        "updated_at": "2019-05-10T15:50:25Z",
                        "organization_id": 1,
                        "data": [
                          {
                            "id": 11,
                            "value": "577108014889",
                            "description": "Webapp Scanning Service Account"
                          },
                          {
                            "id": 12,
                            "value": "521453105102",
                            "description": "Logging Service Read-Only Account"
                          },
                          {
                            "id": 13,
                            "value": "595527399710",
                            "description": "Notification Account"
                          },
                          {
                            "id": 14,
                            "value": "467568912987",
                            "description": "DivvyCloud Account"
                          }
                        ],
                        "id": 6
                      }
                    }
              schema:
                type: object
                properties:
                  collection:
                    type: object
                    properties:
                      name:
                        type: string
                        example: Known External Accounts
                      data_count:
                        type: integer
                        example: 4
                        default: 0
                      inserted_at:
                        type: string
                        example: '2019-05-10T15:50:25Z'
                      updated_at:
                        type: string
                        example: '2019-05-10T15:50:25Z'
                      organization_id:
                        type: integer
                        example: 1
                        default: 0
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 11
                              default: 0
                            value:
                              type: string
                              example: '577108014889'
                            description:
                              type: string
                              example: Webapp Scanning Service Account
                      id:
                        type: integer
                        example: 6
                        default: 0
      deprecated: false
    delete:
      summary: Delete Data Collection Entries
      description: ''
      operationId: testinput
      parameters:
        - name: collection_id
          in: path
          description: The ID of the collection from which entries will be deleted.
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - data_ids
              properties:
                data_ids:
                  type: array
                  description: Array of integers specifying the IDs of entries to be deleted.
                  default:
                    - null
                    - 400
                    - null
                  items:
                    type: integer
                    format: int32
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "deleted": 2
                    }
              schema:
                type: object
                properties:
                  deleted:
                    type: integer
                    example: 2
                    default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
    patch:
      summary: Rename Data Collection
      description: ''
      operationId: rename-data-collection
      parameters:
        - name: collection_id
          in: path
          description: The ID of the collection to rename
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - collection_name
              properties:
                collection_name:
                  type: string
                  description: The new name for the data collection
            examples:
              Request Example:
                value:
                  collection_name: NewNameForDataCollection
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "renamed": 13
                    }
              schema:
                type: object
                properties:
                  renamed:
                    type: integer
                    example: 13
                    default: 0
      deprecated: false
    post:
      summary: Add to Data Collection
      description: ''
      operationId: add-to-data-collection
      parameters:
        - name: collection_id
          in: path
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                collection_data:
                  type: array
                  items:
                    type: string
            examples:
              Request Example:
                value:
                  collection_data:
                    IP: 192.168.1.1
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /subscriptions/ondemand:
    post:
      summary: Send On Demand Email
      description: ''
      operationId: send-on-demand-email
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscription_ids:
                  type: integer
                  description: The ID of the email subscription you want to send on demand.
                  format: int32
            examples:
              Request Example:
                value:
                  subscription_ids:
                    - 8
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /compliance/score-card/export-upload/{export_id}/validate:
    post:
      summary: Validate Scorecard Export
      description: ''
      operationId: validate-scorecard-export
      parameters:
        - name: export_id
          in: path
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "validated": true
                    }
              schema:
                type: object
                properties:
                  validated:
                    type: boolean
                    example: true
                    default: true
      deprecated: false
  /compliance/score-card/export-upload/{export_id}/ondemand:
    post:
      summary: Export On Demand
      description: Triggers an export to send to the storage container on demand
      operationId: export-on-demand
      parameters:
        - name: export_id
          in: path
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /compliance/score-card/export-upload:
    get:
      summary: List Compliance Scorecard Export Groups
      description: Lists the compliance scorecard export groups, including S3 bucket information and the amount of compliance scorecard configurations associated with the group.
      operationId: list-compliance-scorecard-exports
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    [
                        {
                          "id": 1,
                          "organization_id": 1,
                          "name": "my-export-group",
                          "upload_enabled": true,
                          "bucket": {
                            "organization_service_id": 258,
                            "account_name": "my-aws-cloud-account",
                            "cloud_type_id": "AWS",
                            "resource_id": "storagecontainer:258:us-east-1:divvycloud-scorecard-bucket:",
                            "name": "divvycloud-scorecard-bucket",
                            "region_name": "us-east-1",
                            "public": false
                          },
                          "configs": [1],
                          "last_run_timestamp": "2021-04-07T03:00:11Z",
                          "error": null,
                          "inserted_at": "2021-04-06T18:14:08Z",
                          "updated_at": "2021-04-06T18:14:08Z",
                          "resource_tags": []
                        }
                    ]
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                      default: 0
                    organization_id:
                      type: integer
                      example: 1
                      default: 0
                    name:
                      type: string
                      example: my-export-group
                    upload_enabled:
                      type: boolean
                      example: true
                      default: true
                    bucket:
                      type: object
                      properties:
                        organization_service_id:
                          type: integer
                          example: 258
                          default: 0
                        account_name:
                          type: string
                          example: my-aws-cloud-account
                        cloud_type_id:
                          type: string
                          example: AWS
                        resource_id:
                          type: string
                          example: 'storagecontainer:258:us-east-1:divvycloud-scorecard-bucket:'
                        name:
                          type: string
                          example: divvycloud-scorecard-bucket
                        region_name:
                          type: string
                          example: us-east-1
                        public:
                          type: boolean
                          example: false
                          default: true
                    configs:
                      type: array
                      items:
                        type: integer
                        example: 1
                        default: 0
                    last_run_timestamp:
                      type: string
                      example: '2021-04-07T03:00:11Z'
                    error: {}
                    inserted_at:
                      type: string
                      example: '2021-04-06T18:14:08Z'
                    updated_at:
                      type: string
                      example: '2021-04-06T18:14:08Z'
                    resource_tags:
                      type: array
      deprecated: false
    post:
      summary: Generate Compliance Scorecard Configuration Export ID
      description: |-
        Generates a Compliance Scorecard Configuration Export ID.

        *Note: This ID necessary for [creating a scorecard configuration](ref:create-compliance-scorecard-configuration) and [subscription](ref:create-subscription).*
      operationId: generate-compliance-scorecard-configuration-export-id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the Compliance Scorecard Configuration. *Note: This should be a name for a **new** scorecard configuration.*'
            examples:
              Request Example:
                value:
                  name: My Scorecard Configuration
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "id": 277
                    }
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 277
                    default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /compliance/score-card/export-data:
    post:
      summary: Generate Compliance Scorecard Report
      description: Generates a Compliance Scorecard report in JSON format.
      operationId: generate-compliance-scorecard-report
      parameters:
        - name: pack_ids
          in: query
          description: The ID for the Insight Pack the Compliance Scorecard is based on in the format of `<pack-type>:<id>`. Pack type can be `backoffice` (for InsightCloudSec authored Insight Packs) or `custom` (for user authored Insight Packs).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - resource_scope
                - insight_filters
              properties:
                resource_scope:
                  type: object
                  description: The scope for the Compliance Scorecard.
                  required:
                    - scope_type
                  properties:
                    scope_type:
                      type: string
                      description: Scope type for the compliance scorecard.
                      enum:
                        - divvyorganizationservice
                        - containercluster
                        - kubernetesnamespace
                        - resourcegroup
                    organization_service_filters:
                      type: object
                      description: Filters used when the scope type is set to `divvyorganizationservice`.
                      properties:
                        organization_service_ids:
                          type: array
                          description: List of InsightCloudSec IDs for clouds or organizations.
                          items:
                            type: string
                        cloud_types:
                          type: array
                          description: 'List of Cloud types. Options are: `"ALICLOUD"`, `"AWS"`, `"AWS_GOV"`, `"AWS_CHINA"`, `"AZURE_ARM"`, `"AZURE_CHINA"`, `"AZURE_GOV"`, `"GCE"`, `"K8S"`, or `"OCI"`.'
                          items:
                            type: string
                        badges:
                          type: array
                          description: List of badge names.
                          items:
                            type: string
                    kubernetes_filters:
                      type: object
                      description: Filters used when the scope type is set to `kubernetesnamespace` or `containercluster`.
                      properties: {}
                    resource_group_filters:
                      type: object
                      description: Filters used when the scope type is set to `resourcegroup`.
                      properties: {}
                insight_filters:
                  type: object
                  description: Additional filters for the Insights within the selected Insight Pack.
                  properties:
                    severity:
                      type: array
                      description: 'List of Insight severities as integers. The integer-severity mapping is as follows: `1` = Info, `2` = Low, `3` = Medium, `4` = High, `5` = Critical'
                      items:
                        type: integer
                    insight_ids:
                      type: array
                      description: List of Insight IDs within the selected Insight Pack in the format of `"<pack-type>:<id>"`. Pack type can be `backoffice` (for InsightCloudSec authored Insight Packs) or `custom` (for user authored Insight Packs).
                      items:
                        type: string
                    resource_types:
                      type: array
                      description: List of InsightCloudSec resource types.
                      items:
                        type: string
            examples:
              Cloud/Cluster:
                value:
                  resource_scope:
                    scope_type: divvyorganizationservice
                    resource_group_filters:
                      azure_resource_group_ids: []
                      custom_resource_group_ids: []
                    kubernetes_filters:
                      cluster_ids: []
                      namespace_ids: []
                      badges: []
                    organization_service_filters:
                      organization_service_ids:
                        - 24
                        - 28
                        - 456
                        - 45
                      cloud_types:
                        - AWS
                        - AZURE_ARM
                        - GCE
                      badges: []
                  insight_filters:
                    severity: []
                    insight_ids:
                      - backoffice:8
                    resource_types: []
              Resource Group:
                value:
                  resource_scope:
                    scope_type: resourcegroup
                    resource_group_filters:
                      azure_resource_group_ids:
                        - 25
                        - 26
                        - 27
                      custom_resource_group_ids:
                        - 30
                        - 31
                        - 32
                    kubernetes_filters:
                      cluster_ids: []
                      namespace_ids: []
                      badges: []
                    organization_service_filters:
                      organization_service_ids: []
                      cloud_types: []
                      badges: []
                  insight_filters:
                    severity: []
                    insight_ids: []
                    resource_types: []
              Cluster:
                value:
                  resource_scope:
                    scope_type: containercluster
                    resource_group_filters:
                      azure_resource_group_ids: []
                      custom_resource_group_ids: []
                    kubernetes_filters:
                      cluster_ids:
                        - 1233
                        - 1234
                        - 1235
                      namespace_ids: []
                      badges: []
                    organization_service_filters:
                      organization_service_ids: []
                      cloud_types: []
                      badges: []
                  insight_filters:
                    severity: []
                    insight_ids: []
                    resource_types: []
              Namespace:
                value:
                  resource_scope:
                    scope_type: kubernetesnamespace
                    resource_group_filters:
                      azure_resource_group_ids: []
                      custom_resource_group_ids: []
                    kubernetes_filters:
                      cluster_ids:
                        - 1233
                      namespace_ids: []
                      badges: []
                    organization_service_filters:
                      organization_service_ids: []
                      cloud_types: []
                      badges: []
                  insight_filters:
                    severity: []
                    insight_ids: []
                    resource_types: []
      responses:
        '200':
          description: '200'
          content:
            text/plain:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /compliance/score-card/backoffice/{pack_id}:
    post:
      summary: Get InsightCloudSec Insight Compliance Pack
      description: Retrieves an InsightCloudSec-authored Insight Compliance Pack.
      operationId: get-featured-insight-compliance-pack
      parameters:
        - name: pack_id
          in: path
          description: The ID for the Insight Pack the Compliance Scorecard is based on.
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - resource_scope
                - insight_filters
                - page_data
              properties:
                resource_scope:
                  type: object
                  description: The scope for the Compliance Scorecard.
                  required:
                    - scope_type
                  properties:
                    scope_type:
                      type: string
                      description: Scope type for the compliance scorecard.
                      enum:
                        - divvyorganizationservice
                        - containercluster
                        - kubernetesnamespace
                        - resourcegroup
                    organization_service_filters:
                      type: object
                      description: Filters used when the scope type is set to `divvyorganizationservice`.
                      properties:
                        organization_service_ids:
                          type: array
                          description: List of InsightCloudSec IDs for clouds or organizations.
                          items:
                            type: string
                        cloud_types:
                          type: array
                          description: 'List of Cloud types. Options are: `"ALICLOUD"`, `"AWS"`, `"AWS_GOV"`, `"AWS_CHINA"`, `"AZURE_ARM"`, `"AZURE_CHINA"`, `"AZURE_GOV"`, `"GCE"`, `"K8S"`, or `"OCI"`.'
                          items:
                            type: string
                        badges:
                          type: array
                          description: List of badge names.
                          items:
                            type: string
                    kubernetes_filters:
                      type: object
                      description: Filters used when the scope type is set to `kubernetesnamespace` or `containercluster`.
                      properties: {}
                    resource_group_filters:
                      type: object
                      description: Filters used when the scope type is set to `resourcegroup`.
                      properties: {}
                insight_filters:
                  type: object
                  description: Additional filters for the Insights within the selected Insight Pack.
                  properties:
                    severity:
                      type: array
                      description: List of Insight severities.
                      items:
                        type: string
                    insight_ids:
                      type: array
                      description: List of Insight IDs within the selected Insight Pack in the format of `"<pack-type>:<id>"`. Pack type can be `backoffice` (for InsightCloudSec authored Insight Packs) or `custom` (for user authored Insight Packs).
                      items:
                        type: string
                    resource_types:
                      type: array
                      description: List of InsightCloudSec resource types.
                      items:
                        type: string
                page_data:
                  type: object
                  description: Pagination settings for selecting a subset of the data returned with the request.
                  properties:
                    row:
                      type: object
                      description: Page data row specification.
                      properties: {}
                    column:
                      type: object
                      description: Page data column specification.
                      properties: {}
            examples:
              Cloud/Cluster Example:
                value:
                  resource_scope:
                    scope_type: divvyorganizationservice
                    organization_service_filters:
                      organization_service_ids: []
                      cloud_types:
                        - AWS
                        - AWS_GOV
                        - AWS_CHINA
                      badges: []
                  insight_filters:
                    severity: []
                    insight_ids: []
                    resource_types: []
                  page_data:
                    row:
                      page: 1
                      page_size: 20
                    column:
                      page: 1
                      page_size: 20
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Cloud/Cluster Example:
                  value: |-
                    {
                        "page_data": {
                            "row": {
                                "total_pages": 1,
                                "page": 1,
                                "page_size": 20,
                                "total_count": 3
                            },
                            "column": {
                                "total_pages": 3,
                                "page": 1,
                                "page_size": 20,
                                "total_count": 45
                            }
                        },
                        "data": {
                            "scorecard": [
                                {
                                    "id": "backoffice:393",
                                    "name": "Access Analyzer Not Enabled In Cloud Region",
                                    "severity": 4,
                                    "custom_severity": null,
                                    "metadata": null,
                                    "series": [
                                        {
                                            "id": 9950,
                                            "value": "Okay",
                                            "name": "AWS-IAR",
                                            "cloud_type_id": "AWS",
                                            "cloud_type_name": "Amazon Web Services",
                                            "organization_service_name": "AWS-Org",
                                            "account_id": "123456789",
                                            "resource_group_name": null,
                                            "resource_group_type": null,
                                            "impacted_resources": 3,
                                            "exempt_resources": 0,
                                            "total_resources": 21,
                                            "nested_scope_ids": []
                                        },
                                        {
                                            "id": 9949,
                                            "value": "Okay",
                                            "name": "QA STS account",
                                            "cloud_type_id": "AWS",
                                            "cloud_type_name": "Amazon Web Services",
                                            "organization_service_name": "AWS-ORg-2t",
                                            "account_id": "987654321",
                                            "resource_group_name": null,
                                            "resource_group_type": null,
                                            "impacted_resources": 17,
                                            "exempt_resources": 0,
                                            "total_resources": 17,
                                            "nested_scope_ids": []
                                        }
                                            ],
                            "resource_scope_type": "divvyorganizationservice",
                            "downloadable": true,
                            "last_cache_update": "2021-11-09T13:07:02.951777"
                        },
                        "finding_history": {  
                              "10/26/2021": {
                                "clouds_in_scope": 0,
                                "resources_in_scope": 0,
                                "total_findings": 0,
                                "minor_findings": 0,
                                "moderate_findings": 0,
                                "major_findings": 0,
                                "severe_findings": 0,
                                "critical_findings": 0
                            }
                        },
                        "insight_notes": {
                            "backoffice:393": {
                                "name": "Access Analyzer Not Enabled In Cloud Region",
                                "notes": "Overview\n----------\nAWS Identity and Access Management (IAM) Access Analyzer is a new feature that makes it simple for security teams and administrators to check that their policies provide only the intended access to resources. Resource policies allow customers to granularly control who is able to access a specific resource and how they are able to use it across the entire cloud environment. With one click in the IAM console, customers can enable IAM Access Analyzer across their account to continuously analyze permissions granted using policies associated with their Amazon S3 buckets, AWS KMS keys, Amazon SQS queues, AWS IAM roles, and AWS Lambda functions.\n\nAccess Analyzer analyzes the following resource types:\n- Amazon Simple Storage Service Buckets\n- AWS Identity and Access Management Roles\n- AWS Key Management Service Keys\n- AWS Lambda Functions and Layers\n- Amazon Simple Queue Service Queues\n\n## Remediation\n### Enabling Access Analyzer\nTo enable Access Analyzer in a Region, you must create an analyzer in that Region. You must create an analyzer in each Region in which you want to monitor access to your resources.\n\n### To create an analyzer\n- Open the IAM console at https://console.aws.amazon.com/iam/.\n- Choose Access analyzer.\n- Choose Create analyzer.\n- On the Create analyzer page, confirm that the Region displayed is the Region where you want to enable Access Analyzer.\n- Enter a name for the analyzer.\n- Optional. Add any tags that you want to apply to the analyzer.\n- Choose Create Analyzer.\n\n### This can also be created using the \"Enable Regional IAM Access Analyzer\" bot action\n\n### Documentation\nhttps://aws.amazon.com/about-aws/whats-new/2019/12/introducing-aws-identity-and-access-management-access-analyzer/\n\n### Compliance Information\n  - ISO 27001: A.13.1.1 - Network controls, A.12.4.1 - Event logging, A.16.1.7 - Collection of evidence\n  - Center for Internet Security (CIS) - AWS 1.3.0: 1.21\n  - SOC 2: CC5.2, CC6.1, CC6.6\n  - PCI DSS Pack : Requirement 7\n  - NIST Cyber Security Framework (CSF) : PR.AC-1, PR.AC-3, PR.AC-4, PR.AC-6, PR.AC-7\n  - Center for Internet Security (CIS) - AWS 1.4.0: 1.20"
                            },
                            "backoffice:54": {
                                "name": "Access List Default Allows Ingress/Egress (Security Group)",
                                "notes": "Overview\n----------\n\nCloud Networks come with default Access Lists (Security Groups) with initial settings that deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. Users often change these settings, however, to make the security groups more permissive. If you don't specify a security group when you launch an instance, the instance is automatically assigned to this default security group, which may have been changed with more permissive settings. As security groups provide stateful filtering of ingress/egress network traffic to cloud resources, it is recommended that all instances are assigned to a specific security group (and that the default security group restrict all traffic).\n\n\n### Remediation\n\nLeverage Bot automation to identify and monitor for default Access Lists (Security Groups) that have at least one rule permitting ingress traffic (and therefore egress traffic)\n\n### Recommend Bot Workflow\n\n - Mark Resource Noncompliant: Mark default Access Lists (Security Groups) that have at least one rule permitting ingress traffic\n - Send Email/Slack Notification: Notify operations/security team of default Access Lists (Security Groups) that have at least one rule permitting ingress traffic. Separately, using cloud badges or resource tags, identify Access Lists (Security Groups) owners and notify them of the steps needed to remove security group inbound \n\n### Amazon Web Services\n1. Login to the AWS Management Console at https://console.aws.amazon.com/vpc/home\n2. Repeat the next steps for all VPCs - including the default VPC in each AWS region:\n3. In the left pane, click Security Groups\n4. For each default security group, perform the following:\n   o Select the default security group\n   o Click the Inbound Rules tab\n   o Remove any inbound rules\n   o Click the Outbound Rules tab\n   o Remove any outbound rules\n\n### Compliance Information\n  - Center for Internet Security (CIS) - AWS 1.2.0 (Legacy): Networking 4.4\n  - GDPR: Article 25: Data protection by Design and by Default\n  - SOC 2 (Legacy): C1.2, C1.3, C1.7, CC5.6\n  - FedRAMP CCM 3.0.1: IVS-11\n  - CSA Cloud Controls Matrix (CCM): GRM-01, IVS-12\n  - ISO 27001: A.13.1.1 - Network controls\n  - Center for Internet Security (CIS) - AWS 1.3.0: 5.3\n  - SOC 2: CC6.1\n  - PCI DSS Pack : Requirement 7\n  - NIST Cyber Security Framework (CSF) : PR.AC-4\n  - Center for Internet Security (CIS) - AWS 1.4.0: 5.3"
                            }
                         }
                    }
      deprecated: false
  /prototype/resource/divvyorganizationservice:{{orgid}}/name/set:
    post:
      summary: Update Cloud Name
      description: ''
      operationId: update-cloud-name
      parameters:
        - name: orgid
          in: path
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
            examples:
              Request Example:
                value:
                  name: New Name Here!
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/clouds/reports/get:
    get:
      summary: Cloud Account Resource Counts
      description: ''
      operationId: managing-clouds
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "total_clouds": 6,
                        "report_data": {
                            "last_refreshed": "2019-08-09T21:15:25Z",
                            "by_provider": {
                                "GCE": 2,
                                "ALICLOUD": 1,
                                "AWS": 2,
                                "AZURE_ARM": 1
                            },
                            "by_type": [
                                {
                                    "cloud_type_id": "AZURE_ARM",
                                    "resource_counts": {
                                        "servicerole": 82,
                                        "storageaccount": 19,
                                        "networkinterface": 18,
                                        "distributedtable": 1,
                                        "serviceuser": 3,
                                        "servicegroup": 1,
                                        "appserver": 3,
                                        "serviceencryptionkeyvault": 3,
                                        "servicepolicy": 2,
                                        "privatesubnet": 14,
                                        "instance": 6,
                                        "resourceaccesslist": 17,
                                        "resourceaccesslistrule": 112,
                                        "storagecontainer": 29,
                                        "volume": 15,
                                        "serviceregion": 30,
                                        "webapp": 3,
                                        "divvyorganizationservice": 1,
                                        "dbinstance": 5,
                                        "privatenetwork": 13,
                                        "mcinstance": 1,
                                        "dnszone": 1,
                                        "routetable": 2,
                                        "privateimage": 15,
                                        "snapshot": 55
                                    },
                                    "name": "Divvycloud - Azure",
                                    "resource_id": "divvyorganizationservice:4"
                                },
                                {
                                    "cloud_type_id": "AWS",
                                    "resource_counts": {
                                        "serviceaccesskey": 23,
                                        "serviceencryptionkey": 29,
                                        "serverlessfunction": 7,
                                        "servicerole": 53,
                                        "networkinterface": 4,
                                        "notificationtopic": 1,
                                        "servicecertificate": 6,
                                        "serviceuser": 20,
                                        "serviceloggroup": 17,
                                        "networkflowlog": 8,
                                        "servicepolicy": 40,
                                        "privatesubnet": 43,
                                        "publicip": 3,
                                        "instance": 4,
                                        "secret": 4,
                                        "stacktemplate": 2,
                                        "resourceaccesslist": 34,
                                        "resourceaccesslistrule": 88,
                                        "messagequeue": 56,
                                        "restapi": 2,
                                        "storagecontainer": 4,
                                        "notificationsubscription": 2,
                                        "volume": 4,
                                        "internetgateway": 16,
                                        "divvyorganizationservice": 1,
                                        "privatenetwork": 16,
                                        "routetable": 16,
                                        "dbsnapshot": 4,
                                        "privateimage": 3,
                                        "restapistage": 3,
                                        "snapshot": 6,
                                        "serviceregion": 17,
                                        "apiaccountingconfig": 1,
                                        "sshkeypair": 3
                                    },
                                    "name": "Divvycloud - AWS",
                                    "resource_id": "divvyorganizationservice:41"
                                },
                                {
                                    "cloud_type_id": "AWS",
                                    "resource_counts": {
                                        "serviceaccesskey": 48,
                                        "restapikey": 5,
                                        "serviceencryptionkey": 150,
                                        "serverlessfunction": 35,
                                        "servicerole": 139,
                                        "servicealarm": 113,
                                        "notificationtopic": 20,
                                        "dbcluster": 7,
                                        "networkinterface": 104,
                                        "mlinstance": 5,
                                        "mcsnapshot": 7,
                                        "distributedtable": 4,
                                        "natgateway": 3,
                                        "servicecertificate": 7,
                                        "pod": 8,
                                        "serviceuser": 39,
                                        "coldstorage": 1,
                                        "resourceaccesslistrule": 590,
                                        "serviceloggroup": 76,
                                        "servicegroup": 2,
                                        "container": 8,
                                        "networkendpoint": 3,
                                        "networkflowlog": 18,
                                        "autoscalinggroup": 1,
                                        "divvyorganizationservice": 1,
                                        "servicepolicy": 117,
                                        "privatesubnet": 77,
                                        "publicip": 11,
                                        "instance": 27,
                                        "secret": 7,
                                        "streaminstance": 1,
                                        "bigdatasnapshot": 35,
                                        "containerimage": 2,
                                        "stacktemplate": 14,
                                        "resourceaccesslist": 125,
                                        "containerregistry": 4,
                                        "threatfinding": 62,
                                        "emailservicedomain": 1,
                                        "messagequeue": 331,
                                        "contentdeliverynetwork": 4,
                                        "restapi": 6,
                                        "instancereservation": 2,
                                        "storagecontainer": 76,
                                        "notificationsubscription": 15,
                                        "volume": 27,
                                        "serviceregion": 16,
                                        "sharedfilesystem": 6,
                                        "directconnect": 1,
                                        "bigdatainstance": 1,
                                        "dbinstance": 4,
                                        "privatenetwork": 41,
                                        "servicedomain": 1,
                                        "datastream": 17,
                                        "identityprovider": 6,
                                        "deliverystream": 3,
                                        "mcinstance": 2,
                                        "dbsnapshot": 351,
                                        "routetable": 62,
                                        "privateimage": 223,
                                        "restapistage": 6,
                                        "dnszone": 13,
                                        "mapreducecluster": 8,
                                        "snapshot": 470,
                                        "workspace": 2,
                                        "internetgateway": 21,
                                        "apiaccountingconfig": 2,
                                        "sshkeypair": 82,
                                        "loadbalancer": 6,
                                        "esinstance": 2
                                    },
                                    "name": "Divvycloud - AWS",
                                    "resource_id": "divvyorganizationservice:43"
                                },
                                {
                                    "cloud_type_id": "GCE",
                                    "resource_counts": {
                                        "serviceaccesskey": 10,
                                        "servicegroup": 2,
                                        "servicerole": 10,
                                        "networkpeer": 2,
                                        "servicepolicy": 1,
                                        "privatesubnet": 21,
                                        "privateimage": 36,
                                        "resourceaccesslistrule": 60,
                                        "notificationsubscription": 3,
                                        "volume": 1,
                                        "serviceregion": 20,
                                        "notificationtopic": 5,
                                        "divvyorganizationservice": 1,
                                        "serviceuser": 13,
                                        "resourceaccesslist": 20,
                                        "storagecontainer": 3,
                                        "loadbalancer": 8,
                                        "privatenetwork": 2
                                    },
                                    "name": "Divvycloud - GCP",
                                    "resource_id": "divvyorganizationservice:3"
                                },
                                {
                                    "cloud_type_id": "GCE",
                                    "resource_counts": {
                                        "serviceaccesskey": 49,
                                        "forwardingrule": 3,
                                        "serviceencryptionkey": 2,
                                        "serverlessfunction": 1,
                                        "servicerole": 15,
                                        "networkpeer": 2,
                                        "notificationtopic": 4,
                                        "servicecertificate": 2,
                                        "serviceuser": 12,
                                        "servicegroup": 2,
                                        "serviceencryptionkeyvault": 2,
                                        "publicip": 15,
                                        "instance": 10,
                                        "storagecontainer": 7,
                                        "notificationsubscription": 4,
                                        "volume": 31,
                                        "serviceregion": 20,
                                        "backendservice": 4,
                                        "divvyorganizationservice": 1,
                                        "privatenetwork": 3,
                                        "dnszone": 2,
                                        "privateimage": 37,
                                        "targetproxy": 2,
                                        "dbsnapshot": 15,
                                        "snapshot": 1,
                                        "containercluster": 3,
                                        "loadbalancer": 2
                                    },
                                    "name": "Divvycloud - GCP 2",
                                    "resource_id": "divvyorganizationservice:39"
                                },
                                {
                                    "cloud_type_id": "ALICLOUD",
                                    "resource_counts": {
                                        "serviceaccesskey": 11,
                                        "publicip": 3,
                                        "servicegroup": 1,
                                        "servicerole": 2,
                                        "routetable": 2,
                                        "divvyorganizationservice": 1,
                                        "privatesubnet": 3,
                                        "storagecontainer": 4,
                                        "resourceaccesslistrule": 5,
                                        "volume": 5,
                                        "instance": 5,
                                        "serviceregion": 20,
                                        "serviceuser": 15,
                                        "resourceaccesslist": 2,
                                        "sshkeypair": 2,
                                        "privatenetwork": 2
                                    },
                                    "name": "Divvycloud - Alicloud",
                                    "resource_id": "divvyorganizationservice:42"
                                }
                            ]
                        }
                    }
              schema:
                type: object
                properties:
                  total_clouds:
                    type: integer
                    example: 6
                    default: 0
                  report_data:
                    type: object
                    properties:
                      last_refreshed:
                        type: string
                        example: '2019-08-09T21:15:25Z'
                      by_provider:
                        type: object
                        properties:
                          GCE:
                            type: integer
                            example: 2
                            default: 0
                          ALICLOUD:
                            type: integer
                            example: 1
                            default: 0
                          AWS:
                            type: integer
                            example: 2
                            default: 0
                          AZURE_ARM:
                            type: integer
                            example: 1
                            default: 0
                      by_type:
                        type: array
                        items:
                          type: object
                          properties:
                            cloud_type_id:
                              type: string
                              example: AZURE_ARM
                            resource_counts:
                              type: object
                              properties:
                                servicerole:
                                  type: integer
                                  example: 82
                                  default: 0
                                storageaccount:
                                  type: integer
                                  example: 19
                                  default: 0
                                networkinterface:
                                  type: integer
                                  example: 18
                                  default: 0
                                distributedtable:
                                  type: integer
                                  example: 1
                                  default: 0
                                serviceuser:
                                  type: integer
                                  example: 3
                                  default: 0
                                servicegroup:
                                  type: integer
                                  example: 1
                                  default: 0
                                appserver:
                                  type: integer
                                  example: 3
                                  default: 0
                                serviceencryptionkeyvault:
                                  type: integer
                                  example: 3
                                  default: 0
                                servicepolicy:
                                  type: integer
                                  example: 2
                                  default: 0
                                privatesubnet:
                                  type: integer
                                  example: 14
                                  default: 0
                                instance:
                                  type: integer
                                  example: 6
                                  default: 0
                                resourceaccesslist:
                                  type: integer
                                  example: 17
                                  default: 0
                                resourceaccesslistrule:
                                  type: integer
                                  example: 112
                                  default: 0
                                storagecontainer:
                                  type: integer
                                  example: 29
                                  default: 0
                                volume:
                                  type: integer
                                  example: 15
                                  default: 0
                                serviceregion:
                                  type: integer
                                  example: 30
                                  default: 0
                                webapp:
                                  type: integer
                                  example: 3
                                  default: 0
                                divvyorganizationservice:
                                  type: integer
                                  example: 1
                                  default: 0
                                dbinstance:
                                  type: integer
                                  example: 5
                                  default: 0
                                privatenetwork:
                                  type: integer
                                  example: 13
                                  default: 0
                                mcinstance:
                                  type: integer
                                  example: 1
                                  default: 0
                                dnszone:
                                  type: integer
                                  example: 1
                                  default: 0
                                routetable:
                                  type: integer
                                  example: 2
                                  default: 0
                                privateimage:
                                  type: integer
                                  example: 15
                                  default: 0
                                snapshot:
                                  type: integer
                                  example: 55
                                  default: 0
                            name:
                              type: string
                              example: Divvycloud - Azure
                            resource_id:
                              type: string
                              example: divvyorganizationservice:4
      deprecated: false
  /datacollections/{collection_id}/usages/insight:
    get:
      summary: Get Data Collection Usage for Insights
      description: ''
      operationId: get-data-collection-usage-for-insights
      parameters:
        - name: collection_id
          in: path
          description: Identifier for the data collection
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "insight": [
                            {
                                "severity": 1,
                                "insight_id": 22,
                                "description": "List of all known good IPs",
                                "organization_id": 1,
                                "source": "custom",
                                "name": "Whitelisted IPs"
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  insight:
                    type: array
                    items:
                      type: object
                      properties:
                        severity:
                          type: integer
                          example: 1
                          default: 0
                        insight_id:
                          type: integer
                          example: 22
                          default: 0
                        description:
                          type: string
                          example: List of all known good IPs
                        organization_id:
                          type: integer
                          example: 1
                          default: 0
                        source:
                          type: string
                          example: custom
                        name:
                          type: string
                          example: Whitelisted IPs
      deprecated: false
  /prototype/cloud/linked/list:
    get:
      summary: Cloud Account Coverage
      description: ''
      operationId: cloud-account-coverage
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    [
                        {
                            "status": "active",
                            "name": "Azure Account 1",
                            "joined_timestamp": null,
                            "resource_id": "divvyorganizationservice:4",
                            "cloud_type_id": "AZURE_ARM",
                            "account_id": "12345678-1234-4567-1234-1234567890"
                        },
                        {
                            "status": "active",
                            "name": "Azure Account 2",
                            "joined_timestamp": null,
                            "resource_id": null,
                            "cloud_type_id": "AZURE_ARM",
                            "account_id": "12345678-1234-4567-1234-1234567890"
                        }
                    ]
              schema:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      example: active
                    name:
                      type: string
                      example: Azure Account 1
                    joined_timestamp: {}
                    resource_id:
                      type: string
                      example: divvyorganizationservice:4
                    cloud_type_id:
                      type: string
                      example: AZURE_ARM
                    account_id:
                      type: string
                      example: 12345678-1234-4567-1234-1234567890
      deprecated: false
  /prototype/cloud/{orgid}/update:
    post:
      summary: Update Cloud
      description: ''
      operationId: update-cloud
      parameters:
        - name: orgid
          in: path
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Required field
                account_number:
                  type: integer
                  description: Required field
                  format: int32
                authentication_type:
                  type: string
                  description: Required field
                cloud_type:
                  type: string
                  description: Required field
                session_name:
                  type: string
                  description: Required field
                external_id:
                  type: string
                  description: Optional field
            examples:
              Request Example 1:
                value:
                  name: DivvyCloud - AWS
                  account_number: '123456789'
                  authentication_type: instance_assume_role
                  role_arn: arn:aws:iam::123456789:role/DivvyCloudRole
                  cloud_type: AWS
                  session_name: DivvyCloudRole
                  external_id: ''
              Request Example 2:
                value:
                  name: K8s
                  cloud_type: K8S
                  configuration: |-
                    apiVersion: v1
                    clusters:
                    - cluster:
                        certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFNU1ETXlOakF5TlRVd00xb1hEVEk1TURNeU16QXlOVFV3TTFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTGVCCmlJOU55SEd3NzZLOUQ5NUhQWlBtY0VoWitnVXZFM1lZa1k2M2dodGwzUjU2SVc1Mit1VWVqQ0ZsLzhMa0dnRVMKU0VLdWZ0ZnBCeWxnRFoxbWRYNWlrV1ZyNlJhcCs5c2NONGhaM1NFQW5WVThjREJiU3V0V2NNdk5IOVlZRCtMaAplczI1WFJLVXZBSnQxcTRPZGwrK1IrWUxyMlFoUmd5VnJRdHd4RkFnOWlqejRaK0hiMGhhSS8wOUVwZjFwbURBCk5mZEdGelJmQ3FiTk45QUZScmJnb2F6WGpoNlNxaG5JdENIcmxzN0w5QnVZaWJoNmRuRWZaSVo5WmZ0dlNDRisKanVHa0t4MlQyZFFQTWJ2WU81dnVTZnU1VmtDWDNWQ3h6YnJZVDVxMWN6cVFQYU1YTDF5WXcwZURWdVlJcnJjbApncnlsYTVVZmpCWkpvakVRaXNFQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFKTEtzQVQyYlRGMUpUQXAybU1GeldHZWlSSHkKWTU5b1dKSkdjbzVFa0FaWVVDVlNHVlpFeG1qdFFuQlhTVTlvWU1SYkZQb1dpcTVhZERXVWo2YlkzRnI2SUx6RQo2ZUJrb3oybVpld2QvTjFOVzAwalZxT1lpWG1LajhmNGdhRHl6N0pGY3BaSkIzRHlvRldKU3RmdnhzNWxQR2ZwCnllZWhWazVwbUtMZWZHQUc3N2k0OGc2Yk55a0ZyODRoc3FIYzhWK1VycGtneEQ1WDIvWVV1V09lcUcrWEw1ZXYKN3ZFQXBjclVjcVR5amNwY3J3QWFhM0FYR1ptRFlZS003MHRVaFhDMVp6a2RZcmRmc05IZDNidGZpZWtnU05EeQpsRE9sM0RGMjM5TTRsUitpcGxXS0VTT2xCMlloMjFHYTh6SU5rWnhVdERlK3FxdkVnbkx0cU5EbVJqVT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
                        server: https://192.168.1.1:6443
                      name: kubernetes
                    contexts:
                    - context:
                        cluster: kubernetes
                        namespace: default
                        user: boatymcboatfaces
                      name: boatface
                    current-context: boatymcboatface
                    kind: Config
                    preferences: {}
                    users:
                    - name: boatface
                      user:
                        token: eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1ZSBvbiBZYWhvbyBGaW5hbmNlLCBhbiBleGNsdXNpdmUgRG93IEpvbmVzICYgQ28uIHdhdGNobGlzdCBvZiBtb3JlIHRoYW4gMi40IG1pbGxpb24gaGlnaC1yaXNrIGNsaWVudHMgd2FzIHVuaW50ZW50aW9uYWxseSBleHBvc2VkIGR1ZSB0byBhIG1pc2NvbmZpZ3VyZWQgYW5kIHVuc2VjdXJlZCBFbGFzdGljc2VhcmNoIGRhdGFiYXNlIGhvc3RlZCBvbiBBV1MuIOKAb2pulsZtUqgLGRyAZ5hIJD9tqzhL07UAlcwcmcXTM9lCJ0Q_rzmXLZNJhYkwWjGpnnrwRhIQIJV9efHA7nwxCKFmWARfLPBoFocq57MQ7rpRYLJjyYIdcTuDR2UFTEpqsOu_Un6HXaRGAByZFLXDqPgiyMF-DmtqXYjAiq7mC1BV5azXgWqXmtGsgkL2cEBsTovrgXgg1pad_kMOOmGA
      responses:
        '201':
          description: '201'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/user/update_to_api_only_user:
    post:
      summary: Update to API-Only user
      description: 'Update an existing basic user to remove console access and generate a new API key to programmatically access InsightCloudSec. Admins cannot be API-Only user. Use create API key endpoint to generate API key for admins.*Note: Save the API key that is generated in a safe place, you cannot access the details after they are created and will have to generate a new key.*'
      operationId: update-to-api-only-user
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: string
                  description: user_id of a basic user only.
            examples:
              Request Example:
                value:
                  user_id: '3'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |
                    {
                        "user_id":"3",
                        "apikey":"JxyODZ7fzLiNgfvsdjepZo6UgOV1o2fBeWN5gvQ4LZsCOkbDL8s"
                    }
              schema:
                type: object
                properties:
                  user_id:
                    type: string
                    example: '3'
                  apikey:
                    type: string
                    example: JxyODZ7fzLiNgfvsdjepZo6UgOV1o2fBeWN5gvQ4LZsCOkbDL8s
        '500':
          description: '500'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "error_message": "Admins cannot be API only user. Use create api key endpoint to generate api key for admins",
                        "error_type": "ValueError"
                    }
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Admins cannot be API only user. Use create api key endpoint to generate api key for admins
                  error_type:
                    type: string
                    example: ValueError
      deprecated: false
  /public/user/create_api_only_user:
    post:
      summary: Create API-Only User
      description: |-
        Create a basic user without console access and a API key to programmatically access InsightCloudSec. 
        *Note: Save the API key that is generated in a safe place; you cannot access the details after they are created and will have to generate a new key.*
      operationId: create-api-only-user
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - email
                - username
              properties:
                name:
                  type: string
                  description: The name of the user.
                email:
                  type: string
                  description: The email of the user.
                username:
                  type: string
                  description: A username for logging into InsightCloudSec.
                expiration_date:
                  type: integer
                  description: The expiration date for the user, assuming the system is configured for maximum age of generated API keys.
                  format: int64
            examples:
              Request Example:
                value:
                  username: api-username
                  name: api-user-name
                  email: user@domain.com
                  expiration_date: 32514264000
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "user_id": 53,
                        "organization_id": 1,
                        "username": "api-username",
                        "name": "api-user-name",
                        "api_key": "JxyODZ7fzLiNgfvsdjepZo6UgOV1o2fBeWN5gvQ4LZsCOkbDL8s"
                    }
              schema:
                type: object
                properties:
                  user_id:
                    type: integer
                    example: 53
                    default: 0
                  organization_id:
                    type: integer
                    example: 1
                    default: 0
                  username:
                    type: string
                    example: api-username
                  name:
                    type: string
                    example: api-user-name
                  api_key:
                    type: string
                    example: JxyODZ7fzLiNgfvsdjepZo6UgOV1o2fBeWN5gvQ4LZsCOkbDL8s
      deprecated: false
  /public/user/update_console_access:
    post:
      summary: Update Console Access Denied Flag
      description: Set the console_access to `True` to deny console access for the user.
      operationId: update-console-access-denied-flag
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: string
                console_access_denied:
                  type: boolean
                  description: Sets the console_access_denied flag for the user account.
            examples:
              Request Example:
                value:
                  user_id: '3'
                  console_access_denied: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/create:
    post:
      summary: Create Exemption
      description: Create an exemption.
      operationId: create-exemption
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - approver
                - insight_id
                - insight_source
                - resource_ids
                - resource_type
              properties:
                approver:
                  type: string
                  description: The exemption approver.
                insight_id:
                  type: integer
                  description: ID for the Insight associated with the exemption.
                  format: int32
                insight_source:
                  type: string
                  description: 'Source for the Insight associated with the exemption. Options are: "custom" or "backoffice".'
                resource_ids:
                  type: string
                  description: List of IDs for the resources to be exempted from the given Insight.
                resource_type:
                  type: string
                  description: The type of resource being exempted.
                start_date:
                  type: string
                  description: Date the exemption begins in the format of "YYYY-MM-DD". If none is provided, the default is today.
                notes:
                  type: string
                  description: Any notes or documentation for the exemption.
                expiration_date:
                  type: string
                  description: Date the exemption ends in the format of "YYYY-MM-DD". If none is provided, the default is no expiration.
            examples:
              Request Example:
                value:
                  approver: example@example.com
                  expiration_date: '2021-10-19'
                  insight_id: 570
                  insight_source: custom
                  notes: Example for API Documentation
                  resource_ids:
                    - 'storagecontainer:123456:global:************************:'
                  resource_type: storagecontainer
                  start_date: '2021-10-16'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    [
                      {
                        "approver": "example@example.com",
                        "bot_id": null,
                        "create_date": "2021-09-21T02:10:12Z",
                        "creator_id": 579,
                        "enabled": true,
                        "exemption_id": 132247,
                        "expiration_date": "2021-10-19T00:00:00Z",
                        "insight_id": 570,
                        "insight_source": "custom",
                        "notes": "Example for API Documentation",
                        "organization_id": 1,
                        "resource_id": "storagecontainer:123456:global:************************:",
                        "resource_type": "storagecontainer",
                        "start_date": "2021-10-16T00:00:00Z"
                      }
                    ]
              schema:
                type: array
                items:
                  type: object
                  properties:
                    approver:
                      type: string
                      example: example@example.com
                    bot_id: {}
                    create_date:
                      type: string
                      example: '2021-09-21T02:10:12Z'
                    creator_id:
                      type: integer
                      example: 579
                      default: 0
                    enabled:
                      type: boolean
                      example: true
                      default: true
                    exemption_id:
                      type: integer
                      example: 132247
                      default: 0
                    expiration_date:
                      type: string
                      example: '2021-10-19T00:00:00Z'
                    insight_id:
                      type: integer
                      example: 570
                      default: 0
                    insight_source:
                      type: string
                      example: custom
                    notes:
                      type: string
                      example: Example for API Documentation
                    organization_id:
                      type: integer
                      example: 1
                      default: 0
                    resource_id:
                      type: string
                      example: 'storagecontainer:123456:global:************************:'
                    resource_type:
                      type: string
                      example: storagecontainer
                    start_date:
                      type: string
                      example: '2021-10-16T00:00:00Z'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/apikey/deactivate:
    post:
      summary: Deactivate API Keys
      description: Deactivate all keys associated with the user.
      operationId: deactivate-api-keys
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - user_id
              properties:
                user_id:
                  type: string
            examples:
              Request Example:
                value:
                  user_id: '3'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/list:
    post:
      summary: List Exemption
      description: List exemption(s) that match given criteria.
      operationId: list-exemption
      parameters:
        - name: page
          in: query
          description: The page number to retrieve.
          schema:
            type: string
        - name: page_size
          in: query
          description: The size of the page to retrieve.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                search:
                  type: string
                  description: 'Literal search to match provided string to the following values associated with any existing exemption: resource common name, resource provider ID, exemption creator, exemption approver, cloud name, or Insight name.'
                pack:
                  type: string
                  description: The name of the pack and Insight ID associated with a set of exemptions in the format of `pack-type:id`.
                badges:
                  type: array
                  description: The key-value pairs for badges associated with a set of exemptions.
                  items:
                    properties:
                      key:
                        type: string
                        description: Key for the badge.
                      value:
                        type: string
                        description: Value for the badge.
                    type: object
                badge_filter_operator:
                  type: string
                  description: 'Operator for evaluating multiple badges. Options are: "OR" or "AND".'
                enabled:
                  type: string
                  description: Set to `true` to return only enabled (active) exemptions.
      responses:
        '200':
          description: '200'
          content:
            text/plain:
              examples:
                Result:
                  value: |-
                    {
                      "data": [
                        {
                          "account": "AWS QA via STS",
                          "approver": "tester@insightcloudsec.com",
                          "cloud_type_id": "AWS",
                          "create_date": "2020-08-04T15:51:26Z",
                          "creator_id": 429,
                          "creator_name": "Tester 1",
                          "enabled": true,
                          "exemption_id": 988,
                          "expiration_date": null,
                          "insight_id": 20,
                          "insight_name": "Cloud Account Without Root Account MFA Protection",
                          "insight_source": "backoffice",
                          "notes": "",
                          "provider_id": "12345678910",
                          "resource_id": "divvyorganizationservice:343",
                          "resource_name": "AWS QA via STS",
                          "resource_type": "divvyorganizationservice",
                          "resource_type_label": "Cloud Account",
                          "severity": 5,
                          "start_date": "2021-04-01T00:00:00Z"
                        },
                        {
                          "account": "QualityLogic via IAR",
                          "approver": "tester2@insightcloudsec.com",
                          "cloud_type_id": "AWS",
                          "create_date": "2020-08-19T22:57:02Z",
                          "creator_id": 107,
                          "creator_name": "Tester2",
                          "enabled": false,
                          "exemption_id": 992,
                          "expiration_date": "2020-08-26T00:00:00Z",
                          "insight_id": 59,
                          "insight_name": "Instance Exposing SSH To World",
                          "insight_source": "backoffice",
                          "notes": "This instance called edh and owned by None is exempt.",
                          "provider_id": "i-041e05706d8178c01",
                          "resource_id": "instance:355:us-east-1:******************:",
                          "resource_name": "edh",
                          "resource_type": "instance",
                          "resource_type_label": "Instance",
                          "severity": 5,
                          "start_date": "2020-08-19T00:00:00Z"
                        }
                    }
        '400':
          description: '400'
          content:
            text/plain:
              examples:
                Result:
                  value: ''
      deprecated: false
  /public/exemptions/delete:
    post:
      summary: Delete Exemption
      description: Delete exemption(s) that match given criteria.
      operationId: delete-exemption
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - exemption_ids
              properties:
                exemption_ids:
                  type: array
                  description: List of exemption IDs to delete. If none are provided and no other criteria match, no exemptions will be deleted.
                  items:
                    type: integer
                    format: int32
                search:
                  type: string
                  description: 'Literal search to match provided string to the following values associated with any existing exemption: resource common name, resource provider ID, exemption creator, exemption approver, cloud name, or Insight name.'
                pack:
                  type: string
                  description: The name of the pack associated with a set of exemptions  and Insight ID associated with a set of exemptions in the format of `pack-type:id`.
                badges:
                  type: array
                  description: The key-value pairs for badges associated with a set of exemptions.
                  items:
                    properties:
                      key:
                        type: string
                        description: Key for the badge.
                      value:
                        type: string
                        description: Value for the badge.
                    type: object
                badge_filter_operator:
                  type: string
                  description: 'Operator for evaluating multiple badges. Options are: "OR" or "AND".'
            examples:
              Request Example:
                value:
                  exemption_ids:
                    - 1234
                  search: company_approver@company.com
                  pack: ''
                  badges: []
                  badge_filter_operator: OR
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/update:
    post:
      summary: Update Exemption
      description: Update an exemption.
      operationId: update-exemption
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - approver
                - exemption_id
              properties:
                approver:
                  type: string
                  description: The exemption approver.
                start_date:
                  type: string
                  description: Date the exemption begins in the format of "YYYY-MM-DD". If none is provided, the default is today.
                expiration_date:
                  type: string
                  description: Date the exemption ends in the format of "YYYY-MM-DD". If none is provided, the default is no expiration.
                enabled:
                  type: boolean
                  description: Indicates if the exemption is enabled.
                exemption_id:
                  type: integer
                  description: ID for the exemption to update.
                  format: int32
                notes:
                  type: string
                  description: Any notes or documentation for the exemption.
                pack:
                  type: string
                  description: The name of the pack associated with a set of exemptions  and Insight ID associated with a set of exemptions in the format of `pack-type:id`.
            examples:
              Request Example:
                value:
                  approver: example@example.com
                  exemption_id: 30
                  notes: notes to update here...
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "exemption_id": 30,
                        "organization_id": 1,
                        "resource_id": "instance:308:us-central1:sampleresourceID:",
                        "resource_type": "instance",
                        "insight_id": 281,
                        "insight_source": "backoffice",
                        "creator_id": 1,
                        "approver": "example@example.com",
                        "start_date": "2020-10-19T00:00:00Z",
                        "expiration_date": null,
                        "enabled": true,
                        "create_date": "2020-10-20T19:14:44Z",
                        "bot_id": null,
                        "notes": "notes to update here...",
                        "creator_name": "sample"
                    }
              schema:
                type: object
                properties:
                  exemption_id:
                    type: integer
                    example: 30
                    default: 0
                  organization_id:
                    type: integer
                    example: 1
                    default: 0
                  resource_id:
                    type: string
                    example: 'instance:308:us-central1:sampleresourceID:'
                  resource_type:
                    type: string
                    example: instance
                  insight_id:
                    type: integer
                    example: 281
                    default: 0
                  insight_source:
                    type: string
                    example: backoffice
                  creator_id:
                    type: integer
                    example: 1
                    default: 0
                  approver:
                    type: string
                    example: example@example.com
                  start_date:
                    type: string
                    example: '2020-10-19T00:00:00Z'
                  expiration_date: {}
                  enabled:
                    type: boolean
                    example: true
                    default: true
                  create_date:
                    type: string
                    example: '2020-10-20T19:14:44Z'
                  bot_id: {}
                  notes:
                    type: string
                    example: notes to update here...
                  creator_name:
                    type: string
                    example: sample
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/bulk_update:
    post:
      summary: Bulk Update Exemption
      description: Update exemptions in bulk.
      operationId: bulk-update-exemption
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - exemption_ids
              properties:
                exemption_ids:
                  type: array
                  description: List of exemption IDs to update. If none are provided and no other criteria match, no exemptions will be updated.
                  items:
                    type: integer
                    format: int32
                search:
                  type: string
                  description: 'Literal search to match provided string to the following values associated with any existing exemption: resource common name, resource provider ID, exemption creator, exemption approver, cloud name, or Insight name.'
                pack:
                  type: string
                  description: The name of the pack associated with a set of exemptions  and Insight ID associated with a set of exemptions in the format of `pack-type:id`.
                approver:
                  type: string
                  description: The exemption approver.
                start_date:
                  type: string
                  description: Date the exemption begins in the format of "YYYY-MM-DD". If none is provided, the default is today.
                expiration_date:
                  type: string
                  description: Date the exemption ends in the format of "YYYY-MM-DD". If none is provided, the default is no expiration.
                enabled:
                  type: boolean
                  description: Indicates if the exemption is enabled.
                notes:
                  type: string
                  description: Any notes or documentation for the exemption.
                badges:
                  type: array
                  description: The key-value pairs for badges associated with a set of exemptions.
                  items:
                    properties:
                      key:
                        type: string
                        description: Key for the badge.
                      value:
                        type: string
                        description: Value for the badge.
                    type: object
                badge_filter_operator:
                  type: string
                  description: 'Operator for evaluating multiple badges. Options are: "OR" or "AND".'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: ''
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /compliance/score-card/export-upload/configs:
    get:
      summary: List Compliance Scorecard Configurations
      description: Lists existing compliance scorecard configurations.
      operationId: list-compliance-scorecard-configurations
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                            "id": 13,
                            "organization_id": 1,
                            "name": "my-scorecard-config",
                            "backoffice_pack_id": 3,
                            "custom_pack_id": null,
                            "resource_scope": {
                                "scope_type": "divvyorganizationservice",
                                "kubernetes_filters": {},
                                "resource_group_filters": {},
                                "organization_service_filters": {
                                    "badges": [],
                                    "cloud_types": [
                                        "AWS",
                                        "AWS_GOV",
                                        "AWS_CHINA"
                                    ],
                                    "organization_service_ids": []
                                }
                            },
                            "insight_filters": {
                                "severity": [],
                                "insight_ids": [],
                                "resource_types": []
                            },
                            "threshold_info": {},
                            "bad_only": false,
                            "resource_tags": [],
                            "resource_badges": [],
                            "updated_at": "2021-10-20T15:16:59Z"
                        },
      deprecated: false
    post:
      summary: Create Compliance Scorecard Configuration
      description: |-
        Creates a Compliance Scorecard Configuration. 

        *Note: This endpoint requires an Export ID from the [Generate Compliance Scorecard Configuration Export ID](ref:generate-compliance-scorecard-configuration-export-id) endpoint. The configuration can then be used to create a [subscription](ref:create-subscription).*
      operationId: create-compliance-scorecard-configuration
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - backoffice_pack_id
                - custom_pack_id
                - export_id
              properties:
                organization_id:
                  type: integer
                  description: The InsightCloudSec Organization ID, which determines which cloud accounts are available for the configuration.
                  format: int32
                name:
                  type: string
                  description: The name of the Compliance Scorecard Configuration. This should match the name you provided to the [Generate Compliance Scorecard Configuration Export ID](ref:generate-compliance-scorecard-configuration-export-id) endpoint.
                backoffice_pack_id:
                  type: integer
                  description: The InsightCloudSec-authored Insight Pack ID to associate with the Compliance Scorecard. Only one of `backoffice_pack_id` or `custom_pack_id` can be provided.
                  format: int32
                custom_pack_id:
                  type: integer
                  description: The user-authored Insight Pack ID to associate with the Compliance Scorecard. Only one of `backoffice_pack_id` or `custom_pack_id` can be provided.
                  format: int32
                scorecard_scope:
                  type: object
                  description: The scope for the Compliance Scorecard.
                  required:
                    - scope_type
                  properties:
                    scope_type:
                      type: string
                      description: Scope type for the compliance scorecard.
                      enum:
                        - divvyorganizationservice
                        - containercluster
                        - kubernetesnamespace
                        - resourcegroup
                    organization_service_filters:
                      type: object
                      description: Filters used when the scope type is set to `divvyorganizationservice`.
                      properties:
                        organization_service_ids:
                          type: array
                          description: List of InsightCloudSec IDs for clouds or organizations.
                          items:
                            type: string
                        cloud_types:
                          type: array
                          description: 'List of Cloud types. Options are: `"ALICLOUD"`, `"AWS"`, `"AWS_GOV"`, `"AWS_CHINA"`, `"AZURE_ARM"`, `"AZURE_CHINA"`, `"AZURE_GOV"`, `"GCE"`, `"K8S"`, or `"OCI"`.'
                          items:
                            type: string
                        badges:
                          type: array
                          description: List of badge names.
                          items:
                            type: string
                    kubernetes_filters:
                      type: object
                      description: Filters used when the scope type is set to `kubernetesnamespace` or `containercluster`.
                      properties: {}
                    resource_group_filters:
                      type: object
                      description: Filters used when the scope type is set to `resourcegroup`.
                      properties: {}
                export_id:
                  type: integer
                  description: Export ID from the [Generate Compliance Scorecard Configuration Export ID](ref:generate-compliance-scorecard-configuration-export-id) endpoint.
                  format: int32
                resource_tags:
                  type: array
                  description: List of resource tags.
                  items:
                    type: string
                resource_badges:
                  type: array
                  description: List of resource badges.
                  items:
                    type: string
                bad_only:
                  type: boolean
                  description: Denotes whether to only include items that violate the compliance scope.
                  default: false
            examples:
              Request Example:
                value:
                  organization_id: 1
                  name: My Scorecard Configuration
                  backoffice_pack_id: 25
                  scorecard_scope:
                    resource_scope:
                      scope_type: divvyorganizationservice
                      resource_group_filters:
                        azure_resource_group_ids: []
                        custom_resource_group_ids: []
                      kubernetes_filters:
                        cluster_ids: []
                        namespace_ids: []
                        badges: []
                      organization_service_filters:
                        organization_service_ids:
                          - 24
                          - 28
                          - 456
                          - 45
                        cloud_types:
                          - AWS
                          - AZURE_ARM
                          - GCE
                        badges: []
                    insight_filters:
                      severity: []
                      insight_ids:
                        - backoffice:8
                      resource_types: []
                  export_id: 277
                  resource_tags: []
                  resource_badges: []
                  bad_only: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /v2/prototype/authenticationserver/{authentication_server_id}/insert_group_mapping:
    post:
      summary: Insert Group Mapping
      description: Insert a new group mapping(s) to the mapping list.
      operationId: insert-group-mapping
      parameters:
        - name: authentication_server_id
          in: path
          description: Unique ID for the existing [authentication server](doc:authentication-servers)
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - local_group_name
                - remote_group_name
              properties:
                local_group_name:
                  type: string
                  description: Name of the DivvyCloud group.
                remote_group_name:
                  type: string
                  description: Name of the authentication server group. If a mapping exists for a remote group name, the mapping will be updated.
            examples:
              Request Example:
                value:
                  - local_group_name: Domain Admins
                    remote_group_name: DivvyCloudTest-DomainAdmins
                  - local_group_name: Organization Admins
                    remote_group_name: DivvyCloudTest-OrganizationAdmins
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Result:
                  value: '{"error_message":"''Unable to load session: 87c72d86f8c4b4fa4b0adbbb429a7d4aa''","error_type":"InvalidSession"}'
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: '''Unable to load session: 87c72d86f8c4b4fa4b0adbbb429a7d4aa'''
                  error_type:
                    type: string
                    example: InvalidSession
        '500':
          description: '500'
          content:
            application/json:
              examples:
                Result:
                  value: '{"error_message":"Remote group DivvyCloudTest-DomainAdmins is mapped to more than one local group ","error_type":"ValueError"}'
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: 'Remote group DivvyCloudTest-DomainAdmins is mapped to more than one local group '
                  error_type:
                    type: string
                    example: ValueError
      deprecated: false
  /prototype/authenticationserver/{authentication_server_id}/update_group_mapping:
    post:
      summary: Update Group Mapping
      description: Updates the group mapping list. The entire group mapping list will need to be sent regardless of the amount of group mappings being updated.
      operationId: update-group-mapping
      parameters:
        - name: authentication_server_id
          in: path
          description: Unique ID for the existing [authentication server](doc:authentication-servers).
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - local_group_name
                - remote_group_name
              properties:
                local_group_name:
                  type: string
                  description: Name of the DivvyCloud group.
                remote_group_name:
                  type: string
                  description: Name of the authentication server group.
            examples:
              Request Example:
                value:
                  - local_group_name: Domain Admins
                    remote_group_name: DivvyCloudTest-DomainAdmins
                  - local_group_name: Organization Admins
                    remote_group_name: DivvyCloudTest-OrganizationAdmins
                  - local_group_name: PowerUsers
                    remote_group_name: DivvyCloudTest-PowerUsers
                  - local_group_name: ReadOnly
                    remote_group_name: DivvyCloudTest-ReadOnly
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /v2/prototype/authenticationserver/{authentication_server_id}/delete_group_mapping:
    delete:
      summary: Delete Group Mapping
      description: Deletes an existing group mapping(s) from the group mapping list. Non-existing mappings will be ignored.
      operationId: delete-group-mapping
      parameters:
        - name: authentication_server_id
          in: path
          description: Unique ID for the existing [authentication server](doc:authentication-servers)
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - local_group_name
                - remote_group_name
              properties:
                local_group_name:
                  type: string
                  description: Name of the DivvyCloud group.
                remote_group_name:
                  type: string
                  description: Name of the authentication server group.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /v2/prototype/authenticationservers/list:
    post:
      summary: List Authentication Servers
      description: Lists the authentication servers currently configured in InsightCloudSec
      operationId: list-authentication-servers
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "servers": [
                        {
                          "server_id": 1,
                          "server_name": "Okta SSO",
                          "server_host": "",
                          "server_port": 0,
                          "secure": 1,
                          "server_type": "saml",
                          "global_scope": false,
                          "mapped_groups": 0
                        },
                        {
                          "server_id": 2,
                          "server_name": "Azure AD",
                          "server_host": "",
                          "server_port": 0,
                          "secure": 1,
                          "server_type": "saml",
                          "global_scope": true,
                          "mapped_groups": 0
                        },
                        {
                          "server_id": 3,
                          "server_name": "Rapid7 Okta",
                          "server_host": "",
                          "server_port": 0,
                          "secure": 1,
                          "server_type": "saml",
                          "global_scope": null,
                          "mapped_groups": 1
                        }
                      ]
                    }
              schema:
                type: object
                properties:
                  servers:
                    type: array
                    items:
                      type: object
                      properties:
                        server_id:
                          type: integer
                          example: 1
                          default: 0
                        server_name:
                          type: string
                          example: Okta SSO
                        server_host:
                          type: string
                          example: ''
                        server_port:
                          type: integer
                          example: 0
                          default: 0
                        secure:
                          type: integer
                          example: 1
                          default: 0
                        server_type:
                          type: string
                          example: saml
                        global_scope:
                          type: boolean
                          example: false
                          default: true
                        mapped_groups:
                          type: integer
                          example: 0
                          default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-readme:
        code-samples:
          - language: curl
            code: |-
              curl --request GET  \
               --url https://domain/v2/prototype/authenticationservers/list \
               --header 'Accept: application/json' \
               --header 'content-type: application/json' \
               --header "Api-Key: ${API_KEY}"
        samples-languages:
          - curl
  /prototype/authenticationserver/{authentication_server_id}/group_mapping:
    get:
      summary: List Group Mappings
      description: Lists the group mapping list associated with an authentication server.
      operationId: list-group-mappings
      parameters:
        - name: authentication_server_id
          in: path
          description: Unique ID for the existing [authentication server](doc:authentication-servers).
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    [
                      {
                        "local_group_name": "Domain Admins",
                        "remote_group_name": "DivvyCloudTest-DomainAdmins"
                      },
                      {
                        "local_group_name": "Organization Admins",
                        "remote_group_name": "DivvyCloudTest-OrganizationAdmins"
                      },
                      {
                        "local_group_name": "PowerUsers",
                        "remote_group_name": "DivvyCloudTest-PowerUsers"
                      },
                      {
                        "local_group_name": "ReadOnly",
                        "remote_group_name": "DivvyCloudTest-ReadOnly"
                      }
                    ]
              schema:
                type: array
                items:
                  type: object
                  properties:
                    local_group_name:
                      type: string
                      example: Domain Admins
                    remote_group_name:
                      type: string
                      example: DivvyCloudTest-DomainAdmins
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-readme:
        code-samples:
          - language: curl
            code: |-
              curl --request GET \
                --url https://domain/v2/prototype/authenticationserver/authentication_server_id/group_mapping \
                --header 'Accept: application/json' \
                --header 'content-type: application/json' \
                --header "Api-Key: ${API_KEY}"
        samples-languages:
          - curl
  /public/exemptions/update-all:
    post:
      summary: Update All Exemptions
      description: Update all exemptions.
      operationId: update-all-exemptions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                pack:
                  type: string
                  description: The name of the pack associated with a set of exemptions and Insight ID associated with a set of exemptions in the format of `pack-type:id`.
                approver:
                  type: string
                  description: The exemption approver.
                start_date:
                  type: string
                  description: Date the exemption begins in the format of "YYYY-MM-DD". If none is provided, the default is today.
                expiration_date:
                  type: string
                  description: Date the exemption ends in the format of "YYYY-MM-DD". If none is provided, the default is no expiration.
                enabled:
                  type: boolean
                  description: Indicates if the exemption is enabled.
                notes:
                  type: string
                  description: Any notes or documentation for the exemption.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/delete-all:
    post:
      summary: Delete All Exemptions
      description: Delete all Exemptions in the current InsightCloudSec Organization.
      operationId: delete-all-exemptions
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/entitlements/{user_group_resource_id}/get:
    get:
      summary: List Entitlements for User Group
      description: Lists the entitlements and their associated role for a given user group.
      operationId: list-entitlements-for-user-group
      parameters:
        - name: user_group_resource_id
          in: path
          description: The InsightCloudSec Resource ID for the user group. Refer to [List Groups](ref:list-groups) for details.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "entitlements": [
                            {
                                "namespace": "botfactory",
                                "role": "disabled"
                            },
                            {
                                "namespace": "collections",
                                "role": "disabled"
                            },
                            {
                                "namespace": "events",
                                "role": "disabled"
                            },
                            {
                                "namespace": "exemptions",
                                "role": "disabled"
                            },
                            {
                                "namespace": "groups",
                                "role": "disabled"
                            },
                            {
                                "namespace": "iac",
                                "role": "disabled"
                            },
                            {
                                "namespace": "iam",
                                "role": "disabled"
                            },
                            {
                                "namespace": "insights",
                                "role": "disabled"
                            },
                            {
                                "namespace": "tags",
                                "role": "disabled"
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  entitlements:
                    type: array
                    items:
                      type: object
                      properties:
                        namespace:
                          type: string
                          example: botfactory
                        role:
                          type: string
                          example: disabled
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/entitlements/set:
    post:
      summary: Set Entitlements
      description: |-
        Set entitlements for one or more user groups in an InsightCloudSec Organization.

        *Note: Requires Domain or Organization Admin permissions.*
      operationId: set-entitlements
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - group_ids
                - entitlements
              properties:
                group_ids:
                  type: array
                  description: List of InsightCloudSec User Group IDs. This can be provided along with `user_ids`, but at least one ID must be provided.
                  items:
                    type: integer
                    format: int32
                entitlements:
                  type: array
                  description: Entitlement name and associated role.
                  items:
                    properties:
                      namespace:
                        type: string
                        description: 'Entitlement name. See [Permissions Entitlements](doc:permissions-entitlements) and [the User Entitlements Matrix](doc:user-entitlements-matrix). Options are: `botfactory`, `collections`, `events`, `exemptions`, `groups`, `iac`, `iam`, `insights`, and `tags`.'
                      role:
                        type: string
                        description: 'The role associated with the entitlement. See [Permissions Entitlements](doc:permissions-entitlements) and [the User Entitlements Matrix](doc:user-entitlements-matrix) for more information. Options are: `disabled`, `viewer`, `editor`, and `admin`.'
                    required:
                      - namespace
                      - role
                    type: object
            examples:
              Request Example:
                value:
                  group_ids:
                    - 2747
                  entitlements:
                    - namespace: botfactory
                      role: viewer
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    [
                        {
                            "entitlements": [
                                {
                                    "namespace": "botfactory",
                                    "role": "viewer"
                                },
                                {
                                    "namespace": "collections",
                                    "role": "disabled"
                                },
                                {
                                    "namespace": "events",
                                    "role": "disabled"
                                },
                                {
                                    "namespace": "exemptions",
                                    "role": "disabled"
                                },
                                {
                                    "namespace": "groups",
                                    "role": "disabled"
                                },
                                {
                                    "namespace": "iac",
                                    "role": "disabled"
                                },
                                {
                                    "namespace": "iam",
                                    "role": "disabled"
                                },
                                {
                                    "namespace": "insights",
                                    "role": "disabled"
                                },
                                {
                                    "namespace": "tags",
                                    "role": "disabled"
                                }
                            ],
                            "group_id": 2747
                        }
                    ]
              schema:
                type: array
                items:
                  type: object
                  properties:
                    entitlements:
                      type: array
                      items:
                        type: object
                        properties:
                          namespace:
                            type: string
                            example: botfactory
                          role:
                            type: string
                            example: viewer
                    group_id:
                      type: integer
                      example: 2747
                      default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/domain/admin/{resource_id}/delete:
    delete:
      summary: Delete Admin User
      description: |-
        Deletes the given Domain Admin user.

        *Note: Requires Domain Admin permissions.*
      operationId: delete-admin-user
      parameters:
        - name: resource_id
          in: path
          description: The InsightCloudSec Resource ID for the user.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/domains/admins/list:
    post:
      summary: List Admin Users
      description: |-
        Lists all Domain Admin users.

        *Note: Requires Domain Admin permissions.*
      operationId: list-admin-users
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "users": [
                            {
                                "resource_id": "divvyuser:1:",
                                "name": "John Smith",
                                "user_id": 1,
                                "organization_admin": false,
                                "domain_admin": true,
                                "domain_viewer": false,
                                "email_address": "john@insightcloudsec.com",
                                "username": "jsmith",
                                "organization_name": "Organization 1",
                                "organization_id": 1,
                                "two_factor_enabled": false,
                                "two_factor_required": false,
                                "groups": 0,
                                "owned_resources": 0,
                                "consecutive_failed_login_attempts": 0,
                                "suspended": false,
                                "last_login_time": "2022-01-03 13:45:04",
                                "navigation_blacklist": [],
                                "active_api_key_present": false,
                                "create_date": "2018-04-24 16:08:52"
                            }
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/cloud/add:
    post:
      summary: Add Cloud Account
      description: Add a single cloud account to InsightCloudSec.
      operationId: add-cloud-account
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - creation_params
              properties:
                creation_params:
                  type: object
                  description: The parameters necessary for InsightCloudSec to add the Cloud account.
                  required:
                    - cloud_type
                    - name
                  properties:
                    cloud_type:
                      type: string
                      description: 'The type of cloud account to add. Options are: `AWS`, `AWS_CHINA`, `AWS_GOV`, `AZURE_ARM`, `AZURE_CHINA`, `AZURE_GOV`, or `GCE`.'
                    authentication_type:
                      type: string
                      description: '*AWS Only*. The type of authentication to use for the account. Options are: `assume_role` or `instance_assume_role`.'
                    name:
                      type: string
                      description: '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:
                      type: string
                      description: '*AWS and Azure Only*. The API key used to access the account.'
                    secret_key:
                      type: string
                      description: '*AWS Only*. The secret key used to access the account in conjunction with `api_key`.'
                    duration:
                      type: integer
                      description: '*AWS Only*. The allowed duration of the session to harvest account data.'
                      format: int32
                    role_arn:
                      type: string
                      description: '*AWS Only*. The Amazon resource name (ARN) for the role InsightCloudSec will assume to access the account.'
                    session_name:
                      type: string
                      description: '*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:
                      type: string
                      description: '*AWS Only*. The External ID necessary to authenticate against the provided `role_arn`.'
                    tenant_id:
                      type: string
                      description: '*Azure Only*. The Tenant ID for the account being added to InsightCloudSec.'
                    subscription_id:
                      type: string
                      description: '*Azure Only*. The Subscription ID for the subscription hosting the account being added to InsightCloudSec.'
                    app_id:
                      type: string
                      description: '*Azure Only*. The Application ID for the account being added to InsightCloudSec.'
                    api_credentials:
                      type: string
                      description: '*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:
                      type: string
                      description: '*GCP Only*. The email delegation for the project being added to InsightCloudSec.'
                    strategy_id:
                      type: integer
                      description: The ID for the harvesting strategy to apply to the account. Use the [List Harvesting Strategies](ref:list-harvesting-strategies) endpoint to discover IDs.
                      format: int32
            examples:
              AWS STS:
                value:
                  creation_params:
                    cloud_type: AWS
                    authentication_type: sts
                    name: My Cloud via AWS STS
                    api_key: <my-aws-api-key>
                    secret_key: <my-aws-secret-key>
                    duration: 3600
                    role_arn: arn:aws:iam::123456789012:role/my-role-name
                    session_name: insightcloudsec
                    external_id: my-external-id
                    strategy_id: 220
              AWS IAR:
                value:
                  creation_params:
                    cloud_type: AWS
                    authentication_type: iar
                    name: Docs AWS Instance Assume Role example
                    role_arn: arn:aws:iam::123456789012:role/my-role-name
                    session_name: rapid7
                    external_id: my-external-id
                    strategy_id: 220
              GCP:
                value:
                  creation_params:
                    cloud_type: GCE
                    name: Docs GCP example
                    project: my-project
                    api_credentials: '{"type":"service_account","project_id":"{{gcp_project_id}}","private_key_id":"{{gcp_private_key_id}}","private_key":"{{gcp_private_key}}","client_email":"{{gcp_client_email}}","client_id":"{{gcp_client_id}}","auth_uri":"{{gcp_auth_uri}}","token_uri":"{{gcp_token_uri}}","auth_provider_x509_cert_url":"{{gcp_auth_provider_url}}","client_x509_cert_url":"{{gcp_client_url}}"}'
                    email_delgation: api-email-access@my-project.iam.gserviceaccount.com
                    session_name: rapid7
                    strategy_id: 269
              Azure:
                value:
                  creation_params:
                    cloud_type: AZURE_ARM
                    name: Docs AZ example
                    tenant_id: divvycloud.com
                    subscription_id: <my-subscription-id>
                    app_id: <my-application-id>
                    api_key: <my-api-key>
                    session_name: rapid7
                    strategy_id: 31
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                AWS STS:
                  value: |-
                    {
                        "id": 123456,
                        "name": "My Cloud via AWS STS",
                        "cloud_type_id": "AWS",
                        "creation_time": "2022-02-09 19:57:53",
                        "status": "REFRESH",
                        "role_arn": "arn:aws:iam::123456789012:role/my-role-name",
                        "group_resource_id": "divvyorganizationservice:123456",
                        "resource_id": "divvyorganizationservice:123456"
                    }
                AWS IAR:
                  value: |-
                    {
                        "id": 123456,
                        "name": "Docs AWS IAR example",
                        "cloud_type_id": "AWS",
                        "creation_time": "2022-02-09 20:09:17",
                        "status": "REFRESH",
                        "role_arn": "arn:aws:iam::123456789012:role/my-role-name",
                        "group_resource_id": "divvyorganizationservice:123456",
                        "resource_id": "divvyorganizationservice:123456"
                    }
                GCP:
                  value: |-
                    {
                        "id": 123456,
                        "name": "Docs GCP example",
                        "cloud_type_id": "GCE",
                        "creation_time": "2022-02-10 18:53:54",
                        "status": "REFRESH",
                        "group_resource_id": "divvyorganizationservice:123456",
                        "resource_id": "divvyorganizationservice:123456"
                    }
                Azure:
                  value: |-
                    {
                        "id": 123456,
                        "name": "Docs AZ example",
                        "cloud_type_id": "AZURE_ARM",
                        "creation_time": "2022-02-10 19:43:07",
                        "status": "REFRESH",
                        "group_resource_id": "divvyorganizationservice:123456",
                        "resource_id": "divvyorganizationservice:123456"
                    }
              schema:
                oneOf:
                  - title: AWS STS
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123456
                        default: 0
                      name:
                        type: string
                        example: My Cloud via AWS STS
                      cloud_type_id:
                        type: string
                        example: AWS
                      creation_time:
                        type: string
                        example: '2022-02-09 19:57:53'
                      status:
                        type: string
                        example: REFRESH
                      role_arn:
                        type: string
                        example: arn:aws:iam::123456789012:role/my-role-name
                      group_resource_id:
                        type: string
                        example: divvyorganizationservice:123456
                      resource_id:
                        type: string
                        example: divvyorganizationservice:123456
                  - title: AWS IAR
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123456
                        default: 0
                      name:
                        type: string
                        example: Docs AWS IAR example
                      cloud_type_id:
                        type: string
                        example: AWS
                      creation_time:
                        type: string
                        example: '2022-02-09 20:09:17'
                      status:
                        type: string
                        example: REFRESH
                      role_arn:
                        type: string
                        example: arn:aws:iam::123456789012:role/my-role-name
                      group_resource_id:
                        type: string
                        example: divvyorganizationservice:123456
                      resource_id:
                        type: string
                        example: divvyorganizationservice:123456
                  - title: GCP
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123456
                        default: 0
                      name:
                        type: string
                        example: Docs GCP example
                      cloud_type_id:
                        type: string
                        example: GCE
                      creation_time:
                        type: string
                        example: '2022-02-10 18:53:54'
                      status:
                        type: string
                        example: REFRESH
                      group_resource_id:
                        type: string
                        example: divvyorganizationservice:123456
                      resource_id:
                        type: string
                        example: divvyorganizationservice:123456
                  - title: Azure
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123456
                        default: 0
                      name:
                        type: string
                        example: Docs AZ example
                      cloud_type_id:
                        type: string
                        example: AZURE_ARM
                      creation_time:
                        type: string
                        example: '2022-02-10 19:43:07'
                      status:
                        type: string
                        example: REFRESH
                      group_resource_id:
                        type: string
                        example: divvyorganizationservice:123456
                      resource_id:
                        type: string
                        example: divvyorganizationservice:123456
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/resource/query:
    post:
      summary: Query Resources (v2)
      description: |-
        Query for resources. 

        *Requires Domain Admin, Organization Admin, or Basic User with "View Resource" permissions.*
      operationId: query-resources
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - limit
              properties:
                badges:
                  type: array
                  description: The key-value pairs for badges.
                badge_filter_operator:
                  type: string
                  description: 'Operator for evaluating multiple badges. Options are: "OR" or "AND".'
                  default: OR
                filters:
                  type: array
                  description: The name and configuration for a filter.
                insight:
                  type: string
                  description: 'A union of the Insight''s pack type and ID: `pack-type:insight-id`'
                limit:
                  type: integer
                  description: The maximum number of resources returned if `selected_resource_type` is provided and resources match the provided criteria. The value can be between 1 and 1000.
                  format: int32
                offset:
                  type: integer
                  description: The number of entries to skip over before returning anything. It is *highly* recommended that `cursor` be used instead.
                  format: int32
                order_by:
                  type: string
                  description: The attribute by which to sort the returned resources.
                scopes:
                  type: array
                  description: A list of the Cloud Organization Resource ID(s) and/or Resource Group ID(s) to which to scope the query. Use the [List Clouds](https://docs.divvycloud.com/reference#list-clouds) endpoint to obtain Cloud Organization resource ID(s); use the [List Resource Group Associations endpoint](https://docs.divvycloud.com/reference#get-resource-associations) to obtain resource group ID(s).
                  items:
                    type: string
                selected_resource_type:
                  type: string
                  description: The resource type that will be used to populate the response object. If no type is provided, counts of all resource types (in the user's current InsightCloudSec Organization) will be returned.
                tags:
                  type: array
                  description: A list of tag names.
                  items:
                    type: string
                cursor:
                  type: string
                  description: The hash value for the next page of results. This value can be obtained from the `next_cursor` parameter in the response object if there are more results that match a successful request. This process can be repeated until the `next_cursor` response parameter is null.
            examples:
              Get Insight Results:
                value:
                  selected_resource_type: instance
                  resource_types:
                    - instance
                  scopes: []
                  filters:
                    - config: {}
                      name: divvy.query.instances_exposing_public_ssh
                  offset: 0
                  limit: 25
                  order_by: ''
                  insight: backoffice:59
                  insight_exemptions: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "counts": {
                            "instance": 56
                        },
                        "selected_resource_type": "instance",
                        "supported_types": [
                            "instance"
                        ],
                        "resources": [
                            {
                                "resource_type": "instance",
                                "instance": {
                                    "common": {
                                        "resource_id": "instance:148:us-gov-west-1:...:",
                                        "resource_name": "Running24x7",
                                        "resource_type": "instance",
                                        "cloud": "AWS_GOV",
                                        "account": "Gov Cloud",
                                        "account_id": "123456789123",
                                        "account_status": "DEFAULT",
                                        "organization_service_id": 148,
                                        "availability_zone": "us-gov-west-1a",
                                        "region": "us-gov-west-1",
                                        "creation_timestamp": "2021-04-27 14:50:33",
                                        "discovered_timestamp": "2018-03-13 20:22:31",
                                        "modified_timestamp": "2022-03-01 14:41:40",
                                        "namespace_id": "arn:aws:ec2:us-gov-west-1:123456789123:instance/...",
                                        "tags": {
                                            "POC": "DivvyCloud",
                                            "bot": "ENG-2259",
                                            "Name": "Running24x7",
                                            "date": "Sep-10-2022",
                                            "year": "19",
                                            "Alpha": "Bravo",
                                            "Email": "support@divvycloud",
                                            "Owner": "Gov",
                                            "Pollo": "Loco",
                                            "Period": "5-year",
                                            "release": "4",
                                            "version": "0",
                                            "TimeZone": "EST",
                                            "cloud_type": "AWS_GOV",
                                            "Environment": "Public Sector",
                                            "direct_link": "https://test.insightcloudsec.com/bot/divvybot:1:1580/overview",
                                            "ContractType": "FFP",
                                            "resource_type": "instance",
                                            "twentyfourseven": "true",
                                            "AlternateContact": "Slack",
                                            "DisasterRecovery": "Required",
                                            "software-version": "19-4-0-as-of-10-7",
                                            "InformationSecurity": "Public Trust"
                                        }
                                    },
                                    "instance_id": "...",
                                    "instance_type": "t2.micro",
                                    "launch_time": "2021-04-27T14:50:33Z",
                                    "platform": "linux",
                                    "state": "running",
                                    "root_device_type": "ebs",
                                    "key_name": "NewKeyOneMatt",
                                    "image_id": "ami-b2d056d3",
                                    "private_ip_address": "1.1.1.1",
                                    "public_ip_address": "1.1.1.1",
                                    "tenancy": "default",
                                    "network_resource_id": "privatenetwork:148:us-gov-west-1:vpc-...:",
                                    "subnet_resource_id": "privatesubnet:148:us-gov-west-1:subnet-...:",
                                    "detailed_monitoring": false,
                                    "aws_instance_metadata_service_v2_required": false,
                                    "aws_instance_metadata_service_hop_limit": 1,
                                    "aws_instance_metadata_service_endpoint_enabled": "enabled",
                                    "aws_instance_metadata_service_endpoint_config_status": "applied",
                                    "architecture": "x86_64",
                                    "state_transition_reason": ""
                                }
                            }
                        ],
                        "scopes": [],
                        "limit": 1,
                        "offset": 0,
                        "order_by": "",
                        "filters": [
                            {
                                "name": "divvy.query.instances_exposing_public_ssh",
                                "config": {}
                            }
                        ],
                        "headers": [
                            {
                                "name": "Resource ID",
                                "value": [
                                    "common",
                                    "resource_id"
                                ],
                                "visible": false,
                                "order_by": "resource_id"
                            }
                            //, ... 
                        ]
                    }
      deprecated: false
  /public/entitlements/{user_resource_id}/{module_name}/get:
    get:
      summary: List Entitlements for User - Specific Module
      description: List entitlements for a user in a given module within InsightCloudSec.
      operationId: list-entitlements-for-user-specific-module
      parameters:
        - name: user_resource_id
          in: path
          description: The InsightCloudSec Resource ID for the use. Refer to [User List](ref:user-list) for details.
          schema:
            type: string
          required: true
        - name: module_name
          in: path
          description: 'The name of the module. Options are: `botfactory`, `collections`, `events`, `exemptions`, `groups`, `iac`, `iam`, `insights`, and `tags`.'
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "entitlement": "admin"
                    }
              schema:
                type: object
                properties:
                  entitlement:
                    type: string
                    example: admin
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/rule/create:
    post:
      summary: Create Exemption Rule
      description: Create a new exemption rule.
      operationId: create-exemption-rule
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - resource_type
                - insight_id
                - insight_source
                - regex_strings
              properties:
                resource_type:
                  type: string
                  description: The type of resource being exempted.
                insight_id:
                  type: integer
                  description: The ID for the Insight to which this exemption rule will belong.
                  format: int32
                insight_source:
                  type: string
                  description: 'The source for the Insight. Options are: `backoffice` or `custom`.'
                regex_strings:
                  type: array
                  description: Regular expression string(s) for the rule.
                  items:
                    type: string
                expiration_days:
                  type: integer
                  description: The number of days the exemption should be valid.
                  format: int32
                notes:
                  type: string
                  description: Optional notes to provide context to the rule.
                harvest_support:
                  type: boolean
                  description: If set to `true`, the exemption rule will be processed during a normal [harvest](doc:harvesting-overview).
                iac_support:
                  type: boolean
                  description: If set to `true`, the exemption rule will be processed during an [Infrastructure as Code scan](doc:iac-overview).
            examples:
              Request Example:
                value:
                  resource_type: storagecontainer
                  insight_id: 165
                  insight_source: backoffice
                  expiration_days: 30
                  notes: This is a test exemption
                  regex_strings:
                    - test
                    - regex
                    - string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/rule/{rule_id}/update:
    post:
      summary: Update Exemption Rule
      description: Update an existing exemption rule.
      operationId: update-exemption-rule
      parameters:
        - name: rule_id
          in: path
          description: ID for the rule to be updated.
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - regex_strings
              properties:
                expiration_days:
                  type: integer
                  description: The number of days the exemption should be valid.
                  format: int32
                notes:
                  type: string
                  description: Optional notes to provide context to the rule.
                regex_strings:
                  type: array
                  description: The regular expression string(s) for the rule.
                  items:
                    type: string
                harvest_support:
                  type: boolean
                  description: If set to `true`, the exemption rule will be processed during a normal [harvest](doc:harvesting-overview).
                iac_support:
                  type: boolean
                  description: If set to `true`, the exemption rule will be processed during an [Infrastructure as Code scan](doc:iac-overview).
            examples:
              Request Example:
                value:
                  expiration_days: 30
                  notes: Updating the exemption notes
                  regex_strings:
                    - updated-string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/rule/{rule_id}/delete:
    delete:
      summary: Delete Exemption Rule
      description: Delete an existing exemption rule.
      operationId: delete-exemption-rule
      parameters:
        - name: rule_id
          in: path
          description: ID for the rule to be deleted.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/{resource_id}/violations/get:
    get:
      summary: Get Findings for a Resource
      description: Get Insight findings for a given Resource.
      operationId: get-findings
      parameters:
        - name: resource_id
          in: path
          description: The InsightCloudSec resource ID.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    [
                        {
                            "insight_id": 170,
                            "source": "backoffice",
                            "severity": 3,
                            "name": "Identity Resource With Permissive Access",
                            "description": "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": "2022-01-27"
                        },
                        {
                            "insight_id": 176,
                            "source": "backoffice",
                            "severity": 5,
                            "name": "Cloud Role Trusting Unknown Account",
                            "description": "Identifies cloud roles that provide access to accounts unknown to the InsightCloudSec system.",
                            "identified_at": "2022-08-31"
                        }
                    ]
              schema:
                type: array
                items:
                  type: object
                  properties:
                    insight_id:
                      type: integer
                      example: 170
                      default: 0
                    source:
                      type: string
                      example: backoffice
                    severity:
                      type: integer
                      example: 3
                      default: 0
                    name:
                      type: string
                      example: Identity Resource With Permissive Access
                    description:
                      type: 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:
                      type: string
                      example: '2022-01-27'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/{insight_id}/{source}/tags/delete:
    delete:
      summary: Delete Insight Labels
      description: Deletes all labels for a given Insight
      operationId: delete-insight-labels
      parameters:
        - name: insight_id
          in: path
          description: InsightCloudSec ID for an Insight.
          schema:
            type: integer
            format: int32
          required: true
        - name: source
          in: path
          description: 'Source type for the Insight. Options are: `backoffice` (for InsightCloudSec authored Insight Packs) or `custom` (for user authored Insight Packs).'
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/tags/add:
    post:
      summary: Create Insight Label
      description: Creates one or more labels for a given Insight
      operationId: create-insight-label
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                backoffice_ids:
                  type: array
                  description: List of comma-delimited IDs for backoffice (InsightCloudSec-authored) Insights.
                  items:
                    type: integer
                    format: int32
                custom_ids:
                  type: array
                  description: List of comma-delimited IDs for custom (user-authored) Insights.
                  items:
                    type: integer
                    format: int32
                tags:
                  type: array
                  description: List of comma-delimited tags.
                  items:
                    type: string
            examples:
              Request Example:
                value:
                  backoffice_ids: []
                  custom_ids:
                    - 3968
                  tags:
                    - hello
                    - nice-to-meet-you
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/exemptions/rule/{rule_id}/scan:
    post:
      summary: Scan Exemption Rule
      description: Triggers an Exemption rule scan job on-demand.
      operationId: scan-exemption-rule
      parameters:
        - name: rule_id
          in: path
          description: The ID for the rule. The rule must have at least one regular expression string to look for.
          schema:
            type: integer
            format: int32
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/instance/{instance_resource_id}/get_user_data:
    post:
      summary: Get User Data
      description: Gets user data from a given instance.
      operationId: get-user-data
      parameters:
        - name: instance_resource_id
          in: path
          description: The InsightCloudSec resource ID for an Instance.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "user_data": "..."
                    }
              schema:
                type: object
                properties:
                  user_data:
                    type: string
                    example: ...
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /compliance/score-card/custom/{pack_id}:
    post:
      summary: Get Custom Insight Compliance Pack
      description: Retrieves a custom, user-authored Insight Compliance Pack.
      operationId: get-custom-insight-compliance-pack
      parameters:
        - name: pack_id
          in: path
          description: The ID for the Insight Pack the Compliance Scorecard is based on.
          schema:
            type: integer
            format: int32
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - resource_scope
                - insight_filters
                - page_data
              properties:
                resource_scope:
                  type: object
                  description: The scope for the Compliance Scorecard.
                  required:
                    - scope_type
                  properties:
                    scope_type:
                      type: string
                      description: Scope type for the compliance scorecard.
                      enum:
                        - divvyorganizationservice
                        - containercluster
                        - kubernetesnamespace
                        - resourcegroup
                    organization_service_filters:
                      type: object
                      description: Filters used when the scope type is set to `divvyorganizationservice`.
                      properties:
                        organization_service_ids:
                          type: array
                          description: List of InsightCloudSec IDs for clouds or organizations.
                          items:
                            type: string
                        cloud_types:
                          type: array
                          description: 'List of Cloud types. Options are: `"ALICLOUD"`, `"AWS"`, `"AWS_GOV"`, `"AWS_CHINA"`, `"AZURE_ARM"`, `"AZURE_CHINA"`, `"AZURE_GOV"`, `"GCE"`, `"K8S"`, or `"OCI"`.'
                          items:
                            type: string
                        badges:
                          type: array
                          description: List of badge names.
                          items:
                            type: string
                    kubernetes_filters:
                      type: object
                      description: Filters used when the scope type is set to `kubernetesnamespace` or `containercluster`.
                      properties: {}
                    resource_group_filters:
                      type: object
                      description: Filters used when the scope type is set to `resourcegroup`.
                      properties: {}
                insight_filters:
                  type: object
                  description: Additional filters for the Insights within the selected Insight Pack.
                  properties:
                    severity:
                      type: array
                      description: List of Insight severities.
                      items:
                        type: string
                    insight_ids:
                      type: array
                      description: List of Insight IDs within the selected Insight Pack in the format of `"<pack-type>:<id>"`. Pack type can be `backoffice` (for InsightCloudSec authored Insight Packs) or `custom` (for user authored Insight Packs).
                      items:
                        type: string
                    resource_types:
                      type: array
                      description: List of InsightCloudSec resource types.
                      items:
                        type: string
                page_data:
                  type: object
                  description: Pagination settings for selecting a subset of the data returned with the request.
                  properties:
                    row:
                      type: object
                      description: Page data row specification.
                      properties: {}
                    column:
                      type: object
                      description: Page data column specification.
                      properties: {}
            examples:
              Cloud/Cluster Example:
                value:
                  resource_scope:
                    scope_type: divvyorganizationservice
                    organization_service_filters:
                      organization_service_ids: []
                      cloud_types:
                        - AWS
                        - AWS_GOV
                        - AWS_CHINA
                      badges: []
                  insight_filters:
                    severity: []
                    insight_ids: []
                    resource_types: []
                  page_data:
                    row:
                      page: 1
                      page_size: 20
                    column:
                      page: 1
                      page_size: 20
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Cloud/Cluster Example:
                  value: |-
                    {
                        "page_data": {
                            "row": {
                                "total_pages": 1,
                                "page": 1,
                                "page_size": 20,
                                "total_count": 3
                            },
                            "column": {
                                "total_pages": 3,
                                "page": 1,
                                "page_size": 20,
                                "total_count": 45
                            }
                        },
                        "data": {
                            "scorecard": [
                                {
                                    "id": "backoffice:393",
                                    "name": "Access Analyzer Not Enabled In Cloud Region",
                                    "severity": 4,
                                    "custom_severity": null,
                                    "metadata": null,
                                    "series": [
                                        {
                                            "id": 9950,
                                            "value": "Okay",
                                            "name": "AWS-IAR",
                                            "cloud_type_id": "AWS",
                                            "cloud_type_name": "Amazon Web Services",
                                            "organization_service_name": "AWS-Org",
                                            "account_id": "123456789",
                                            "resource_group_name": null,
                                            "resource_group_type": null,
                                            "impacted_resources": 3,
                                            "exempt_resources": 0,
                                            "total_resources": 21,
                                            "nested_scope_ids": []
                                        },
                                        {
                                            "id": 9949,
                                            "value": "Okay",
                                            "name": "QA STS account",
                                            "cloud_type_id": "AWS",
                                            "cloud_type_name": "Amazon Web Services",
                                            "organization_service_name": "AWS-ORg-2t",
                                            "account_id": "987654321",
                                            "resource_group_name": null,
                                            "resource_group_type": null,
                                            "impacted_resources": 17,
                                            "exempt_resources": 0,
                                            "total_resources": 17,
                                            "nested_scope_ids": []
                                        }
                                            ],
                            "resource_scope_type": "divvyorganizationservice",
                            "downloadable": true,
                            "last_cache_update": "2021-11-09T13:07:02.951777"
                        },
                        "finding_history": {  
                              "10/26/2021": {
                                "clouds_in_scope": 0,
                                "resources_in_scope": 0,
                                "total_findings": 0,
                                "minor_findings": 0,
                                "moderate_findings": 0,
                                "major_findings": 0,
                                "severe_findings": 0,
                                "critical_findings": 0
                            }
                        },
                        "insight_notes": {
                            "backoffice:393": {
                                "name": "Access Analyzer Not Enabled In Cloud Region",
                                "notes": "Overview\n----------\nAWS Identity and Access Management (IAM) Access Analyzer is a new feature that makes it simple for security teams and administrators to check that their policies provide only the intended access to resources. Resource policies allow customers to granularly control who is able to access a specific resource and how they are able to use it across the entire cloud environment. With one click in the IAM console, customers can enable IAM Access Analyzer across their account to continuously analyze permissions granted using policies associated with their Amazon S3 buckets, AWS KMS keys, Amazon SQS queues, AWS IAM roles, and AWS Lambda functions.\n\nAccess Analyzer analyzes the following resource types:\n- Amazon Simple Storage Service Buckets\n- AWS Identity and Access Management Roles\n- AWS Key Management Service Keys\n- AWS Lambda Functions and Layers\n- Amazon Simple Queue Service Queues\n\n## Remediation\n### Enabling Access Analyzer\nTo enable Access Analyzer in a Region, you must create an analyzer in that Region. You must create an analyzer in each Region in which you want to monitor access to your resources.\n\n### To create an analyzer\n- Open the IAM console at https://console.aws.amazon.com/iam/.\n- Choose Access analyzer.\n- Choose Create analyzer.\n- On the Create analyzer page, confirm that the Region displayed is the Region where you want to enable Access Analyzer.\n- Enter a name for the analyzer.\n- Optional. Add any tags that you want to apply to the analyzer.\n- Choose Create Analyzer.\n\n### This can also be created using the \"Enable Regional IAM Access Analyzer\" bot action\n\n### Documentation\nhttps://aws.amazon.com/about-aws/whats-new/2019/12/introducing-aws-identity-and-access-management-access-analyzer/\n\n### Compliance Information\n  - ISO 27001: A.13.1.1 - Network controls, A.12.4.1 - Event logging, A.16.1.7 - Collection of evidence\n  - Center for Internet Security (CIS) - AWS 1.3.0: 1.21\n  - SOC 2: CC5.2, CC6.1, CC6.6\n  - PCI DSS Pack : Requirement 7\n  - NIST Cyber Security Framework (CSF) : PR.AC-1, PR.AC-3, PR.AC-4, PR.AC-6, PR.AC-7\n  - Center for Internet Security (CIS) - AWS 1.4.0: 1.20"
                            },
                            "backoffice:54": {
                                "name": "Access List Default Allows Ingress/Egress (Security Group)",
                                "notes": "Overview\n----------\n\nCloud Networks come with default Access Lists (Security Groups) with initial settings that deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. Users often change these settings, however, to make the security groups more permissive. If you don't specify a security group when you launch an instance, the instance is automatically assigned to this default security group, which may have been changed with more permissive settings. As security groups provide stateful filtering of ingress/egress network traffic to cloud resources, it is recommended that all instances are assigned to a specific security group (and that the default security group restrict all traffic).\n\n\n### Remediation\n\nLeverage Bot automation to identify and monitor for default Access Lists (Security Groups) that have at least one rule permitting ingress traffic (and therefore egress traffic)\n\n### Recommend Bot Workflow\n\n - Mark Resource Noncompliant: Mark default Access Lists (Security Groups) that have at least one rule permitting ingress traffic\n - Send Email/Slack Notification: Notify operations/security team of default Access Lists (Security Groups) that have at least one rule permitting ingress traffic. Separately, using cloud badges or resource tags, identify Access Lists (Security Groups) owners and notify them of the steps needed to remove security group inbound \n\n### Amazon Web Services\n1. Login to the AWS Management Console at https://console.aws.amazon.com/vpc/home\n2. Repeat the next steps for all VPCs - including the default VPC in each AWS region:\n3. In the left pane, click Security Groups\n4. For each default security group, perform the following:\n   o Select the default security group\n   o Click the Inbound Rules tab\n   o Remove any inbound rules\n   o Click the Outbound Rules tab\n   o Remove any outbound rules\n\n### Compliance Information\n  - Center for Internet Security (CIS) - AWS 1.2.0 (Legacy): Networking 4.4\n  - GDPR: Article 25: Data protection by Design and by Default\n  - SOC 2 (Legacy): C1.2, C1.3, C1.7, CC5.6\n  - FedRAMP CCM 3.0.1: IVS-11\n  - CSA Cloud Controls Matrix (CCM): GRM-01, IVS-12\n  - ISO 27001: A.13.1.1 - Network controls\n  - Center for Internet Security (CIS) - AWS 1.3.0: 5.3\n  - SOC 2: CC6.1\n  - PCI DSS Pack : Requirement 7\n  - NIST Cyber Security Framework (CSF) : PR.AC-4\n  - Center for Internet Security (CIS) - AWS 1.4.0: 5.3"
                            }
                         }
                    }
      deprecated: false
  /public/apikey/create:
    post:
      summary: Create API Key
      description: Create a new secure API key for any user for programmatic access in InsightCloudSec. All existing active API keys will be deactivated.
      operationId: create-api-key
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - user_id
              properties:
                user_id:
                  type: string
                  description: Your InsightCloudSec user ID.
                key_length:
                  type: integer
                  description: The length of the API key. Defaults to 32.
                  default: 32
                  format: int32
            examples:
              Request Example:
                value:
                  user_id: '3'
                  key_length: 32
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "apikey": "WQCD5mgUB1xnj8CvGZYsGb74Wv5YgemygRWG8GLKlYJp5VuFJnA"
                    }
              schema:
                type: object
                properties:
                  apikey:
                    type: string
                    example: WQCD5mgUB1xnj8CvGZYsGb74Wv5YgemygRWG8GLKlYJp5VuFJnA
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/user/login:
    post:
      summary: Login
      description: _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.
      operationId: login
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - password
              properties:
                username:
                  type: string
                  description: Your InsightCloudSec username.
                password:
                  type: string
                  description: Your InsightCloudSec password.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "user_id":1
                      "session_id":"*****************"
                      "session_timeout":720
                      "domain_admin":true
                      "customer_id":"****:**:**:**:**:**:**:***:**:**::**:**:**"
                      "user_name":"john.doe"
                      "auth_plugin_exists":false
                      "user_email":"support@insightcloudsec.com"
                    }
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-readme:
        code-samples:
          - language: text
            code: "{\n\t\"username\": \"john.doe\",\n\t\"password\": \"p@ssword123\"\n}"
        samples-languages:
          - text
  /public/resource/common/search:
    post:
      summary: Get Resource ID
      description: Gets a InsightCloudSec resource ID from a given search string.
      operationId: get-resource-id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - search_string
              properties:
                limit:
                  type: integer
                  description: The maximum number of resources returned if resources match the provided criteria. The value can be between 1 and 1000.
                  format: int32
                offset:
                  type: integer
                  description: The number of entries to skip over before returning anything.
                  format: int32
                search_string:
                  type: string
                  description: 'Partial or full literal string to search for. For example: you could search for an instance ID, image ID, or resource name.'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "resources": [
                            {
                                "resource_id": "instance:******:ap-northeast-1:*******************:",
                                "resource_type": "instance",
                                "provider_id": "*******************",
                                "name": "my-instance-name",
                                "account_id": "************",
                                "cloud_type_id": "AWS",
                                "account": "my-account-name"
                            },
                            {
                                "resource_id": "instance:******:ap-northeast-1:*******************:",
                                "resource_type": "instance",
                                "provider_id": "*******************",
                                "name": "my-instance-name",
                                "account_id": "************",
                                "cloud_type_id": "AWS",
                                "account": "my-account-name"
                            },
                        ],
                        "total_count": 2
                    }
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/insights/pack/{{pack_id}}/update:
    post:
      summary: Update Insight Pack
      description: Updates a given *custom* Insight Pack.
      operationId: update-insight-pack
      parameters:
        - name: pack_id
          in: path
          description: The Insight Pack ID.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - description
                - backoffice
                - custom
              properties:
                name:
                  type: string
                  description: The name for the Insight Pack.
                description:
                  type: string
                  description: The description for the Insight Pack.
                logo_url:
                  type: string
                  description: A URL to a custom logo for the Insight Pack.
                backoffice:
                  type: array
                  description: A list of InsightCloudSec-authored Insight IDs that are included in the Insight Pack.
                  items:
                    type: integer
                    format: int32
                custom:
                  type: array
                  description: A list of user-authored Insight IDs that are included in the Insight Pack.
                  items:
                    type: integer
                    format: int32
                badges:
                  type: array
                  description: A list of badges.
                  items:
                    properties:
                      key:
                        type: string
                        description: Key for the badge.
                      value:
                        type: string
                        description: Value for the badge.
                    type: object
                badge_filter_operator:
                  type: string
                  description: Set to `OR` so that any cloud with one or more badges specified will match an Insight Pack. Set to `AND` to require all badges for a match.
                  default: '"OR"'
                  enum:
                    - AND
                    - OR
                global_pack:
                  type: boolean
                  description: Denotes whether the Insight Pack is available globally (to all users within the InsightCloudSec Organization).
                  default: false
                update_iac_configs:
                  type: boolean
                  description: Denotes whether any Infrastructure as Code configurations associated with the Insight Pack should be updated.
                  default: false
            examples:
              Update Insight Pack Example:
                value:
                  name: Custom Pack Name
                  description: Custom Pack Description
                  logo_url: null
                  backoffice:
                    - 9
                  custom: []
                  badges:
                    - key: system.cloud_type
                      value: amazon web services
                  badge_filter_operator: OR
                  global_pack: true
                  update_iac_configs: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /subscriptions/{subscription_id}:
    delete:
      summary: Delete Compliance Scorecard Subscriptions
      description: Deletes a Compliance Scorecard Subscription.
      operationId: delete-compliance-scorecard-subscriptions
      parameters:
        - name: subscription_id
          in: path
          description: The ID for the Compliance Scorecard subscription.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /compliance/score-card/export-upload/configs/{config_id}:
    delete:
      summary: Delete Compliance Scorecard Configuration
      description: Deletes a Compliance Scorecard Configuration.
      operationId: delete-compliance-scorecard-configuration
      parameters:
        - name: config_id
          in: path
          description: The ID for the Compliance Scorecard configuration.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /prototype/apa/categories:
    get:
      summary: List Attack Path Names and Categories
      description: Lists the names and categories of all available attack paths tracked by InsightCloudSec.
      operationId: list-attack-path-names-and-categories
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "categories": [
                            {
                                "category_id": "apa.publicly_exposed_compute_cloudtrail",
                                "description": "\n        This attack path definition looks for any publicly-available instances and checks to see\n        if any of them have a role which is capable of accessing CloudTrail data.\n    ",
                                "impact": "\n        An attacker may be able to view or steal sensitive information such as usernames, security configurations, and other sensitive data.\n        This can lead to a wide range of potential security breaches, including unauthorized access to confidential information, loss of data, and even financial loss due to fraudulent activities.\n    ",
                                "labels": [
                                    "Data Exfiltration"
                                ],
                                "name": "Publicly Exposed Compute Instance with access to Cloud Trail Data",
                                "remediation": "\n        1. Review whether the compute instance needs to be public or not.\n        2. Consider removing access to the sensitive S3 bucket by either restricting the \"Resource\" block, or removing s3 read permissions entirely from the IAM role.\n    "
                            },
                            {
                                "category_id": "apa.publicly_exposed_compute_pii_storage",
                                "description": "\n        This attack path definition looks for any publicly-available instances and checks to see\n        if any of them have a role which is capable of accessing PII information in S3 buckets.\n    ",
                                "impact": "\n        An attacker may be able to view or steal PII (personally identifiable information) such as names, social security numbers, birthdates.\n        This data, if exfiltrated, can lead to many adverse outcomes to the company, including financial and reputational losses.\n    ",
                                "labels": [
                                    "PII",
                                    "Data Exfiltration"
                                ],
                                "name": "Publicly Exposed Compute Instance with access to a Bucket Containing PII Data.",
                                "remediation": "\n        1. Ensure the listed S3 Bucket is meant to contain PII data by design. 2. Ensure the compute instance is authorized to be public.\n    "
                            },
                            {
                                "category_id": "apa.publicly_exposed_compute_priv_esc",
                                "description": "This attack path definition looks for any publicly-available instances and checks to see if any of them have a role which is capable of escalating privileges.\n        This can lead to account takeover, so it should be treated as high severity.\n    ",
                                "impact": "An attacker can use the compromised compute instance to steal sensitive data such as login credentials, customer data, financial information, and intellectual property.\n        It can be used to launch attacks on other systems, use up resources, incur unforseen costs, and cause denial-of-service (DoS) conditions or to distribute malware to other systems,\n        potentially causing further damage to the organization's infrastructure.\n    ",
                                "labels": [
                                    "Privilege Escalation"
                                ],
                                "name": "Publicly Exposed Compute Instance with Attached Privileged Role",
                                "remediation": "\n        1. Review whether the compute instance needs to be public or not.\n        2. Consider removing risky permissions from the IAM role attacked to the compute instance.\n    "
                            },
                            {
                                "category_id": "apa.publicly_high_vuln_sev_esc",
                                "description": "This attack path definition looks for any publicly-available instances and checks to see if any of them have a high/critical vulnerability severity.\n        This can lead to the instance being exploited, so it should be treated as high priority.\n    ",
                                "impact": "\n        An attacker may be able to access the instance via the internet and exploit the vulnerability to execute code.\n    ",
                                "labels": [
                                    "Compute Abuse"
                                ],
                                "name": "Publicly Exposed Compute Instance with High/Critical vulnerabilities",
                                "remediation": "\n        1. Click on the instance node for the attack path to view details about the node.\n        2. Find the vulnerabilties tab to see vulnerabilites.\n        3. From there you can find out where the vuln scan came from ie Inspector, IVM, HVA.\n        4. Refer to the originating scanner's content for instructions to remediate.\n    "
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  categories:
                    type: array
                    items:
                      type: object
                      properties:
                        category_id:
                          type: string
                          example: apa.publicly_exposed_compute_cloudtrail
                        description:
                          type: string
                          example: |2-

                                    This attack path definition looks for any publicly-available instances and checks to see
                                    if any of them have a role which is capable of accessing CloudTrail data.
                                
                        impact:
                          type: string
                          example: |2-

                                    An attacker may be able to view or steal sensitive information such as usernames, security configurations, and other sensitive data.
                                    This can lead to a wide range of potential security breaches, including unauthorized access to confidential information, loss of data, and even financial loss due to fraudulent activities.
                                
                        labels:
                          type: array
                          items:
                            type: string
                            example: Data Exfiltration
                        name:
                          type: string
                          example: Publicly Exposed Compute Instance with access to Cloud Trail Data
                        remediation:
                          type: string
                          example: |2-

                                    1. Review whether the compute instance needs to be public or not.
                                    2. Consider removing access to the sensitive S3 bucket by either restricting the "Resource" block, or removing s3 read permissions entirely from the IAM role.
                                
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
  /public/applications/settings:
    get:
      tags:
        - Applications
      summary: Get Application settings
      description: Retrieves the configuration settings for the Applications page.
      operationId: getApplicationSettings
      parameters: []
      responses:
        '200':
          description: OK - Application settings retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getApplicationSettings200'
    put:
      tags:
        - Applications
      summary: Update Application settings
      description: Updates the currently configured Application settings.
      operationId: updateApplicationSettings
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/getApplicationSettings200'
      responses:
        '200':
          description: OK - Application settings updated
  /public/applications/summary:
    post:
      tags:
        - Applications
      summary: Get Application summary
      description: Retrieves summary information for the configured Applications.
      operationId: getApplicationSummary
      parameters: []
      responses:
        '200':
          description: OK - Application summary retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getApplicationSummary200'
  /public/applications:
    post:
      tags:
        - Applications
      summary: Get Applications
      description: Retrieves a list of Applications.
      operationId: getApplications
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: OK - Applications retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getApplications200'
  /public/applications/update:
    post:
      tags:
        - Applications
      summary: Update Applications
      description: Updates existing Applications.
      operationId: updateApplications
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateApplications200'
      responses:
        '200':
          description: OK - Applications updated
  /public/applications/favorites/{applicationName}:
    post:
      tags:
        - Applications
      summary: Favorite an Application
      description: Makes an Application a Favorite, which increases its visibility.
      operationId: favoriteApplication
      parameters:
        - $ref: '#/components/parameters/applicationName'
      responses:
        '200':
          description: OK - Application favorited
    delete:
      tags:
        - Applications
      summary: Remove Application favorite status
      description: Removes the Favorite status for an Application.
      operationId: removeApplicationFavorite
      parameters:
        - $ref: '#/components/parameters/applicationName'
      responses:
        '200':
          description: OK - Application favorite status removed
components:
  securitySchemes:
    Api-Key:
      type: apiKey
      description: Requests to this API require an [API key](https://docs.rapid7.com/insightcloudsec/api-documentation#authentication) passed through the `Api-Key` header. For more information on security and access within InsightCloudSec, see [Users, Groups and Roles](https://docs.rapid7.com/insightcloudsec/user-roles).
      name: Api-Key
      in: header
  parameters:
    page:
      name: page
      in: query
      description: The index of the page to retrieve. `1` is the first index, and thus, corresponds to the first page.
      schema:
        type: integer
        default: 1
    page_size:
      name: page_size
      in: query
      description: The maximum number of records to include per page.
      schema:
        type: integer
        default: 50
    search:
      name: search
      in: query
      description: String to filter the results.
      schema:
        type: string
    order_by:
      name: order_by
      in: query
      description: '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`'
      schema:
        type: string
        default: ''
    applicationName:
      name: applicationName
      in: path
      required: true
      description: The name of the Application.
      schema:
        type: string
  schemas:
    getApplicationSettings200:
      type: object
      properties:
        application_tag_key:
          type: string
          description: The tag key used to create Applications from your environment.
        case_sensitive:
          type: boolean
          description: Denotes if the tag key is case sensitive.
        trim_whitespace:
          type: boolean
          description: Denotes if the whitespace should be trimmed from the tag key.
      example:
        application_tag_key: Owner
        case_sensitive: true
        trim_whitespace: false
    getApplicationSummary200:
      type: object
      properties:
        summary:
          type: object
          properties:
            top_five_categories:
              type: object
              description: The categories containing the top 5 most Applications.
              properties:
                category_count:
                  type: integer
                  description: The total number of Applications for a given category, e.g., Ecommerce, Education, Finance, Other, etc.
            top_five:
              type: object
              description: The Applications containing the top 5 most resources.
              properties:
                application_count:
                  type: integer
                  description: The total number of resources for a given Application.
            business_criticals:
              type: integer
              description: The total number of Business Critical Applications.
        total_count:
          type: integer
          description: The total number of Applications.
      example:
        summary:
          top_five_categories:
            other: 25
            ecommerce: 75
            finance: 50
            internal: 25
            support: 25
          top_five:
            development: 3287
            production: 1154
            testing_environment1: 798
            testing_environment2: 299
            testing_environment3: 293
          business_criticals: 10
        total_count: 200
    getApplications200:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              resource_id:
                type: string
                description: The unique InsightCloudSec resource ID for the Application.
              application:
                type: string
                description: The name of the Application.
              resource_count:
                type: integer
                description: The number of resources contained within the Application.
              accounts:
                type: integer
                description: The number of accounts contained within the Application.
              clouds:
                type: array
                description: The types of Cloud Service Providers associated with resources within the Application.
                items:
                  type: string
              name:
                type: string
                description: Short-hand resource name for the Application.
              category:
                type: string
                description: The category for the Application, e.g., Ecommerce, Education, Finance, Other, etc
              business_critical:
                type: boolean
                description: Denotes whether the Application is business critical.
              poc:
                type: string
                description: The point-of-contact for the Application.
              favorited:
                type: boolean
                description: Denotes whether the Application is a favorite.
              cores:
                type: integer
                description: The number of cores associated with resources within the Application.
              object_storage_bytes:
                type: string
                description: The number of bytes of object storage associated with resources within the Application.
              block_storage_gb:
                type: string
                description: The number of gigabytes of block storage associated with resources within the Application.
        ids:
          type: array
          description: List of IDs.
          items:
            type: string
        page:
          type: integer
          description: The page number for the results.
        page_size:
          type: string
          description: The size of the page for the results.
        total_count:
          type: string
          description: The count of Applications returned for the results.
        total_pages:
          type: string
          description: The number of pages of resultss.
      example:
        data:
          - resource_id: application:123a123a1ab1ab1a12345678a1234a12
            application: Development
            resource_count: 100
            accounts: 50
            clouds:
              - AWS
            name: null
            category: Other
            business_critical: false
            poc: john_smith@company.com
            favorited: true
            cores: 160
            object_storage_bytes: 500 MB
            block_storage_gb: 200 GB
          - resource_id: application:234a234a2ab2ab2a23456789a2345a23
            application: Production
            resource_count: 150
            accounts: 100
            clouds:
              - AWS
              - AWS_GOV
            name: null
            category: Other
            business_critical: true
            poc: john_smith@company.com
            favorited: true
            cores: 300
            object_storage_bytes: 1000 MB
            block_storage_gb: 400 GB
        ids: []
        page: 1
        page_size: 50
        total_count: 2
        total_pages: 1
    updateApplications200:
      type: object
      properties:
        name:
          type: string
          description: Short-hand resource name for the Application.
        category:
          type: string
          description: The category for the Application, e.g., Ecommerce, Education, Finance, Other, etc
        business_critical:
          type: boolean
          description: Denotes whether the Application is business critical.
        poc:
          type: string
          description: The point-of-contact for the Application.
        applications:
          type: array
          description: List of Application names to update.
          items:
            type: string
      example:
        name: ''
        category: Other
        business_critical: true
        poc: john_smith@company.com
        applications:
          - Development
x-tagGroups: []
