SAP Knowledge Base Article - Public

3419308 - Get the response status "405 Method Not Allowed" when querying an OData API

Symptom

The status "405 Method Not Allowed" was received when making a query to an OData API. In addition, the response body could also display: The specified HTTP method is not allowed for the resource identified by the Data Service Request URI. 

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Query an OData API with the OPTIONS or HEAD method.
  2. The response status is "405 Method Not Allowed".
  3. Meanwhile, the response body is empty or "The specified HTTP method is not allowed for the resource identified by the Data Service Request URI".

Cause

OData API does not support the OPTIONS and HEAD methods.

Resolution

Please do not send the OPTIONS or HEAD request to the OData service. If it's required to send such a preflight request to the OData service, please use a GET request to achieve it.

See Also

  1. 2325562 - Frequently Asked Questions on C4C OData Services
  2. 3220792 - HTML Status Codes

Keywords

OData, OData API, OPTIONS, HEAD, 405, 405 Method Not Allowed , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer core applications all versions