---
title: "ListPolicies"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: EZGH Cloud organizations and IAM › policies

`GET /v1/organizations/{orgId}/policies`

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie
- `oauth`, http, header `Authorization`

## Path parameters

- `ListPolicies.path.orgId` (string, required)

## Query parameters

- `ListPolicies.query.limit` (string, optional)
  - pattern `^[+-]?\d*\.?\d+(?:[Ee][+-]?\d+)?$`
- `ListPolicies.query.cursor` (string, optional)

## Code samples

### cURL

```curl
curl --request GET \
  --url https://orgs.ezghcloud.com/v1/organizations/string/policies \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://orgs.ezghcloud.com/v1/organizations/string/policies';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://orgs.ezghcloud.com/v1/organizations/string/policies"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Success

#### Example

```json
{
  "policies": [
    {
      "id": "string",
      "type": "managed",
      "name": "string",
      "slug": "string",
      "resourceName": "string",
      "description": "string",
      "document": {
        "statements": [
          {
            "sid": "string",
            "effect": "allow",
            "actions": [
              "string"
            ],
            "resources": [
              "string"
            ]
          }
        ]
      },
      "status": "active",
      "attachments": 0,
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "nextCursor": "string"
}
```

- `ListPolicies.response.200.policies` (array<object>, required)
  - `ListPolicies.response.200.policies.id` (string, required)
  - `ListPolicies.response.200.policies.type` (string, required)
    - one of `"managed"`, `"custom"`
  - `ListPolicies.response.200.policies.name` (string, required)
  - `ListPolicies.response.200.policies.slug` (any of, required)
    - any of: `string`, `null`
  - `ListPolicies.response.200.policies.resourceName` (any of, required)
    - any of: `string`, `null`
  - `ListPolicies.response.200.policies.description` (string, required)
  - `ListPolicies.response.200.policies.document` (object, required)
    - `ListPolicies.response.200.policies.document.statements` (array<object>, required)
      - `ListPolicies.response.200.policies.document.statements.effect` (string, required)
        - one of `"allow"`, `"deny"`
      - `ListPolicies.response.200.policies.document.statements.actions` (array<string>, required)
      - `ListPolicies.response.200.policies.document.statements.resources` (array<string>, required)
      - `ListPolicies.response.200.policies.document.statements.sid` (string, optional)
  - `ListPolicies.response.200.policies.status` (string, required)
    - one of `"active"`, `"deprecated"`
  - `ListPolicies.response.200.policies.attachments` (any of, required)
    - any of: `number`, `string`
  - `ListPolicies.response.200.policies.createdAt` (any of, required)
    - any of: `string`, `null`
  - `ListPolicies.response.200.policies.updatedAt` (any of, required)
    - any of: `string`, `null`
- `ListPolicies.response.200.nextCursor` (any of, required)
  - any of: `string`, `null`

### 400

InvalidCursor | InvalidRequest

#### Example

```json
{
  "error": {
    "code": "invalid_cursor",
    "message": "string"
  }
}
```

Any of:

- [InvalidCursorEncoded](/orgs-api/schemas/InvalidCursorEncoded/)
- [InvalidRequestEncoded](/orgs-api/schemas/InvalidRequestEncoded/)

### 401

Unauthenticated

#### Example

```json
{
  "error": {
    "code": "unauthenticated",
    "message": "string"
  }
}
```

- `ListPolicies.response.401.error` (object, required)
  - `ListPolicies.response.401.error.code` (string, required)
    - one of `"unauthenticated"`
  - `ListPolicies.response.401.error.message` (string, required)

### 403

AccessDenied | ForbiddenOrigin

#### Example

```json
{
  "error": {
    "code": "access_denied",
    "message": "string"
  }
}
```

Any of:

- [AccessDeniedEncoded](/orgs-api/schemas/AccessDeniedEncoded/)
- [ForbiddenOriginEncoded](/orgs-api/schemas/ForbiddenOriginEncoded/)

### 404

NotFound

#### Example

```json
{
  "error": {
    "code": "not_found",
    "message": "string"
  }
}
```

- `ListPolicies.response.404.error` (object, required)
  - `ListPolicies.response.404.error.code` (string, required)
    - one of `"not_found"`
  - `ListPolicies.response.404.error.message` (string, required)

### 429

TooManyRequests

#### Example

```json
{
  "error": {
    "code": "too_many_requests",
    "message": "string"
  }
}
```

- `ListPolicies.response.429.error` (object, required)
  - `ListPolicies.response.429.error.code` (string, required)
    - one of `"too_many_requests"`
  - `ListPolicies.response.429.error.message` (string, required)

### 500

InternalError

#### Example

```json
{
  "error": {
    "code": "internal_error",
    "message": "string"
  }
}
```

- `ListPolicies.response.500.error` (object, required)
  - `ListPolicies.response.500.error.code` (string, required)
    - one of `"internal_error"`
  - `ListPolicies.response.500.error.message` (string, required)

### 503

Unavailable

#### Example

```json
{
  "error": {
    "code": "unavailable",
    "message": "string"
  }
}
```

- `ListPolicies.response.503.error` (object, required)
  - `ListPolicies.response.503.error.code` (string, required)
    - one of `"unavailable"`
  - `ListPolicies.response.503.error.message` (string, required)


Source: https://docs.ezghcloud.com/orgs-api/policies/ListPolicies/index.md
