# Update a selection

Add or remove entities from a selection.  This request can contain multiple commands and is used both to add and to remove entities from a selection using the PATCH object.

Endpoint: PATCH /api/selection
Version: v1.0
Security: OAuth2.0

## Security:

  - `OAuth2.0` (unknown)
    oauth2

## Query parameters:

  - `loadPermissions` (boolean)
    Return updated permissions in response

## Request fields (application/json):

  - `selectionPool` (string, required)

  - `definitionName` (string, required)

  - `subPoolId` (integer)

  - `patches` (array, required)

  - `patches.operation` (string, required)
    Enum: "Add", "Remove"

  - `patches.value` (array, required)

## Response 200:

  - `200` (unknown)
    Selection updated with permissions

## Response 200 fields (application/json):

  - `items` (array)

  - `permissions` (array)

  - `link` (object)

  - `link.href` (string)

  - `link.type` (string)

## Response 204:

  - `204` (unknown)
    Selection updated successfully

## Response 400:

  - `400` (unknown)
    Invalid request body

## Response 403:

  - `403` (unknown)
    Selection capacity exceeded. Default limit is 5000 entities per selection. Validation considers (current items + items to add - items to remove).

## Response 403 fields (application/json):

  - `message` (string)

## Response 404:

  - `404` (unknown)
    Selection pool not found

