> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revoengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Limit a low-code operation

> Acquire and release a slot around one bounded operation.

Use explicit low-code admission when one section of a Component needs a dynamic concurrency key. `api.concurrencyLimit()` returns whether it acquired a slot; it does not automatically enqueue work that cannot enter.

## Explore the behavior

Next step

<ol />

Step  of . . .

Illustration only. Select a step to inspect it or return to the start.

## Bounded read example

This Component requires write-capable execution because acquiring a coordination slot changes coordination state. The business query itself is read-only. Replace the database name with an accessible Table and keep execution time below the 60-second permit lifetime.

```js theme={null}
const customerId = api.input()?.customerId;
if (
  typeof customerId !== 'string' ||
  !/^[A-Za-z0-9_-]{1,80}$/.test(customerId)
) {
  throw new Error('A valid customerId is required.');
}

const key = 'customer-summary:' + customerId;
const admitted = await api.concurrencyLimit(key, 2, 60);
if (!admitted) {
  return { status: 'BUSY' };
}

try {
  const page = await api.getDatabaseData('orders', {
    fields: ['orderId', 'status'],
    filter: { field: 'customerId', op: 'eq', value: customerId },
    take: 20,
  });
  return { status: 'FINISHED', rows: page.data };
} finally {
  await api.releaseConcurrencyLimit(key);
}
```

| Requests while a permit is active | Outcome |
| - | - |
| Two calls for `customer-1` | Both can acquire a slot. |
| A third call for `customer-1` | Returns `BUSY` without reading orders. |
| A call for `customer-2` | Uses its own capacity. |

The caller can report busy, retry explicitly, or schedule a Job.

## Ownership and lifetime

Release exactly once after successful admission, through the same runtime invocation. Do not release when admission returned `false`. For separate SDK requests, use the same explicit `leaseOwnerId` for acquisition and release; choose a unique owner for each execution.

The TTL is in seconds. Reusing an owner does not renew the lifetime; finish before expiry. This bounds concurrency while the permit is valid. It does not make business effects idempotent.

For a whole background Job, prefer its [managed concurrency policy](https://docs.revoengine.com/patterns/job-concurrency.md). For exact arguments, see [`api.concurrencyLimit()`](https://docs.revoengine.com/low-code/reference/api/concurrencyLimit) and [`api.releaseConcurrencyLimit()`](https://docs.revoengine.com/low-code/reference/api/releaseConcurrencyLimit).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.