REST API question

92 views
Skip to first unread message

rossm...@gmail.com

unread,
Dec 5, 2018, 4:33:25 PM12/5/18
to NetBox
Good evening

I don't really know anything about this topic but I would like to ask the following.

Would it be possible to use the REST API in VMware 6.5 to export its data and then it import into Netbox via its REST API?

Presumably I would need some sort of intermediate application to convert the data?

Is this possible or am I talking rubbish?

The goal is to import all the VMs from our VMware estate into Netbox without relying on slow manual, error prone processes.

Thanks

Ross 

Jeremy Stretch

unread,
Dec 5, 2018, 5:01:41 PM12/5/18
to Ross Moutell, NetBox
REST is just a loose protocol governing the representation and exchange of data between client and server; it doesn't provide any logic concerning the data itself. You would need to implement an intermediary process to convert the relevant data from the VMware API to the format NetBox expects to receive. Unfortunately I'm not familiar with VMware's API so I can't offer an estimate of difficulty; maybe someone else can.

Jeremy


--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/354900e6-11d1-496c-a019-9a5af73dae41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Candler

unread,
Dec 6, 2018, 4:55:51 PM12/6/18
to NetBox

Luis N

unread,
Dec 10, 2018, 4:13:38 PM12/10/18
to b.ca...@pobox.com, NetBox
Had issues testing the sync tool w a dev env running 2.4.9 netbox and had issues w/ a field that was null . tried upgrading to 2.5.0 and more issues. has anyone tried or updated it? noticed the github project was closed
ex: 
noticed this isnt formated correctly anymore,

                        "custom_fields":  "@{vcenter_persistent_id=}",



another error coming from above

TerminatingError(Write-Warning): "A positional parameter cannot be found that accepts argument 'System.Object[]'."
Write-Warning : A positional parameter cannot be found that accepts argument 'System.Object[]'.
At line:148 char:21
+ ...             Write-Warning -Message [String]::Format("{0} has {1} entr ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Write-Warning], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.WriteWarningCommand
Write-Warning : A positional parameter cannot be found that accepts argument 'System.Object[]'.
At line:148 char:21
+ ...             Write-Warning -Message [String]::Format("{0} has {1} entr ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Write-Warning], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.WriteWarningCommand

>> TerminatingError(Invoke-RestMethod): "

    Server Error

                            Server Error

                                There was a problem with your request. Please contact an administrator.
                      
                            The complete exception is provided below:
                        
<class 'AttributeError'>
'CustomFieldFilter' object has no attribute 'name'
                        
                            If further assistance is required, please post to the NetBox mailing list.
                        
                        
                            Home Page

"
Invoke-RESTMethod : 

    Server Error
                            Server Error
 
                                There was a problem with your request. Please contact an administrator.
                            
                        
                        
                        
                            The complete exception is provided below:
                        
<class 'AttributeError'>
'CustomFieldFilter' object has no attribute 'name'
                        
                            If further assistance is required, please post to the NetBox mailing list.
                        
                        
                            Home Page
                        
                    

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages