cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
929
Views
10
Helpful
4
Replies

GET /discovery/{id}/network-device API arguments

Nathan Sowatskey
Cisco Employee
Cisco Employee

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.

Screen Shot 2016-11-03 at 15.09.38.png

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.

Screen Shot 2016-11-03 at 15.10.44.png

Any ideas please?

Many thanks

Nathan

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

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 '?'.

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

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.

Also, the "Parameter Type" column tells you if it is a path or query parameter.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community