# Pool

## List pool rules

 - [GET /api/pool_rules](https://docs.treasure.ai/apis/workflow/pool/getpoolrules.md): List pool rules.

## Create a pool rule

 - [POST /api/pool_rules](https://docs.treasure.ai/apis/workflow/pool/createpoolrule.md): Create a rule that assigns an attempt to a pool based on conditions. A rule consists of a priority, conditions, and a pool ID. Rules are evaluated in priority order, from the lowest value to the highest value. Multiple rules cannot have the same priority. If all of a rule's conditions are met, an attempt is assigned to its pool. If none of the rules are met, an attempt is assigned to a default pool.

## Delete a pool rule

 - [DELETE /api/pool_rules/{poolRuleId}](https://docs.treasure.ai/apis/workflow/pool/deletepoolrule.md): Delete a pool rule.

## Get a pool rule

 - [GET /api/pool_rules/{poolRuleId}](https://docs.treasure.ai/apis/workflow/pool/getpoolrule.md): Get a pool rule.

## Update a pool rule

 - [PATCH /api/pool_rules/{poolRuleId}](https://docs.treasure.ai/apis/workflow/pool/updatepoolrule.md): Update a rule that assigns an attempt to a pool based on conditions.

## List pools

 - [GET /api/pools](https://docs.treasure.ai/apis/workflow/pool/getpools.md): List pools.

## Create a pool

 - [POST /api/pools](https://docs.treasure.ai/apis/workflow/pool/createpool.md): Create a pool with the specified name and concurrency limit. A default pool is created with the account's concurrency limit if it does not exist. The default pool’s concurrency limit is reduced by the new pool’s concurrency limit. You cannot create a pool if the default pool has more running attempts than its new reduced concurrency limit.

## Delete a pool

 - [DELETE /api/pools/{poolId}](https://docs.treasure.ai/apis/workflow/pool/deletepool.md): Delete a pool. You cannot delete a pool if there are any attempts running or queued in the pool, if a pool rule references it, or if it is the default pool. The deleted pool’s concurrency limit is added to the default pool’s concurrency limit.

## Get a pool

 - [GET /api/pools/{poolId}](https://docs.treasure.ai/apis/workflow/pool/getpool.md): Get a pool.

## Update a pool

 - [PATCH /api/pools/{poolId}](https://docs.treasure.ai/apis/workflow/pool/updatepool.md): Update a pool with the specified name and concurrency limit. You cannot update the default pool. The default pool’s concurrency limit is adjusted to accommodate the new concurrency limit. A pool’s concurrency limit cannot be reduced if it has more running attempts than its new reduced concurrency limit.

