Hello guys,
I noticed that for some API endpoints, the URL path is : https://chronicle.googleapis.com/v1alpha/{api_version}/projects/{project_id}/locations/{region}/instances/{instance} (instances.get), but I could not figure out what the api_version parameter is supposed to be. I tried to simply ignore it but the URL is then invalid (HTTP 404).
For reference, the vast majority of the API endpoints I used yet have a path like so : https://chronicle.googleapis.com/v1alpha/projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors (ruleExecutionErrors.list). The api_version parameter is not present in those.
What should I put for api_version in the URL path ? If this variable can change through time, how can I get the correct/current value for it ?
Regards
Solved! Go to Solution.
The doc here is basically listing api_version twice. The current API version is "v1alpha", and this will hopefully soon be released as just "v1", though the v1alpha route will still work.
Sharing some auth info, since that can be unclear as well:
Here is an example auth flow for an API with a JSON Key: https://gist.github.com/emeryray2002/428d9f07e66be2cc817b73e26e78442b
Here is an example auth flow with the GCP Application Default Credential (service account/user identity via gcloud cli): https://gist.github.com/emeryray2002/9794164d69d7df83a75b4e63dfa13aab