# Update Destination List

```http
PATCH /destinationlists/{destinationListId}
```

API: Cisco Secure Access Destination Lists API (version 2.0.4)

Operation ID: updateDestinationLists

Tags: Destination Lists, Secure Access

## Description

Update the name of a destination list in your organization.

## Servers

```json
[
  {
    "url": "https://api.sse.cisco.com/{basePath}",
    "variables": {
      "basePath": {
        "default": "policies/v2"
      }
    }
  }
]
```

## Authentication

Satisfy any one of the following alternatives. Within each alternative, all listed schemes are required. An empty object allows anonymous access.

```json
[
  {
    "oauthFlow": [
      "policies.destinationLists:write"
    ]
  }
]
```

### Security schemes

```json
{
  "oauthFlow": {
    "type": "oauth2",
    "description": "client credential flow",
    "flows": {
      "clientCredentials": {
        "tokenUrl": "https://api.sse.cisco.com/auth/v2/token",
        "scopes": {
          "policies.destinationLists:write": "Write policies destination lists",
          "policies.destinationLists:read": "Read policies destination lists",
          "policies.destinations:write": "Write policies destinations",
          "policies.destinations:read": "Read policies destinations"
        }
      }
    }
  }
}
```

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| destinationListId | path | yes | integer | The unique ID of the destination list. |

### Parameter definitions

```json
[
  {
    "name": "destinationListId",
    "in": "path",
    "schema": {
      "type": "integer"
    },
    "description": "The unique ID of the destination list.",
    "required": true,
    "example": 245,
    "$$ref": "#/components/parameters/destinationListId"
  }
]
```

## Request body

Required: yes

```json
{
  "description": "Update a destination list.",
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "Update the name of the destination list.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "Global Allow list",
            "description": "The name of the destination list.",
            "$$ref": "#/components/schemas/name"
          }
        },
        "$$ref": "#/components/schemas/DestinationListPatch"
      },
      "example": {
        "name": "Updated name of destination list"
      }
    }
  }
}
```

## Responses

### 200

OK

