---
title: "List All Resource Groups"
method: GET
path: "/api/v2/ResourceGroups"
tags: ["ResourceGroups"]
---

# List All Resource Groups

`GET /api/v2/ResourceGroups`

Get a list of all resource groups for the account by invoking the following endpoint:

  > `GET https://YourAccount.lacework.net/api/v2/ResourceGroups`

## Headers

- `Authorization` string, required
- `Content-Type` string, required
- `Account-Name` string
- `Org-Access` boolean

## Response `200`

No Error (List of ResourceGroups)

- object
  - `data` ResourceGroupsResponseSchema[]
    - union
      - ResourceGroupsAWSResponseSchema
        - `name` string, required — The resource group's name.
        - `description` string — A brief description of the resource group.
        - `resourceType` 'AWS', required — The resource type such as cloud accounts, containers, or machines.
        - `query` object, required — The query used to fetch resources matching the filters defined here.
          - `filters` object[], required — The predicate that a resource should apply to.
            - `^\w+$` object — A name-value pair where the name is the name of the filter to be applied in an expression and the value is an object that defines the filter expression.
              - …
          - `expression` object, required — Query expression that defines how the filters should be combined.
            - `operator` 'AND' | 'OR', required — Type of operator to apply.
            - `children` object[], required — Combines one or more filters. You must specify either `filterName` or `children` in a filter.
              - …
        - `enabled` 0 | 1 — When sending a request, use this attribute to enable or disable a resource group. When included in a response, returns `1` for enabled resource groups, or returns `0` for disabled resource groups.
        - `resourceGroupGuid` string — Resource Group ID.
        - `guid` string — Returns the customer ID.
        - `isDefaultBoolean` boolean — Returns `true` if this is a default resource group. Otherwise, returns `false`.
        - `updatedBy` string — The email of the FortiCNAPP user who last updated the resource group configuration.
        - `updatedTime` number — When this resource group configuration last changed.
      - ResourceGroupsGCPResponseSchema
        - `name` string, required — The resource group's name.
        - `description` string — A brief description of the resource group.
        - `resourceType` 'GCP', required — The resource type such as cloud accounts, containers, or machines.
        - `query` object, required — The query used to fetch resources matching the filters defined here.
          - `filters` object[], required — The predicate that a resource should apply to.
            - `^\w+$` object — A name-value pair where the name is the name of the filter to be applied in an expression and the value is an object that defines the filter expression.
              - …
          - `expression` object, required — Query expression that defines how the filters should be combined.
            - `operator` 'AND' | 'OR', required — Type of operator to apply.
            - `children` object[], required — Combines one or more filters. You must specify either `filterName` or `children` in a filter.
              - …
        - `enabled` 0 | 1 — When sending a request, use this attribute to enable or disable a resource group. When included in a response, returns `1` for enabled resource groups, or returns `0` for disabled resource groups.
        - `resourceGroupGuid` string — Resource Group ID.
        - `guid` string — Returns the customer ID.
        - `isDefaultBoolean` boolean — Returns `1` if this is a default resource group. Otherwise, returns `0`.
        - `updatedBy` string — The email of the FortiCNAPP user who last updated the resource group configuration.
        - `updatedTime` number — When this resource group configuration last changed.
      - ResourceGroupsAZUREResponseSchema
        - `name` string, required — The resource group's name.
        - `description` string — A brief description of the resource group.
        - `resourceType` 'AZURE', required — The resource type such as cloud accounts, containers, or machines.
        - `query` object, required — The query used to fetch resources matching the filters defined here.
          - `filters` object[], required — The predicate that a resource should apply to.
            - `^\w+$` object — A name-value pair where the name is the name of the filter to be applied in an expression and the value is an object that defines the filter expression.
              - …
          - `expression` object, required — Query expression that defines how the filters should be combined.
            - `operator` 'AND' | 'OR', required — Type of operator to apply.
            - `children` object[], required — Combines one or more filters. You must specify either `filterName` or `children` in a filter.
              - …
        - `enabled` 0 | 1 — When sending a request, use this attribute to enable or disable a resource group. When included in a response, returns `1` for enabled resource groups, or returns `0` for disabled resource groups.
        - `resourceGroupGuid` string — Resource Group ID.
        - `guid` string — Returns the customer ID.
        - `isDefaultBoolean` boolean — Returns `true` if this is a default resource group. Otherwise, returns `false`.
        - `updatedBy` string — The email of the FortiCNAPP user who last updated the resource group configuration.
        - `updatedTime` number — When this resource group configuration last changed.
      - ResourceGroupsMACHINEResponseSchema
        - `name` string — The resource group's name.
        - `description` string — A brief description of the resource group.
        - `resourceType` 'MACHINE', required — The resource type such as cloud accounts, containers, or machines.
        - `query` object, required — The query used to fetch resources matching the filters defined here.
          - `filters` object[], required — The predicate that a resource should apply to.
            - `^\w+$` object — A name-value pair where the name is the name of the filter to be applied in an expression and the value is an object that defines the filter expression.
              - …
          - `expression` object, required — Query expression that defines how the filters should be combined.
            - `operator` 'AND' | 'OR', required — Type of operator to apply.
            - `children` object[], required — Combines one or more filters. You must specify either `filterName` or `children` in a filter.
              - …
        - `enabled` 0 | 1 — When sending a request, use this attribute to enable or disable a resource group. When included in a response, returns `1` for enabled resource groups, or returns `0` for disabled resource groups.
        - `resourceGroupGuid` string — Resource Group ID.
        - `guid` string — Returns the customer ID.
        - `isDefaultBoolean` boolean — Returns `true` if this is a default resource group. Otherwise, returns `false`.
        - `updatedBy` string — The email of the FortiCNAPP user who last updated the resource group configuration.
        - `updatedTime` number — When this resource group configuration last changed.
      - ResourceGroupsCONTAINERResponseSchema
        - `name` string, required — The resource group's name.
        - `description` string — A brief description of the resource group.
        - `resourceType` 'CONTAINER', required — The resource type such as cloud accounts, containers, or machines.
        - `query` object, required — The query used to fetch resources matching the filters defined here.
          - `filters` object[], required — The predicate that a resource should apply to.
            - `^\w+$` object — A name-value pair where the name is the name of the filter to be applied in an expression and the value is an object that defines the filter expression.
              - …
          - `expression` object, required — Query expression that defines how the filters should be combined.
            - `operator` 'AND' | 'OR', required — Type of operator to apply.
            - `children` object[], required — Combines one or more filters. You must specify either `filterName` or `children` in a filter.
              - …
        - `enabled` 0 | 1 — When sending a request, use this attribute to enable or disable a resource group. When included in a response, returns `1` for enabled resource groups, or returns `0` for disabled resource groups.
        - `resourceGroupGuid` string — Resource Group ID.
        - `guid` string — Returns the customer ID.
        - `isDefaultBoolean` boolean — Returns `true` if this is a default resource group. Otherwise, returns `false`.
        - `updatedBy` string — The email of the FortiCNAPP user who last updated the resource group configuration.
        - `updatedTime` number — When this resource group configuration last changed.
      - ResourceGroupsOCIResponseSchema
        - `name` string, required — The resource group's name.
        - `description` string — A brief description of the resource group.
        - `resourceType` 'OCI', required — The resource type such as cloud accounts, containers, or machines.
        - `query` object, required — The query used to fetch resources matching the filters defined here.
          - `filters` object[], required — The predicate that a resource should apply to.
            - `^\w+$` object — A name-value pair where the name is the name of the filter to be applied in an expression and the value is an object that defines the filter expression.
              - …
          - `expression` object, required — Query expression that defines how the filters should be combined.
            - `operator` 'AND' | 'OR', required — Type of operator to apply.
            - `children` object[], required — Combines one or more filters. You must specify either `filterName` or `children` in a filter.
              - …
        - `enabled` 0 | 1 — When sending a request, use this attribute to enable or disable a resource group. When included in a response, returns `1` for enabled resource groups, or returns `0` for disabled resource groups.
        - `resourceGroupGuid` string — Resource Group ID.
        - `guid` string — Returns the customer ID.
        - `isDefaultBoolean` boolean — Returns `1` if this is a default resource group. Otherwise, returns `0`.
        - `updatedBy` string — The email of the FortiCNAPP user who last updated the resource group configuration.
        - `updatedTime` number — When this resource group configuration last changed.
      - ResourceGroupsKUBERNETESResponseSchema
        - `name` string, required — The resource group's name.
        - `description` string — A brief description of the resource group.
        - `resourceType` 'KUBERNETES', required — The resource type such as cloud accounts, containers, or machines.
        - `query` object, required — The query used to fetch resources matching the filters defined here.
          - `filters` object[], required — The predicate that a resource should apply to.
            - `^\w+$` object — A name-value pair where the name is the name of the filter to be applied in an expression and the value is an object that defines the filter expression.
              - …
          - `expression` object, required — Query expression that defines how the filters should be combined.
            - `operator` 'AND' | 'OR', required — Type of operator to apply.
            - `children` object[], required — Combines one or more filters. You must specify either `filterName` or `children` in a filter.
              - …
        - `enabled` 0 | 1 — When sending a request, use this attribute to enable or disable a resource group. When included in a response, returns `1` for enabled resource groups, or returns `0` for disabled resource groups.
        - `resourceGroupGuid` string — Resource Group ID.
        - `guid` string — Returns the customer ID.
        - `isDefaultBoolean` boolean — Returns `true` if this is a default resource group. Otherwise, returns `false`.
        - `updatedBy` string — The email of the FortiCNAPP user who last updated the resource group configuration.
        - `updatedTime` number — When this resource group configuration last changed.

## Other responses

- `204` — No Data
- `4XX` — Client Error
- `5XX` — Internal Server Error

---

[API](https://skmtc.net/lacework/apis/forticnapp-api-2-0-documentation.md) · [All operations](https://skmtc.net/lacework/apis/forticnapp-api-2-0-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lacework/forticnapp-api-2-0-documentation/revisions/7015f76895f2/schema)
