8000 The argument `authorization` in `create_authorization` needs to use a keyword · Issue #12 · influxdata/iot-api-python · GitHub
[go: up one dir, main page]

Skip to content
The argument authorization in create_authorization needs to use a keyword #12
Open
@karel-rehor

Description

@karel-rehor

In api/devices.py#162 the statement...

request = authorization_api.create_authorization(authorization)

should be

request = authorization_api.create_authorization(authorization=authorization)

This is related to.

Note that on clicking the Auth link in the flask UI, the tutorial application is now returning...

ApiException
influxdb_client.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.11', 'X-Platform-Error-Code': 'invalid', 'Date': 'Wed, 04 Dec 2024 13:04:14 GMT', 'Content-Length': '163'})
HTTP response body: {
	"code": "invalid",
	"message": "invalid json structure: json: cannot unmarshal object into Go struct field postAuthorizationRequest.orgID of type platform.ID"
}

The example here is causing confusion for some users.

I tried to push a branch with this change to create a PR, however I do not have write permissions to this repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0