```json
{
  "description": "OK",
  "headers": {
    "Content-Type": {
      "schema": {
        "type": "string"
      },
      "description": "The MIME content type of the response body.",
      "example": "application/json",
      "$$ref": "#/components/headers/Content-Type"
    },
    "Date": {
      "schema": {
        "type": "string",
        "pattern": "^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"
      },
      "description": "The timestamp of the response.",
      "example": "2023-03-14T18:34:25Z",
      "$$ref": "#/components/headers/Date"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "The status and properties of the destination lists.",
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "object",
            "required": [
              "code",
              "text"
            ],
            "description": "The status information for the response.",
            "properties": {
              "code": {
                "type": "integer",
                "description": "The HTTP status code of the response.",
                "example": 200
              },
              "text": {
                "type": "string",
                "description": "The HTTP message that describes the response.",
                "example": "OK"
              }
            },
            "example": {
              "code": 200,
              "text": "OK"
            },
            "$$ref": "#/components/schemas/status"
          },
          "data": {
            "type": "object",
            "required": [
              "id",
              "organizationId",
              "access",
              "isGlobal",
              "name",
              "thirdpartyCategoryId",
              "createdAt",
              "modifiedAt",
              "isMspDefault",
              "markedForDeletion"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "example": 1234567,
                "description": "The unique ID of the destination list.",
                "$$ref": "#/components/schemas/id"
              },
              "organizationId": {
                "type": "integer",
                "example": 2345678,
                "description": "The organization ID.",
                "$$ref": "#/components/schemas/organizationId"
              },
              "access": {
                "type": "string",
                "example": "none",
                "description": "Configure your access rules to block or allow certain destination lists.\nNo support for the access type on destination lists.\nValid values are: `allow`, `block`, `url_proxy`, `no_decrypt`, `warn`, `none`, or `third_party_block`.",
                "enum": [
                  "allow",
                  "block",
                  "url_proxy",
                  "no_decrypt",
                  "warn",
                  "none",
                  "thirdparty_block"
                ],
                "$$ref": "#/components/schemas/access"
              },
              "isGlobal": {
                "type": "boolean",
                "example": false,
                "description": "Specifies whether the destination list is a global destination list.\nThere is only one default `allow` destination list and one default `block` destination list for an organization.\n**Note:** No support for global destination lists. When you creat a destination list, set the `isGlobal` field to `false`.",
                "$$ref": "#/components/schemas/isGlobal"
              },
              "name": {
                "type": "string",
                "example": "Global Allow list",
                "description": "The name of the destination list.",
                "$$ref": "#/components/schemas/name"
              },
              "thirdpartyCategoryId": {
                "type": "integer",
                "example": 1,
                "description": "The third-party category ID of the destination list."
              },
              "createdAt": {
                "type": "integer",
                "example": 1490206249,
                "description": "The date and time when the system created the destination list."
              },
              "modifiedAt": {
                "type": "integer",
                "example": 1520476127,
                "description": "The date and time when the system modified the destination list."
              },
              "isMspDefault": {
                "type": "boolean",
                "description": "Specifies whether MSP is the default.",
                "example": false
              },
              "markedForDeletion": {
                "type": "boolean",
                "example": false,
                "description": "Specifies whether the system marks the destination list for deletion."
              },
              "bundleTypeId": {
                "type": "integer",
                "enum": [
                  1,
                  2,
                  4
                ],
                "example": 2,
                "description": "The type of the destination list.\nIn your policy rules, the system applies security controls to your destination lists.",
                "$$ref": "#/components/schemas/bundleTypeId"
              },
              "meta": {
                "type": "object",
                "description": "The total number of each type of destination in the destination list. The fields in the `meta` object are optional.",
                "properties": {
                  "destinationCount": {
                    "type": "integer",
                    "example": 5,
                    "description": "The total number of destinations in a destination list."
                  },
                  "domainCount": {
                    "type": "integer",
                    "example": 5,
                    "description": "The total number of domains in a destination list.\nDomains are part of the total number of destinations in a destination list."
                  },
                  "urlCount": {
                    "type": "integer",
                    "example": 0,
                    "description": "The total number of URLs in a destination list.\nUrls are part of the total number of destinations in a destination list."
                  },
                  "ipv4Count": {
                    "type": "integer",
                    "example": 0,
                    "description": "The total number of IPv4 addresses in a destination list.\nIPv4 addresses are part of the total number of destinations in a destination list."
                  },
                  "ipv6Count": {
                    "type": "integer",
                    "example": 0,
                    "description": "The total number of IPv6 addresses in a destination list.\nIPv6 addresses are part of the total number of destinations in a destination list."
                  },
                  "applicationCount": {
                    "type": "integer",
                    "example": 0,
                    "description": "The total number of applications in a destination list.\nApplications are part of the total number of destinations in a destination list."
                  }
                },
                "example": {
                  "domainCount": 1,
                  "urlCount": 0,
                  "ipv4Count": 1,
                  "ipv6Count": 0,
                  "destinationCount": 2,
                  "applicationCount": 0
                }
              }
            },
            "example": {
              "id": 1234567,
              "organizationId": 2345678,
              "access": "none",
              "isGlobal": false,
              "name": "Global Allow List",
              "thirdpartyCategoryId": 0,
              "createdAt": 1490206249,
              "modifiedAt": 1520476127,
              "isMspDefault": false,
              "markedForDeletion": false,
              "bundleTypeId": 2,
              "meta": {
                "destinationCount": 5,
                "domainCount": 5,
                "urlCount": 0,
                "ipv4Count": 0,
                "ipv6Count": 0,
                "applicationCount": 0
              }
            },
            "$$ref": "#/components/schemas/DestinationListObject"
          }
        },
        "$$ref": "#/components/schemas/DestinationListResponse"
      },
      "example": {
        "status": {
          "code": 200,
          "text": "OK"
        },
        "data": {
          "id": 2477857,
          "organizationId": 22429759,
          "access": "none",
          "isGlobal": false,
          "name": "New name of destination list",
          "thirdpartyCategoryId": 0,
          "createdAt": 1532628019,
          "modifiedAt": 1532628019,
          "isMspDefault": false,
          "markedForDeletion": false,
          "bundleTypeId": 2,
          "meta": {
            "destinationCount": 1
          }
        }
      }
    }
  }
}
```

