---
title: "GET /v1/projects/{projectsId}/locations/{locationsId}/rules"
method: GET
path: "/v1/projects/{projectsId}/locations/{locationsId}/rules"
tags: ["projects"]
---

# GET /v1/projects/{projectsId}/locations/{locationsId}/rules

`GET /v1/projects/{projectsId}/locations/{locationsId}/rules`

## Request

- Base URL: `https://workloadmanager.googleapis.com`
- URL: `https://workloadmanager.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/rules`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Lists rules in a given project.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `customRulesBucket` string
- `evaluationType` 'EVALUATION_TYPE_UNSPECIFIED' | 'SAP' | 'SQL_SERVER' | 'OTHER'
- `filter` string
- `pageSize` integer
- `pageToken` string

## Response `200`

Successful response

- ListRulesResponse: Response message for the ListRules RPC.
  - `rules` Rule[]: All rules in response.
    - `assetType` string: The CAI asset type of the rule is evaluating, for joined asset types, it will be the corresponding primary asset types.
    - `description` string: Describe rule in plain language.
    - `displayName` string: The name display in UI.
    - `errorMessage` string: The message template for rule.
    - `name` string: Rule name.
    - `primaryCategory` string: The primary category.
    - `remediation` string: The remediation for the rule.
    - `revisionId` string: Output only. The version of the rule.
    - `ruleType` 'RULE_TYPE_UNSPECIFIED' | 'BASELINE' | 'CUSTOM': The type of the rule.
    - `secondaryCategory` string: The secondary category.
    - `severity` string: The severity of the rule.
    - `tags` string[]: List of user-defined tags.
    - `uri` string: The document url for the rule.

---

[API](https://skmtc.dev/google/apis/workloadmanager.md) - [All operations](https://skmtc.dev/google/apis/workloadmanager/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/workloadmanager/revisions/5d93d5206535?raw)
