Skip to content

Validation error on boolean fields (slos.create) #76

@angrykirc

Description

@angrykirc

Describe the bug
Dynatrace expects boolean fields in JSON notation (lowercase, true or false), yet they are sent to Dynatrace in Pythonic notation (True or False) when using slos.create method.

To Reproduce
dt.slos.create(name="abc", target=98, warning=99, timeframe="-24h", use_rate_metric=False, enabled=True [...])
Dynatrace will throw a validation error on the enabled and useRateMetric fields.

Additional context
There is a workaround for this bug - by replacing boolean values with lowercase strings (e.g. enabled="false"), they are not manually converted and so the request will succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions