Get build cache statistics of a CI runner pool
GET
/api/v3/organizations/{organisation}/resources/{resource}/cache/stats
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/resources/cr-0123456789abcdef/cache/stats?days=7';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/resources/cr-0123456789abcdef/cache/stats?days=7' \ --header 'Authorization: Bearer <token>'Sums of the pool’s build cache hits, misses, saves and bytes over the last days days. hitRate is hits / (hits + misses), or null when both are 0.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organisation
required
string
The organisation ID
Example
test-orgresource
required
string
The CI runner pool resource ID
Example
cr-0123456789abcdefQuery Parameters
Section titled “Query Parameters”days
integer
Responses
Section titled “Responses”The statistics
Media typeapplication/json
CI build cache statistics
object
days
required
integer
hits
required
Cache lookups that found an entry.
number format: double
misses
required
Cache lookups that found no entry.
number format: double
saves
required
Entries saved.
number format: double
bytesIn
required
Bytes saved to the cache.
number format: double
bytesOut
required
Bytes restored from the cache.
number format: double
hitRate
required
Hits / (hits + misses); null when both are 0.
number format: double
Examplegenerated
{ "days": 1, "hits": 1, "misses": 1, "saves": 1, "bytesIn": 1, "bytesOut": 1, "hitRate": 1}The platform refused the request
Cloud access required
Resource not found, the resource is not a CI runner pool, or the organisation does not have CI runners
Days is not an integer from 1 to 30
The build cache service is unavailable
