question

Lily-9563 avatar image
0 Votes"
Lily-9563 asked MayankBargali-MSFT edited

Backend API is single URL with different methods

Hi experts,
I encounter a bunch of APIs like these and not sure what it the better way to map them to APIM.

Same url with different methods, and each of them have different parameters.

POST /customers
GET /customers
PUT /customers
DELETE /customers

136547-image.png

For above sample, it seems I can create 4 operations in APIM (create_customers, get_customers, update_customer, delete_customer)

But I'm not sure if this is a good practice for such scenario or any drawbacks will happen in the future.
Can you give me some hints ?

Thank you

azure-api-management
image.png (15.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT edited

@Lily-9563 It depends upon how you want to expose the API's to the end user/consumers. There are no drawbacks and you can create the Frontend as per your requirement.

In general for best pratices on designing any API you can refer to this document.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.