Restrictions and limits

There is a limit to the number of API calls an app can make within a given time period:

  • Up to 70 requests per second

  • Up to 975,000 requests per 24-hour period

When this limit is exceeded, the app or user may be throttled. API requests made by a throttled user or app will fail. However, these are not hard limits: Medallia limits the number of API calls per company to prevent unintended bugs in API client code or malicious code from taking down production systems.

Additionally, Query API calls have a cost: all API requests are subject to cost limits, and are throttled once the following limits are reached:

  • 3,000,000 cost units per query

Cost is a measurement representing how much the query will impact the system. The higher the cost, the greater the impact, which can result in slowing the performance of reports and other activities. When the cost is too high, the system automatically rejects the query. For more details on how to track query cost, see Response headers.

When queries fetch Feedback and Invitations data, the cost is primarily impacted by the page size — the value of the first parameter — and the number of fields in the query: the cost of the query increases with the size of the page and the number of fields queried. See Pagination and Data queries for information about page sizes and data sources.

Use the cost calculation as a heuristic to improve and optimize queries, and to avoid exceeding the limit.

query getData{
    …
    rateLimit{ cost }           # Query cost
    …
}
Important: To calculate the cost of a query, without executing the query — thereby incurring a cost against your quota — include (compute_cost_only=true) as a URI query parameter. Then only the cost of the query is returned instead of including the results of the query.
https://example.apis.medallia.com/data/v0/query?compute_cost_only=true
Important: The timeout for a query has been set to 90 seconds. The API Gateway will discard any request that takes longer than that.

Sample query with cost calculation

query myQueryName {
  rateLimit {
    cost
  }
  feedback (
    orderBy: {fieldId: "a_surveyid", direction: ASC}
    first: 3
  ){
    nodes {
      surveyId: id
      user_email: fieldData(fieldId: "e_email") {
        values
      }
    }
    totalCount
  }
}

Sample response

{
  "data": {
    "rateLimit": {
      "cost": 14
    },
    "feedback": {
      "nodes": [
        {
          "surveyId": "3725",
          "user_email": {
            "values": [
              "jeremy.pierce@customer.example.com"
            ]
          }
        },
        {
          "surveyId": "3726",
          "user_email": {
            "values": [
              "matthew.gibson@customer.example.com"
            ]
          }
        },
        {
          "surveyId": "3727",
          "user_email": {
            "values": [
              "teresa.stevens@customer.example.com"
            ]
          }
        }
      ],
      "totalCount": 98135
    }
  },
  "errors": null,
  "_links": null,
  "_allowed": [
    "POST",
    "GET"
  ]
}

Response headers

The API will return these HTTP headers which can be used to track rate limits.

Warning: The headers listed below are deprecated and will be sunset in a future release. For information about the current Query API headers used to track rate limits, see API HTTP response headers.
ParameterDescriptionSample values
X-RateLimit-Limit-dayNumber of calls per day975000
X-RateLimit-Limit-secondNumber of calls per second70
X-RateLimit-Remaining-credits-minuteRemaining credits per minute39999818
X-RateLimit-Remaining-dayRemaining calls per day9998
X-RateLimit-Remaining-secondRemaining calls per second9