Hello,
When using the new means of defining an API as described here:
https://docs.dataminer.services/user-guide/Advanced_Modules/User%20Defined%20APIs/UD_APIs.html
Can I create 1 script that contains all the endpoints (methods) I need?
For example:
- GetData
- SetData
- ...
Yes you can.
In the same section of the docs you linked, you can find some examples (https://docs.dataminer.services/user-guide/Advanced_Modules/UserDefinedAPIs/Defining_an_API/UD_APIs_Examples.html).
For your case, you can add conditions to your script that check on the requestData.Route and the requestData.RequestMethod.
Do note that only GET, PUT, POST & DELETE are support currently for the RequestMethod.
Yes you can.
In the same section of the docs you linked, you can find some examples (https://docs.dataminer.services/user-guide/Advanced_Modules/UserDefinedAPIs/Defining_an_API/UD_APIs_Examples.html).
For your case, you can add conditions to your script that check on the requestData.Route and the requestData.RequestMethod.
Do note that only GET, PUT, POST & DELETE are support currently for the RequestMethod.