The resource API is not returning certain files, what do I do? |
Let’s say you are looking for resource data on all files with a particular domain (sports.com in this example). You know that there should be 12,000+ files, but the resource API is only returning about 200 files, and you have already increased the “limit” parameter. Here’s an example API request:
{"site":"demosports","start":1669183200,"end":1669186800,"dataType":"rum","dataColumns":
["duration","elementCount","startTime"],"group":
["file","domain"],"domain":["sports.com"],"order":"elementCount","sort":"desc","limit":"50000","avgType":"arithmetic","
botTraffic":"excludeBots"}
This is because the resource endpoint has a parameter called “minSample” that requires files to have a certain minimum elementCount in order to be included in the results. The default minSample value is 100, so anything with an elementCount lower than 100 does not get returned. We can add the minSample parameter and set it lower (to 1 for example) to see additional files:
{"site":"demosports","start":1669183200,"end":1669186800,"dataType":"rum","dataColumns":
["duration","elementCount","startTime"],"group":
["file","domain"],"domain":["sports.com"],"order":"elementCount","sort":"desc","limit":"50000","avgType":"arithmetic","
botTraffic":"excludeBots","minSample":100}
Additional information can be found in the Resource endpoint documentation page.