POST
/
api
/
v2
/
concurrency_limits
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z",
  "active": true,
  "name": "<string>",
  "limit": 123,
  "active_slots": 0,
  "denied_slots": 0,
  "slot_decay_per_second": 0,
  "avg_slot_occupancy_seconds": 2
}

Headers

x-prefect-api-version
string

Body

application/json

Data used by the Prefect REST API to create a v2 concurrency limit.

name
string
required

The name of the concurrency limit.

limit
integer
required

The concurrency limit.

Required range: x > 0
active
boolean
default:
true

Whether the concurrency limit is active.

active_slots
integer
default:
0

The number of active slots.

Required range: x > 0
denied_slots
integer
default:
0

The number of denied slots.

Required range: x > 0
slot_decay_per_second
number
default:
0

The decay rate for active slots when used as a rate limit.

Required range: x > 0

Response

201
application/json
Successful Response

An ORM representation of a v2 concurrency limit.

id
string
required
created
string | null
required
updated
string | null
required
name
string
required

The name of the concurrency limit.

limit
integer
required

The concurrency limit.

active
boolean
default:
true

Whether the concurrency limit is active.

active_slots
integer
default:
0

The number of active slots.

denied_slots
integer
default:
0

The number of denied slots.

slot_decay_per_second
number
default:
0

The decay rate for active slots when used as a rate limit.

avg_slot_occupancy_seconds
number
default:
2

The average amount of time a slot is occupied.