Hi Dojo,
When configuring User-Defined APIs, will I be able to leverage this custom API outside my DataMiner network in case my system is cloud connected?
And if so, is there anything special I need to take into account? Or can I simply configure the authentication tokens and get going?
Sub question: Is there a way to configure certain user-defined-APIs to be only available locally instead of being reachable over dataminer.services?
Thanks!
Hi Thijs, you are able to call your user defined API through dataminer.services. To do this you just need to replace the local hostname of your DataMiner agent, with the hostname provided by dataminer.services (<DMS>-<ORG>.on.dataminer.services). You can find this URL on the overview page of your DMS in the admin app.
There is currently no way to limit external access to a certain API. A person with a valid authentication token will be able to access the API directly or through dataminer.services.
I do not know if this is possible but you could check the hostname of the request and block the call that way. Do not know if this works but might be worth it to try this out.
Thanks Baptiste!
Then we’ll go ahead with smartly configuring the authentication tokens. I also saw that we can use the “API Trigger Context” in our script, where we can log from which token the request comes in, or add some additional custom logic around that. Thanks again!
(https://docs.dataminer.services/user-guide/Advanced_Modules/User-Defined_APIs/Defining_an_API/UD_APIs_Defining_a_new_API.html#apitriggercontext)