---
title: "List the organization’s network policies"
---

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

# List the organization’s network policies

Path: CloudRaker Workspace API › Network policies

`GET /network-policies`

Lists the live (non-revoked) policies of the caller’s organization, oldest id first. Query: `cursor` (the `nextCursor` of the previous page) and `limit` (1–100, default 50). Authorization: any member of the organization.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Query parameters

- `cursor` (`listNetworkPolicies.query.cursor`; string, optional)
  - pattern `^net_[0-9A-HJKMNP-TV-Z]{26}$`
- `limit` (`listNetworkPolicies.query.limit`; integer, optional)
  - min 1; max 100

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.cloudraker.com/network-policies \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/network-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://api.cloudraker.com/network-policies"

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

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

print(response.text)
```

## Responses

### 200

One page of policies.

#### Example

```json
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "hosts": {
        "property1": {
          "credentialRef": "string",
          "approval": true
        },
        "property2": {
          "credentialRef": "string",
          "approval": true
        }
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "revokedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
```

- `data` (`listNetworkPolicies.response.200.data`; array<object>, required)
  - `id` (`listNetworkPolicies.response.200.data.id`; string, required)
    - pattern `^net_[0-9A-HJKMNP-TV-Z]{26}$`
  - `name` (`listNetworkPolicies.response.200.data.name`; string, required)
  - `hosts` (`listNetworkPolicies.response.200.data.hosts`; map<object>, required)
  - `createdAt` (`listNetworkPolicies.response.200.data.createdAt`; string, required)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `createdBy` (`listNetworkPolicies.response.200.data.createdBy`; string, required)
  - `revokedAt` (`listNetworkPolicies.response.200.data.revokedAt`; any of, required) — Set once the policy is revoked. A revoked policy stays READABLE for history and every egress request under it is denied.
    - any of: `string`, `null`
- `nextCursor` (`listNetworkPolicies.response.200.nextCursor`; string | null, required)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`listNetworkPolicies.response.400.success`; boolean, required)
  - one of `false`
- `error` (`listNetworkPolicies.response.400.error`; array<unknown>, required)
- `data` (`listNetworkPolicies.response.400.data`; unknown, required)


Source: https://docs.cloudraker.com/workspace/api/network-policies/list-network-policies/index.md
