Skip to content

Possible invalid request generated by client #608

@littlebenlittle

Description

@littlebenlittle

It appears the client is generating an invalid request. I'm not sure if this is an issue with the client itself or with the endpoint. I have also opened a stackoverflow question.

Environment details

  • OS: Ubuntu 18.04
  • Python version: 3.6.7
  • pip version: pip3 9.0.1
  • google-api-python-client version: 1.7.4

Steps to reproduce

from apiclient.discovery import build

compute = build('compute', 'v1')
cmd = compute.instances().insert(
    project='my-project'
    zone='us-central1-c',
    body=config)
cmd.execute()

HttpError: <HttpError 400 when requesting https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-c/instances?alt=json
returned "Required field 'resource' not specified">

config is a json string conforming to the specification in the documentation.

Metadata

Metadata

Assignees

Labels

type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions