Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API - ratelimit #4

Open
pantunes87 opened this issue Dec 9, 2021 · 2 comments
Open

API - ratelimit #4

pantunes87 opened this issue Dec 9, 2021 · 2 comments

Comments

@pantunes87
Copy link

Hi all. I’m trying to create/change the rate limit through API, and the log seems ok but the rate limit change to disable.. example before and after:

BEFORE:

curl -s -X ‘GET’ ‘https://mail.domain.com/api/v1/get/rl-mbox/user1%40domain.com’ -H ‘accept: application/json’ -H ‘X-API-Key: XXXXXXXXXXX | jq ’.'
{
“value”: “10”,
“frame”: “s”

CHANGING:

curl -s -X ‘POST’ ‘https://mail.domain.com/api/v1/edit/rl-mbox/’ -H ‘accept: application/json’ -H ‘Content-Type: application/json’ -H ‘X-API-Key: XXXXXXXXXXXXXX’ -d '{
“attr”: {
“rl_vlaue”: “30”,
“rl_frame”: “m”
},
“items”: [
[email protected]
]
}‘ | jq ’.'
[
{
“type”: “success”,
“log”: [
“ratelimit”,
“edit”,
“mailbox”,
{
“object”: [
[email protected]
],
“rl_vlaue”: “30”,
“rl_frame”: “m”
}
],
“msg”: [
“rl_saved”,
[email protected]
]
}
]

AFTER:

curl -s -X ‘GET’ ‘https://mail.domain.com/api/v1/get/rl-mbox/mail.domain.com%40domain.com’ -H ‘accept: application/json’ -H ‘X-API-Key: XXXXXXXX’ | jq ‘.’

@itkfm
Copy link

itkfm commented Jan 25, 2024

Seems like the suggested fix from https://community.mailcow.email/d/478-mailcow-api-edit-mailbox-ratelimits hasn’t been incorporated yet.

@itkfm
Copy link

itkfm commented Jan 25, 2024

The request body should be an object, not an array of objects.
rl_vlaue should be rl_value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants