# Selection API

Use the Selection API to manage entity selections across selection pools.
{% admonition type="info" name="Note" %}The maximum selection limit is 5000 entities. This limit is configurable through `CONTENT.SelectionPoolDefinition.MaxSelection`.{% /admonition %}
## Authentication
To use this API, you need:
- The URL of your Content Hub server. You can get this from your Content Hub Administrator. Enter this URL in the <b>{{server}}</b> variable by hovering your mouse over the variable in the <b>Try it</b> pane and then clicking <b>Edit</b>.
- An access token and the client ID. Both are sent with every request. You  can create a token through the [Content Hub interface](https://doc.sitecore.com/ch/en/users/content-hub/create-an-oauth-client.html)  or by [requesting one using the API itself](https://doc.sitecore.com/ch/en/developers/cloud-dev/oauth-tokens.html#grant-flows).

Version: v1.0
License: closed source

Metadata:
  - product: Content Hub

## Servers

```
https://{server}
```

Variables:
- `server`
  Default: "your-server"

## Security

### OAuth2.0

Type: oauth2
Authorization URL: /oauth/authorize
Token URL: /oauth/token
Scopes:

## Download OpenAPI description

 - [Selection API](https://api-docs.sitecore.com/_bundle/ch/selection-api/index.yaml)

## Selection

 - [GET /api/selection/{selectionPool}/{definitionName}](https://api-docs.sitecore.com/ch/selection-api/selection/getselection.md): Retrieves selection items for a given selection pool. At least one of the following must be provided. If both are provided, the route parameter takes precedence: - `definitionName` (route parameter) -
 - [DELETE /api/selection/{selectionPool}/{definitionName}](https://api-docs.sitecore.com/ch/selection-api/selection/clearselection.md): Removes all the entities for a specific definition from the selection. It does not delete the selection pool itself and does not affect other definitions in the same pool or other sub-pools.
 - [POST /api/selection](https://api-docs.sitecore.com/ch/selection-api/selection/createselection.md): Creates a selection using one of the following modes: - **Mode 1** Direct Entity IDs - use this mode when you know the specific entity IDs to add. - **Mode 2** Query-Based Selection - use this mode to
 - [PATCH /api/selection](https://api-docs.sitecore.com/ch/selection-api/selection/updateselection.md): 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.
