I want the user to input parameter data via the url instead of a Json file, do you have documentation guide on how I can I can achieve that?
Christine Kapembe [SLC] [DevOps Member] Selected answer as best 8th February 2024
Hey Christine,
It is possible to also pass information to the API script using query parameters. (From DataMiner 10.4.1) You can find more info here: https://docs.dataminer.services/user-guide/Advanced_Modules/User-Defined_APIs/Defining_an_API/UD_APIs_Defining_a_new_API.html#user-input-data
E.g.: http://staging-agent-b3/api/custom/switchers/status?location=belgium&rack=A3
This will allow you to retrieve the value for ‘location’ and ‘rack’ inside your API script.
Christine Kapembe [SLC] [DevOps Member] Selected answer as best 8th February 2024