Explanation of "imgixCalls" in Usage dashboard + log of API calls

Hi there!

We've had a number of our Prismic projects flagged for their API usage exceeding the new limits. We've spent some time over the last few weeks refactoring the way these projects work to reduce the number of API calls, and attempting to cache some of the more static data that we store in Prismic.

I've got 2 questions I'm hoping to get answered:

  1. How are the "Asset" API calls calculated? When looking at the "Usage Dashboard" in prismic, and the underlying requests, I can see a field called "imgixCalls". This number appears to match up with our "Asset" API calls total. I'm curious how this is being calculated, and what constitutes an "Asset" call against the API. I wouldn't expect images uploaded to Prismic, and then eventually downloaded to the client's browser, to be counted as an API call, but it appears that they are.

  2. We've implemented logging on one of our projects that records every request to Prismic's document API. We're finding that the daily totals on the "Usage Dashboard" are 5x - 10x higher than the actually number of requests that we're making. Is it possible to get a log of a 24-hour period from Prismic with all the recorded calls against the API so that we can find out why these numbers are so vastly different?

Thanks.

2 Likes

Just wanted to add another question here:

Why do some of the images uploaded to Prismic generate urls with "https://images.prismic.io/repository-name" and some with "https://repository-name.cdn.prismic.io"? And are these counted the same in our Usage Dashboard?

Hey @chris.hunt,

Thanks for your patience. Just an update to let you know I'm looking into this.

Sam

Hi Chris,

I got some answers for you. Any request to our Imgix server is a call to the Asset API. So any time you request a PNG or a JPEG, you're making a call to the asset API, which counts towards your total API usage.

Some file formats are not served by Imgix, like SVGs. These count toward the content API total that you see.

I can't fetch the usage data for you myself, but if you submit a request in our help portal our support team can direct your request to our infrastructure team:

Sam