urig
urig

Reputation: 16831

"400: Unsupported service specified, INVALID_ARGUMENT" from Google Cloud Logging API

I am trying to manually write a log entry using Google Cloud Logging API.

Before doing this via code, I am first trying to do it using the Google APIs Explorer. Here is a screen shot of the request I've built using this tool:

Screenshot

When I execute this request, I get the following response:

{
  "error": 
  {
    "code": 400,
    "message": "Unsupported service specified",
    "status": "INVALID_ARGUMENT"
  }
}

Why? and how can I fix this?

Upvotes: 1

Views: 755

Answers (1)

urig
urig

Reputation: 16831

The error message was actually telling me exactly which argument was invalid - The serviceName I supplied was bogus ("test").

As soon as I set the serviceName to be "compute.googleapis.com", the problem went away and I received a 200 status code indicating success.

Upvotes: 1

Related Questions