### 400

Bad Request

```json
{
  "description": "Bad Request",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "Bad Request",
        "properties": {
          "statusCode": {
            "type": "integer",
            "example": 400,
            "description": "HTTP status code"
          },
          "error": {
            "type": "string",
            "example": "Bad Request",
            "description": "A brief description of the error"
          },
          "message": {
            "type": "string",
            "example": "Validation Error"
          },
          "txId": {
            "type": "string",
            "example": "d479k9i2b723"
          }
        },
        "$$ref": "#/components/schemas/BadRequestError"
      },
      "examples": {
        "example_bad_request": {
          "summary": "Bad Request Example Response",
          "value": {
            "statusCode": 400,
            "error": "Bad Request",
            "message": "Validation Error",
            "txId": "d479k9i2b723-abdj1-672635-45362"
          },
          "$$ref": "#/components/examples/400BadRequestExample"
        }
      }
    }
  },
  "$$ref": "#/components/responses/BadRequest"
}
```

### 401

Unauthorized

```json
{
  "description": "Unauthorized",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "Unauthorized",
        "properties": {
          "statusCode": {
            "type": "integer",
            "example": 401,
            "description": "HTTP status code"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized",
            "description": "The authorization header is missing or the token is unauthorized."
          },
          "txId": {
            "type": "string",
            "example": "a478k9i2b723"
          }
        },
        "$$ref": "#/components/schemas/UnauthorizedError"
      }
    }
  },
  "$$ref": "#/components/responses/Unauthorized"
}
```

### 403

Forbidden

```json
{
  "description": "Forbidden",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "Forbidden",
        "properties": {
          "statusCode": {
            "type": "integer",
            "example": 403,
            "description": "HTTP status code"
          },
          "error": {
            "type": "string",
            "example": "Forbidden",
            "description": "The token is invalid."
          },
          "txId": {
            "type": "string",
            "example": "a478k9i2b723"
          }
        },
        "$$ref": "#/components/schemas/ForbiddenError"
      }
    }
  },
  "$$ref": "#/components/responses/Forbidden"
}
```

### 404

Not Found

```json
{
  "description": "Not Found",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "Not Found",
        "properties": {
          "statusCode": {
            "type": "integer",
            "example": 404,
            "description": "HTTP status code"
          },
          "error": {
            "type": "string",
            "example": "Not Found",
            "description": "A resource specified in the URL was not found."
          },
          "txId": {
            "type": "string",
            "example": "a478k9i2b723"
          }
        },
        "$$ref": "#/components/schemas/NotFoundError"
      }
    }
  },
  "$$ref": "#/components/responses/NotFound"
}
```

### 500

Internal Server Error

```json
{
  "description": "Internal Server Error",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "Internal Server Error",
        "properties": {
          "statusCode": {
            "type": "integer",
            "example": 500,
            "description": "HTTP status code"
          },
          "error": {
            "type": "string",
            "example": "Internal Server Error",
            "description": "The server can not process the request."
          },
          "message": {
            "type": "string",
            "example": "An internal server error occurred"
          },
          "txId": {
            "type": "string",
            "example": "l477k9i2b893"
          }
        },
        "$$ref": "#/components/schemas/ServerError"
      }
    }
  },
  "$$ref": "#/components/responses/ServerErr"
}
```

## Additional OpenAPI fields

```json
{
  "__originalOperationId": "updateDestinationLists"
}
```
