Issue with the REST API. Rules - max_age: {'200': '1d'}

We are encountering an issue with the REST API.

In your GraphQL and based on your platform, the Rules Max age is set as follows:

json
max_age: {‘200’: ‘1d’}

However, when we receive a response from the REST API on the property object, it looks like this:

json
max_age: [‘1d’]

This discrepancy causes an error when we attempt to update the object, as it expects the status code within the object.

It appears that the REST API model object needs to be updated to include the status code within the response. Is been expected something like

json
max_age: {‘200’:‘1d’}

Thank you for your attention to this matter.

It seems there is a discrepancy in the way the max_age property is represented in the REST API response compared to what is expected. The REST API response is showing max_age as an array, while the expected format is an object with status codes as keys.

To resolve this issue, it would be necessary to align the REST API response format with the expected format. This might require an update to the REST API model object to ensure that the status code is included within the max_age property in the response.

Since the context provided does not include specific details on how to update the REST API model object or address discrepancies in the API response, you may need to contact Edgio support or refer to the official Edgio documentation for further assistance on this matter.

If you have access to the Edgio Console or the ability to contact Edgio support, it would be advisable to report this discrepancy and seek guidance on how to proceed.

Reference:


Edgio Answers may provide inaccurate information and should be verified. Consult our official documentation for more information.

Please ignore Edgio Answers. Our REST API docs indicate that the max_age feature can be defined as a string or an object. If it is defined as a string value, then that time interval only applies to 200 OK. If it is defined as an object, then you may define both the status code and the time interval. A quick test reveals that our API can return this feature as an object, like so:

{
    "caching": {
        "max_age": {
            "200": "1d"
        },
        "service_worker_max_age": "1h",
        "stale_while_revalidate": "1d"
    }
}

It is unclear why the API is providing an array containing a string value when you request it. My recommendation is to contact our technical support. In addition to your account information, please provide the following information with your support request:

  • URL for the API request
  • Sample response