API Rate Limiting and Quotas: Reasonable Resource Utilization Print

  • 0

API Rate Limiting and Quotas: Reasonable Resource Utilization

To ensure the stability and fairness of our API services, DataiCloud implements rate limiting and quotas. Below is a detailed explanation of how these mechanisms work across various API endpoints, along with professional terminology and at least 20 specific examples.

Rate Limiting

Rate limiting restricts the number of requests a client can make to our APIs within a specified time window. This prevents abuse and ensures that all users have access to reliable service.

  1. User Authentication Endpoint (/api/auth/login)

    • Limit: 10 requests per minute
    • HTTP Status Code: 429 (Too Many Requests)
  2. Contact Creation Endpoint (/api/contacts)

    • Limit: 50 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  3. File Upload Endpoint (/api/files/upload)

    • Limit: 20 requests per 10 minutes
    • HTTP Status Code: 429 (Too Many Requests)
  4. Folder Creation Endpoint (/api/folders)

    • Limit: 30 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  5. Search Contacts Endpoint (/api/contacts/search)

    • Limit: 60 requests per minute
    • HTTP Status Code: 429 (Too Many Requests)
  6. File Download Endpoint (/api/files/{id}/download)

    • Limit: 100 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  7. Share File Endpoint (/api/files/{id}/share)

    • Limit: 40 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  8. Update Contact Endpoint (/api/contacts/{id})

    • Limit: 50 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  9. Delete File Endpoint (/api/files/{id})

    • Limit: 30 requests per 10 minutes
    • HTTP Status Code: 429 (Too Many Requests)
  10. Move File/Folder Endpoint (/api/items/{id}/move)

    • Limit: 20 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  11. Copy File/Folder Endpoint (/api/items/{id}/copy)

    • Limit: 20 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  12. List Contacts Endpoint (/api/contacts)

    • Limit: 80 requests per minute
    • HTTP Status Code: 429 (Too Many Requests)
  13. List Files Endpoint (/api/files)

    • Limit: 60 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  14. Rename Folder Endpoint (/api/folders/{id}/rename)

    • Limit: 30 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  15. Set Permissions Endpoint (/api/items/{id}/permissions)

    • Limit: 25 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  16. Generate Access Token Endpoint (/api/auth/token)

    • Limit: 20 requests per minute
    • HTTP Status Code: 429 (Too Many Requests)
  17. Refresh Access Token Endpoint (/api/auth/token/refresh)

    • Limit: 10 requests per minute
    • HTTP Status Code: 429 (Too Many Requests)
  18. Invalidate Access Token Endpoint (/api/auth/token/invalidate)

    • Limit: 5 requests per minute
    • HTTP Status Code: 429 (Too Many Requests)
  19. Usage Statistics Endpoint (/api/usage)

    • Limit: 40 requests per hour
    • HTTP Status Code: 429 (Too Many Requests)
  20. API Health Check Endpoint (/api/health)

    • Limit: Unlimited (essential for service monitoring)
    • HTTP Status Code: 200 (OK)

Quotas

Quotas define the maximum amount of resources a user can consume within a given period. Once a quota is exceeded, further requests may be rejected or throttled.

  • Daily API Call Quota: 10,000 requests per user
  • Monthly Data Transfer Quota: 100 GB per user
  • Storage Quota: 500 GB per user

Handling Rate Limits and Quotas

When a rate limit is exceeded, the API will return an HTTP 429 status code with a Retry-After header indicating the minimum time the client should wait before making another request. It is essential to implement proper error handling and backoff strategies in your application to gracefully manage rate limits.

Quotas are reviewed periodically and can be adjusted based on user needs and system capacity. Users can monitor their quota usage through the Usage Statistics Endpoint.

By adhering to these rate limits and quotas, you ensure fair resource allocation and maintain the reliability of our API services for all users.


Was this answer helpful?

« Back