As Jira administrator I would like to manage rate limiting configuration through REST API

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Rate Limiting
    • None
    • 1
    • 3

      Problem Definition

      As an administrator there are some configuration that we would like to conduct through the REST API instead of going through the web-based UI.
      Currently we don't have a set of supported REST API methods to manage Rate Limiting configuration.

      Suggested Solution

      Make public, supported rate limiting REST API methods available.

      Workaround

      Use the internal (unsupported) rate limiting REST API methods.
      You can verify the internal APIs by installing the Atlassian REST API Browser in a lower environment.


      Here are some examples of usage:

      • Get current configuration.
        JIRA_BASE_URL=https://jira.pawtucketbrewery.com
        JIRA_ADMIN_PAT='My+PAT'
        curl -v -k -L -XGET \
          -H 'Accept: application/json' \
          -H "Authorization: Bearer ${JIRA_ADMIN_PAT}" \
          ${JIRA_BASE_URL}'/rest/rate-limiting/latest/admin/rate-limit/settings/'
        
      • Enable rate limiting.
        JIRA_BASE_URL=https://jira.pawtucketbrewery.com
        JIRA_ADMIN_PAT='My+PAT'
        curl -v -k -L -XPUT \
          -H 'Content-Type: application/json' \
          -H "Authorization: Bearer ${JIRA_ADMIN_PAT}" \
          ${JIRA_BASE_URL}'/rest/rate-limiting/latest/admin/rate-limit/settings/' \
          -d '{"mode":"ON","defaultCapacity":"20","defaultFillRate":"10","defaultIntervalFrequency":1,"defaultIntervalTimeUnit":"SECONDS"}'
        
        • Make sure to change the attributes as desired.
      • Disable rate limiting.
        JIRA_BASE_URL=https://jira.pawtucketbrewery.com
        JIRA_ADMIN_PAT='My+PAT'
        curl -v -k -L -XPUT \
          -H 'Content-Type: application/json' \
          -H "Authorization: Bearer ${JIRA_ADMIN_PAT}" \
          ${JIRA_BASE_URL}'/rest/rate-limiting/latest/admin/rate-limit/settings/' \
          -d '{"mode":"OFF","defaultCapacity":"1","defaultFillRate":"1","defaultIntervalFrequency":1,"defaultIntervalTimeUnit":"SECONDS"}'
        

      Note that internal APIs are prone to change on any version upgrade.

            Assignee:
            Unassigned
            Reporter:
            Thiago Masutti (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: