429 response not defined

Description

One or more operations in your API are missing 429 responses. All operations should have 429 responses defined.

Example

The following is an example of how this issue could look in  your API definition:

"responses": {
   "200": {
    "description": "pet response",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "Pet.json"
        }
      }
    }
}

Possible exploit scenario

Attackers strive to make your APIs behave in an unexpected way to learn more about your system or to cause a data breach. We highly recommend that you minimize any risks and clearly specify the data that your API operations can return for each possible response code.

Remediation

Define 429 responses for all operations.

"responses": {
   "200": {
    "description": "pet response",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "Pet.json"
        }
      }
    }
  ...
 "429": {
    "description": "Too many requests"
}

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy