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?
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); }


HM indeed it does, seems like an feature suggestion to me: https://community.dataminer.services/feature-suggestions/
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