Skip to main content
POST
/
api
/
v2
/
concurrency_limits
/
increment-with-lease
Bulk Increment Active Slots With Lease
curl --request POST \
  --url https://api.example.com/api/v2/concurrency_limits/increment-with-lease \
  --header 'Content-Type: application/json' \
  --data '
{
  "slots": 123,
  "names": [
    "<string>"
  ],
  "mode": "concurrency",
  "lease_duration": 300,
  "holder": {
    "type": "flow_run",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}
'
{
  "lease_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "limits": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "limit": 123
    }
  ]
}

Headers

x-prefect-api-version
string

Body

application/json
slots
integer
required
names
string[]
required
mode
enum<string>
default:concurrency
Available options:
concurrency,
rate_limit
lease_duration
number
default:300

The duration of the lease in seconds.

Required range: 60 <= x <= 86400
holder
ConcurrencyLeaseHolder · object

The holder of the lease with type (flow_run, task_run, or deployment) and id.

Response

Successful Response

lease_id
string<uuid>
required
limits
MinimalConcurrencyLimitResponse · object[]
required