Announcements

Help us improve the Equinix Community by completing a quick survey

Discussions

Unable to filter using "dateRange" for OrderHistory_v1

Unable to filter using "dateRange" for OrderHistory_v1

API_User
Level 9

When filtering with dateRange on the OrderHistory_v1 API i get a statusCode 400 returned. Other filters work fine for me and return expected results
I am using the following payload

{
    "filters": {
        "dateRange": [
            "PAST_7_DAYS"
        ]
    }
}

The errors I receive are:

code: "EQX-171-1212"
path: "/filters/dateRange"
message: "instance value (%s) not found in enum (possible values: %s) PAST_7_DAYS"

Thank you in advance

Reply 1 1

API_User
Level 9

Hi there,

The dateRange values has to be passed as a key-value string instead as an array.

{
    "filters": {
        "dateRange": "PAST_7_DAYS"
    }
}

Hope this helps!