# Organization API: Customer Portal: Shield

> The 6 Organization API operations for shield.

Source: https://www.coritan.com/docs/api/reference/organizations/customer-portal/shield/

Part of [Customer Portal](/docs/api/reference/organizations/customer-portal/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/portal/shield/events`](#op-get-api-v1-orgs-org-slug-portal-shield-events) | Shield events list |
| GET | [`/api/v1/orgs/{org_slug}/portal/shield/status`](#op-get-api-v1-orgs-org-slug-portal-shield-status) | Shield status |
| GET | [`/api/v1/orgs/{org_slug}/portal/shield/subjects/{ip_service_id}/profile`](#op-get-api-v1-orgs-org-slug-portal-shield-subjects-ip-service-id-profile) | Get subject profile |
| PATCH | [`/api/v1/orgs/{org_slug}/portal/shield/subjects/{ip_service_id}/profile`](#op-patch-api-v1-orgs-org-slug-portal-shield-subjects-ip-service-id-profile) | Promote subject to a customer-editable custom profile (idempotent) |
| POST | [`/api/v1/orgs/{org_slug}/portal/shield/subjects/{ip_service_id}/rules`](#op-post-api-v1-orgs-org-slug-portal-shield-subjects-ip-service-id-rules) | Create subject rule |
| DELETE | [`/api/v1/orgs/{org_slug}/portal/shield/subjects/{ip_service_id}/rules/{rule_id}`](#op-delete-api-v1-orgs-org-slug-portal-shield-subjects-ip-service-id-rules-rule-id) | Delete subject rule |

### Shield events list {#op-get-api-v1-orgs-org-slug-portal-shield-events}

`GET /api/v1/orgs/{org_slug}/portal/shield/events`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org_slug` | path | string | yes |  |
| `limit` | query | integer | no | Default: `50`. |
| `ip_service_id` | query | integer or null | no |  |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Shield status {#op-get-api-v1-orgs-org-slug-portal-shield-status}

`GET /api/v1/orgs/{org_slug}/portal/shield/status`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Get subject profile {#op-get-api-v1-orgs-org-slug-portal-shield-subjects-ip-service-id-profile}

`GET /api/v1/orgs/{org_slug}/portal/shield/subjects/{ip_service_id}/profile`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `ip_service_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Promote subject to a customer-editable custom profile (idempotent) {#op-patch-api-v1-orgs-org-slug-portal-shield-subjects-ip-service-id-profile}

`PATCH /api/v1/orgs/{org_slug}/portal/shield/subjects/{ip_service_id}/profile`

Promote subject to a customer-editable custom profile (idempotent).

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `ip_service_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Create subject rule {#op-post-api-v1-orgs-org-slug-portal-shield-subjects-ip-service-id-rules}

`POST /api/v1/orgs/{org_slug}/portal/shield/subjects/{ip_service_id}/rules`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `ip_service_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `name` | string | no |
| `enabled` | boolean | no |
| `action` | string | no |
| `protocol` | integer or null | no |
| `src_prefix` | string or null | no |
| `dst_prefix` | string or null | no |
| `src_port_min` | integer or null | no |
| `src_port_max` | integer or null | no |
| `dst_port_min` | integer or null | no |
| `dst_port_max` | integer or null | no |
| `tcp_flags_mask` | integer or null | no |
| `tcp_flags_value` | integer or null | no |
| `packet_len_min` | integer or null | no |
| `packet_len_max` | integer or null | no |
| `ttl_min` | integer or null | no |
| `ttl_max` | integer or null | no |
| `icmp_type` | integer or null | no |
| `icmp_code` | integer or null | no |
| `rate_limit_pps` | integer or null | no |
| `notes` | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Delete subject rule {#op-delete-api-v1-orgs-org-slug-portal-shield-subjects-ip-service-id-rules-rule-id}

`DELETE /api/v1/orgs/{org_slug}/portal/shield/subjects/{ip_service_id}/rules/{rule_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `ip_service_id` | path | integer | yes |
| `rule_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
