11-03-2016 07:17 AM - edited 03-01-2019 04:33 AM
Hi
The first attached image below shows the GET /discovery/{id}/network-device API. It is documented as taking an id, which is the id of the discovery job.
The second attached image below shows the argument fields for the API. That seems to imply that the API takes a taskId and a discovery id. That is probably so that one can see which devices were discovered for a given invocation of the discovery job. That is potentially quite useful, but it is not clear, from the documentation, how that would actually work. Specifically, where does the taskId go? It is not documented as appearing in the URL, and, as this is a GET, there is no body.
Any ideas please?
Many thanks
Nathan
11-03-2016 07:23 AM
I have not yet upgraded to 1.3, but typically these parameters are passed as query args to the URL. If you open your browser's developer console and look at the network tab you should see exactly how the API is called. taskId may be passed after the '?'.
11-03-2016 08:20 AM
Thank Joe.
It is used in the form of a filter parameter then.
The idea of using the developer tools in the browser is a good one. I have done that for other APIs. I suspect that this API form is being used, then, in web UI when one gets the devices for the results of a specific discovery invocation.
Regards
Nathan
11-03-2016 08:27 AM
I understand how it is displayed. I think if you fill in SOME value and hit "Try it out" you'll see how the request is sent to the server in the developer console (Network tab). That will show how you can make that call from scripts or Postman.
11-03-2016 09:17 AM
Also, the "Parameter Type" column tells you if it is a path or query parameter.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide