--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To post to this group, send email to google-stackdr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/33728013-94d2-4f3d-85c3-7c8e064bb07e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Vaibhav,The Stackdriver Logging APIs require requests to be authenticated (OAuth2) and don't allow requests to be made with only an API key. The requesting user must be authorized with the appropriate Cloud IAM permissions (see here: https://cloud.google.com/logging/docs/access-control). Most Google Cloud APIs work this way, because they usually access or modify resources that are protected through IAM, and there's no "principal" to grant access to if the request only uses an API key.Can you describe a bit more about your use case, and why you're not able to provide a user or service account credential with the request?
On Fri, Sep 21, 2018 at 6:11 AM <vaibhav...@harness.io> wrote:
Hi,--I am trying to fetch stackdriver log entries using this REST API: https://logging.googleapis.com/v2/entries:list?key={MY_API_KEY}I have created an API Key as per the steps mentioned here and set API restrictions to Stackdriver API, Stackdriver Logging API and Stackdriver Monitoring API.Request Body:"resourceNames": ["projects/{MY_PROJECT}"]}Response:{"error": {"code": 403,"message": "The caller does not have permission","status": "PERMISSION_DENIED"}}What am I missing here? What do I need to modify to make this work?The API works via OAuth2.0, but not with the API Key. Please help me out.Note: My use-case requires me to use the REST APIs, and I cannot use the Service Account + SDK flow.
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdriver-discu...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-discussion+unsub...@googlegroups.com.
Marc, then what's the point of the API? I am looking to write an application that grabs the error logs (nightly). How will I do that without using the api key method?
Shuki
On Tuesday, September 25, 2018 at 8:05:46 PM UTC-7, Marc Unangst wrote:
Hi Vaibhav,The Stackdriver Logging APIs require requests to be authenticated (OAuth2) and don't allow requests to be made with only an API key. The requesting user must be authorized with the appropriate Cloud IAM permissions (see here: https://cloud.google.com/logging/docs/access-control). Most Google Cloud APIs work this way, because they usually access or modify resources that are protected through IAM, and there's no "principal" to grant access to if the request only uses an API key.Can you describe a bit more about your use case, and why you're not able to provide a user or service account credential with the request?
On Fri, Sep 21, 2018 at 6:11 AM <vaibhav...@harness.io> wrote:
Hi,--I am trying to fetch stackdriver log entries using this REST API: https://logging.googleapis.com/v2/entries:list?key={MY_API_KEY}I have created an API Key as per the steps mentioned here and set API restrictions to Stackdriver API, Stackdriver Logging API and Stackdriver Monitoring API.Request Body:"resourceNames": ["projects/{MY_PROJECT}"]}Response:{"error": {"code": 403,"message": "The caller does not have permission","status": "PERMISSION_DENIED"}}What am I missing here? What do I need to modify to make this work?The API works via OAuth2.0, but not with the API Key. Please help me out.Note: My use-case requires me to use the REST APIs, and I cannot use the Service Account + SDK flow.
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To post to this group, send email to google-stackdr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/33728013-94d2-4f3d-85c3-7c8e064bb07e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/48f094b3-ec05-4306-9bfd-d21e7e8e8cd4%40googlegroups.com.
--
© 2021 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/979601e7-3a41-48c0-9eb6-394a23f5d005n%40googlegroups.com.