Hi community,
in order to follow best practises for RESTful API I would like to use Singletons
like /customers/{customerId} and potentially some subcollections / multiple level Sigletons like /customers/{customerId}/accounts/{accountId}
Is there any way to configure the User Defined API Routes to work like this?
Hi Felix,
Having dynamic routes where part of the route would be captured in some kind of variable is currently not supported. This has, however, already been recognized as an important feature, and there is a feature task for this near the top of the User-Defined APIs backlog. I currently have no info on when it would be available, though.

Create an dataminer api endpoint on /customers/
and use that script to determinate the path:
https://docs.dataminer.services/dataminer/Functions/User-Defined_APIs/Defining_an_API/UD_APIs_Examples.html#using-the-requestmethod-and-route
public ApiTriggerOutput OnApiTrigger(IEngine engine, ApiTriggerInput requestData) { switch(requestData.Route) { case"chains/change-status": return HandleStateChangeRequest(requestData); case "chains/status": return HandleStateRetrievalRequests(requestData); }

Hi Gerwin,
I tried it but for me it ends up with:
"detail": "Route could not be found.",
"errorCode": 5,
when I add a /something to …/customers in Postman.
With just …/customers it works fine.
I tried it with an …/customers endpoint, as I was not able to create an …/customers/ enpoint because the DMA does not allow to end with a slash

HM indeed it does, seems like an feature suggestion to me: https://community.dataminer.services/feature-suggestions/
Hi Thomas,
good to know it's already on the backlog.
Thanks,
Felix