---
title: Prefix List
slug: aidc/prefix-list
createdAt: 2025-12-29T10:28:55.798Z
---

## <font color="#1d50a2">URLs Summary</font>

| **URL**                                                              | **GET** | **POST** | **PATCH** | **PUT** | **DELETE** |
| -------------------------------------------------------------------- | ------- | -------- | --------- | ------- | ---------- |
| /rest/v1/running/prefix-lists/&#x7B;name}                            | Y       | Y        | Y         | N       | Y          |
| /rest/v1/running/prefix-lists/&#x7B;name}/entries/&#x7B;sequence-id} | Y       | Y        | Y         | N       | Y          |
| /rest/v1/rpc/show-ip-prefix-list-summary-json                        | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-ipv6-prefix-list-summary-json                      | N       | Y        | N         | N       | N          |

## <font color="#1d50a2">Examples</font>

### <font color="#1d50a2">Create a prefix list.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/prefix-lists
{
    "name": "test",
    "type": "IPv4",
    "description": "test_ipv4_prefix_list"
}
```

### <font color="#1d50a2">Create prefix list entries.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/prefix-lists/test/entries
[{
    "sequence-id": "11",
    "action": "deny"
},{
    "sequence-id": "12",
    "action": "deny",
    "ipv4-prefix": "10.0.1.0/24",
    "min-ipv4-prefix-length": "25",
    "max-ipv4-prefix-length": "26"
},{
    "sequence-id": "13",
    "action": "permit",
    "ipv4-prefix": "10.0.2.0/24",
    "min-ipv4-prefix-length": "25"
},{
    "sequence-id": "14",
    "action": "deny",
    "ipv4-prefix": "10.0.3.0/24",
    "max-ipv4-prefix-length": "30"
},{
    "sequence-id": "15",
    "action": "deny",
    "ipv4-prefix": "10.0.4.0/24"
}]
```

### <font color="#1d50a2">Show IPv4 prefix list</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-ip-prefix-list-summary
```

### <font color="#1d50a2">Show IPv6 prefix list</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-ipv6-prefix-list-summary
```

## <font color="#1d50a2">Properties Descriptions</font>

### <font color="#1d50a2">Prefix lists and entries</font>

**Tree Diagrams**

```plaintext
  +--rw prefix-lists
     +--rw prefix-list* [name]
        +--rw name
        +--rw type
        +--rw description?
        +--rw entries
           +--rw entry* [sequence-id]
              +--rw sequence-id
              +--rw action
              +--rw (value)?
                 +--:(ipv4-prefix)
                 |  +--rw ipv4-prefix
                 |  +--rw min-ipv4-prefix-length?
                 |  +--rw max-ipv4-prefix-length?
                 +--:(ipv6-prefix)
                    +--rw ipv6-prefix
                    +--rw min-ipv6-prefix-length?
                    +--rw max-ipv6-prefix-length?
```

**Table of Properties**

| **Name**               | **Required** | **Type/Range**                   | **Description**                                                                                                                                                                                                       |
| ---------------------- | ------------ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| prefix-lists           | M            |                                  | Path-only node, has no configurable value.                                                                                                                                                                            |
| name                   | M            | prefix-list-name                 | (sub-property of prefix-lists)<br />Prefix list name                                                                                                                                                                  |
| type                   | M            | "IPv4"<br />"IPv6"               | (sub-property of prefix-lists)<br />Prefix list type                                                                                                                                                                  |
| description            | O            | string                           | (sub-property of prefix-lists)<br />Prefix list user description                                                                                                                                                      |
| entries                | M            |                                  | (sub-property of prefix-lists)<br />Path-only node, has no configurable value.                                                                                                                                        |
| sequence-id            | M            | 1..4294967295                    | (sub-property of entries)<br />Prefix list sequence value                                                                                                                                                             |
| action                 | M            | "deny"<br />"permit"             | (sub-property of entries)<br />Prefix list action on match                                                                                                                                                            |
| ipv4-prefix            | M            | A.B.C.D/M                        | (sub-property of entries)<br />Mutually exclusive with:<br />- ipv6-prefix<br />- min-ipv6-prefix-length<br />- max-ipv6-prefix-length<br />Configure IPv4 prefix to match                                            |
| min-ipv4-prefix-length | O            | 0..32                            | (sub-property of entries)<br />Mutually exclusive with:<br />- ipv6-prefix<br />- min-ipv6-prefix-length<br />- max-ipv6-prefix-length<br />Specifies if matching prefixes with length greater than or equal to value |
| max-ipv4-prefix-length | O            | 0..32                            | (sub-property of entries)<br />Mutually exclusive with:<br />- ipv6-prefix<br />- min-ipv6-prefix-length<br />- max-ipv6-prefix-length<br />Specifies if matching prefixes with length lesser than or equal to value  |
| ipv6-prefix            | M            | XX\:XX\:XX\:XX\:XX\:XX\:XX\:XX/M | (sub-property of entries)<br />Mutually exclusive with:<br />- ipv4-prefix<br />- min-ipv4-prefix-length<br />- max-ipv4-prefix-length<br />Configure IPv6 prefix to match                                            |
| min-ipv6-prefix-length | O            | 0..128                           | (sub-property of entries)<br />Mutually exclusive with:<br />- ipv4-prefix<br />- min-ipv4-prefix-length<br />- max-ipv4-prefix-length<br />Specifies if matching prefixes with length greater than or equal to value |
| max-ipv6-prefix-length | O            | 0..128                           | (sub-property of entries)<br />Mutually exclusive with:<br />- ipv4-prefix<br />- min-ipv4-prefix-length<br />- max-ipv4-prefix-length<br />Specifies if matching prefixes with length lesser than or equal to value  |

### <font color="#1d50a2">Show IPv4 prefix list</font>

**Tree Diagrams**

```plaintext
    +---x show-ip-prefix-list-summary-json
    |  +---w input
    |  |  +---w name?
    |  |  +---w sequence-id?
    |  +--ro output
    |     +--ro data?
```

**Table of Properties**

| **Name**                         | **Required** | **Type/Range** | **Description**                                         |   |
| -------------------------------- | ------------ | -------------- | ------------------------------------------------------- | - |
| show-ip-prefix-list-summary-json | M            |                | Path-only node, has no configurable value.              |   |
| name                             | O            | string         | (sub-property of input)<br />Name of a prefix list.     |   |
| sequence-id                      | O            | 1..4294967295  | (sub-property of input)<br />Prefix list sequence value |   |
| data                             | RO           | \<anydata>     | (sub-property of output)                                |   |

### <font color="#1d50a2">Show IPv6 prefix list</font>

**Tree Diagrams**

```plaintext
    +---x show-ipv6-prefix-list-summary-json
       +---w input
       |  +---w name?
       |  +---w sequence-id?
       +--ro output
          +--ro data?
```

**Table of Properties**

| **Name**                           | **Required** | **Type/Range** | **Description**                                         |
| ---------------------------------- | ------------ | -------------- | ------------------------------------------------------- |
| show-ipv6-prefix-list-summary-json | M            |                | Path-only node, has no configurable value.              |
| name                               | O            | string         | (sub-property of input)<br />Name of a prefix list.     |
| sequence-id                        | O            | 1..4294967295  | (sub-property of input)<br />Prefix list sequence value |
| data                               | RO           | \<anydata>     | (sub-property of output)                                |

