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
…
}
(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
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.
Parameter | Description | Sample values |
---|---|---|
X-RateLimit-Limit-day | Number of calls per day | 975000 |
X-RateLimit-Limit-second | Number of calls per second | 70 |
X-RateLimit-Remaining-credits-minute | Remaining credits per minute | 39999818 |
X-RateLimit-Remaining-day | Remaining calls per day | 9998 |
X-RateLimit-Remaining-second | Remaining calls per second | 9 |