(ratelimit)
from unkey_py import Unkey
with Unkey(
bearer_auth="UNKEY_ROOT_KEY",
) as s:
res = s.ratelimit.ratelimit_set_override(request={
"identifier": "user_123",
"limit": 10,
"duration": 60000,
"namespace_id": "rlns_1234",
"namespace_name": "email.outbound",
})
if res.object is not None:
# handle response
pass
models.RatelimitSetOverrideResponse
Error Type |
Status Code |
Content Type |
models.ErrBadRequest |
400 |
application/json |
models.ErrUnauthorized |
401 |
application/json |
models.ErrForbidden |
403 |
application/json |
models.ErrNotFound |
404 |
application/json |
models.ErrConflict |
409 |
application/json |
models.ErrTooManyRequests |
429 |
application/json |
models.ErrInternalServerError |
500 |
application/json |
models.SDKError |
4XX, 5XX |
*/* |
from unkey_py import Unkey
with Unkey(
bearer_auth="UNKEY_ROOT_KEY",
) as s:
res = s.ratelimit.list_overrides(namespace_id="rlns_1234", namespace_name="email.outbound", limit=100)
if res.object is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
namespace_id |
Optional[str] |
➖ |
N/A |
rlns_1234 |
namespace_name |
Optional[str] |
➖ |
N/A |
email.outbound |
limit |
Optional[int] |
➖ |
N/A |
100 |
cursor |
Optional[str] |
➖ |
N/A |
|
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.ListOverridesResponse
Error Type |
Status Code |
Content Type |
models.ErrBadRequest |
400 |
application/json |
models.ErrUnauthorized |
401 |
application/json |
models.ErrForbidden |
403 |
application/json |
models.ErrNotFound |
404 |
application/json |
models.ErrConflict |
409 |
application/json |
models.ErrTooManyRequests |
429 |
application/json |
models.ErrInternalServerError |
500 |
application/json |
models.SDKError |
4XX, 5XX |
*/* |
from unkey_py import Unkey
with Unkey(
bearer_auth="UNKEY_ROOT_KEY",
) as s:
res = s.ratelimit.get_override(identifier="user_123", namespace_id="rlns_1234", namespace_name="email.outbound")
if res.object is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
identifier |
str |
✔️ |
N/A |
user_123 |
namespace_id |
Optional[str] |
➖ |
N/A |
rlns_1234 |
namespace_name |
Optional[str] |
➖ |
N/A |
email.outbound |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.GetOverrideResponse
Error Type |
Status Code |
Content Type |
models.ErrBadRequest |
400 |
application/json |
models.ErrUnauthorized |
401 |
application/json |
models.ErrForbidden |
403 |
application/json |
models.ErrNotFound |
404 |
application/json |
models.ErrConflict |
409 |
application/json |
models.ErrTooManyRequests |
429 |
application/json |
models.ErrInternalServerError |
500 |
application/json |
models.SDKError |
4XX, 5XX |
*/* |