Sharan
Sharan

Reputation: 371

Spring boot API end point issue

we had an api with the URL as below, which was accepting a rsqlFilter.

{api_version}/public/forms/{formId}/documents

then, there was requirement to change it to Odata filter, so we wrote one more api, but this time we kept the api_version hardcoded as v3 instead of accepting it in a path param, as belo.

v3/public/forms/{formId}/documents

now we have both the apis.

accessing to v3 API is always giving bad request 400 and not hitting api at all.

may I know what is the reason here.

Upvotes: 0

Views: 36

Answers (1)

Gopi krishna
Gopi krishna

Reputation: 355

If you have apiend points :

  1. {api_version}/public/forms/{formId}/documents
  2. v3/public/forms/{formId}/documents

The reason might be, you can see that both end points are similar , if you try with second end point and in your controller if you have the second end point written after first end point. It will hit first end point.

If you are getting 404 error then please try to put some code in the question.

Upvotes: 1

Related Questions