---
title: "Count Resources from Rule"
method: POST
path: "/organizations/{organization_id}/policies/rules/count"
tags: ["BackupPolicies"]
---

# Count Resources from Rule

`POST /organizations/{organization_id}/policies/rules/count`

## Request

- Base URL: `https://api.cloudranger.com/202004`
- URL: `https://api.cloudranger.com/202004/organizations/{organization_id}/policies/rules/count`
- Auth: API key in header `Authorization` and API key in header `x-api-key`

Get the count of rules per policy

## Path parameters

- `organization_id` string, required

## Request body

- object[]
  - `accounts` object[]
    - `account_id` string
    - `rule_id` integer
  - `all_accounts` boolean
  - `all_regions` boolean
  - `all_resource_types` boolean
  - `created_at` string
  - `editable` boolean
  - `exclude` boolean
  - `id` integer
  - `policy_id` integer
  - `regions` string[]
  - `resource_types` string[]
  - `resources` object[]
    - `account_id` string
    - `region` string
    - `resource_id` string
    - `resource_name` string
    - `rule_id` integer
    - `type` string
  - `rule_type` string
  - `tags` string[]
  - `updated_at` string

## Response `200`

200 response

- PostOrganizationsPoliciesRulesCountResponse
  - `count` integer

## Other responses

- `201`: 201 response
- `401`: 401 response
- `403`: 403 response
- `404`: 404 response

---

[API](https://skmtc.dev/druva/apis/cloudranger.md) - [All operations](https://skmtc.dev/druva/apis/cloudranger/llms.txt) - [OpenAPI document](https://skmtc.dev/druva/apis/cloudranger/revisions/0b87602807da?raw)
