This message was deleted.
# caching
s
This message was deleted.
f
You need to call GetBuilds to get all your builds, and assuming they are all Gradle, you need to call GetGradleBuildCachePerformance on each of them. You’ll then have access, for each task in the
taskExecution
array, to
avoidanceOutcome
. The ones coming from a remote cache hit will have outcome
avoided_from_remote_cache
. This will allow to compute the remote cache hit ratio for that build. Is it what you’re looking for?
j
ty, just to double check - this is for enterprise API, not data_export? (I don’t have a preference, didn’t use any of them before)
f
yes, the Gradle Enterprise API. Doable but more involved with the export API
j
no, worries, I’ll go with enterprise api, looks easier to use anyway thanks to openapi
I’ve played around with generating a python client via openapi-generator…. and looked like it generated some nonsense… idk whether it’s the generator or the api spec, I suspect the generator, posting to maybe get more opinions curling the api works just fine when I try to call via generated openapi client, the urls for simple get builds call looks like
api/builds?buildsQuery={since=abc,maxbuilds=xyz…all the other fields go here, even those that had no values set}
instead of simple
builds?since=abc&maxBuilds=xyz
and that gets an empty builds list response… also the generated client insists on passing access_token to it’s constructor, which is not a valid parameter for the constructor… but like I said it could be the spec it could be the generator, it could be both, not familiar with open api spec enough to tell.