You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Rate Limits during Client Key Creation #12657
Currently, you can Update a client key with a rate limit via the API. I'm hoping there will be a way to set the rate limit at key creation as well. As far as I'm aware (tested using cURL) this doesn't currently work.
Motivation
Hopefully a minor change. This will make it easier for us to set up new projects via the API / terraform.
export TOKEN=
export SENTRY_ORGANIZATION_ID=
export SENTRY_PROJECT_ID=
# Create a new Client Key with a ratelimit block in the request
curl -X POST -d '{"name": "Test RateLimit", "rateLimit": { "count": 1000, "window": 86400 }}' -vvv -H 'Content-Type: application/json' -H "Authorization: Bearer ${TOKEN}" https://sentry.io/api/0/projects/${SENTRY_ORGANIZATION_ID}/${SENTRY_PROJECT_ID}/keys/
# Verify that there is no ratelimit set
curl -vvv -H "Authorization: Bearer ${TOKEN}" "https://sentry.io/api/0/projects/${SENTRY_ORGANIZATION_ID}/${SENTRY_PROJECT_ID}/keys/"
I'm trying to manage Client Keys via Terraform. I've worked around the issue with a small hack. If I find time, I'll look into adding support for this myself. Hack required to get rate limits on key creation
Activity