Rate Limiting not Working when be Applied to Multiple Policies

Hi @byu,

We’ve reproduced this and we find it’s because of the missing “id” field in your policies setting. There should be an id field and this should be the same name/reference as the policy. i.e your policy file should be

{
    "alpha-api": {
        "access_rights": {
            "apple-api": {
                "allowed_urls": [],
                "api_id": "alpha-api",
                "api_name": "alpha-api",
                "versions": [
                    "Default"
                ]
            }
        },
        "active": true,
        "name": "Default policy for alpha-api",
        "id": "alpha-api",
        "org_id": "1",
        "per": 60,
        "rate": 300,
        "state": "active"
    },
    "beta-api": {
        "access_rights": {
            "beta-api": {
                "allowed_urls": [],
                "api_id": "beta-api",
                "api_name": "beta-api",
                "versions": [
                    "Default"
                ]
            }
        },
        "active": true,
        "name": "Default policy for beta-api",
        "id": "beta-api",
        "org_id": "1",
        "per": 60,
        "rate": 300,
        "state": "active"
    }
}

Still worth checking the apple-api in your access rights section.

Hope this helps.

1 Like