URI for Nav OData web service

  • 25Views
  • Last Post 4 weeks ago
0
votes
Richard Trum posted this 03 March 2020

Hello Skyvia and community,

I am trying to setup an import integration from a MS Navision instance based on an OData web service. 

I am able to see the metadata from the service document in a link similar to this one;

https://<Server>:<WebServicePort>/<ServerInstance>/OData

I am also able to query data from /OData/Company, but when I am trying to query data from
a specific company that I want to look at (like /OData/Company('CompanyName')/Customer),
the service is just returning "Bad Request (400)".

I am assuming that this is due to the fact that Skyvia is trying to make GET calls without the company
information included - is there anyway I can format/write the URI for the queries to work?

Many thanks in advance!

 

 

Order By: Standard | Newest | Votes
0
votes
Mariia Zaharova posted this 04 March 2020

Hello Richard!

 

but when I am trying to query data from a specific company that I want to look at (like /OData/Company('CompanyName')/Customer)

Please specify where exactly do you use this request (send us some screenshots, etc.)? Do you specify this in the Connection Editor? If yes, it is not recommended to do so. Please use the general URL for your instance (i.e. https://<Server>:<WebServicePort>/<ServerInstance>/OData)  in the OData connection and then use this OData connection in Query Tool or Export package to get the required data for the required objects.

 

Looking forward to your reply.

 

Best regards,

Mariia

0
votes
Richard Trum posted this 04 March 2020

Hi Mariia,

Thank you for the reply!

I have tried to use the request in queries, as an Export package and also in an Import integration - the same error happens in all those instances. I have used the URL of the format https://<Server>:<WebServicePort>/<ServerInstance>/OData just as you stated, but the problem is that when there are multiple companies used in the web service from Navision, Nav requires that all GET calls also includes information regarding which company that it should push data from - i.e. "/OData/Company('CompanyName')/" which I can't find any way to include in Skyvia at the the moment - thus my question.

Best regards,

Richard

0
votes
Richard Trum posted this 04 March 2020

Just to explain a bit more - please find some screenshots below from the query. I can query data from the table Company (when the URL is set to https://<Server>:<WebServicePort>/<ServerInstance>/OData), but when trying to query for instance Contact_SF, I just receive the error message Bad Request (400)

 

0
votes
Mariia Zaharova posted this 04 March 2020

Thank you for the details.

We will check them and contact you as soon as possible. Probably, this issue is related to the previous one.

 

Best regards,

Mariia

0
votes
Richard Trum posted this 4 weeks ago

Thank you Mariia,

Again, is there any way that Skyvia can support http requests containing a company name similar to these filtering functions?

https://docs.microsoft.com/en-us/dynamics-nav/using-filter-expressions-in-odata-uris

0
votes
Mariia Zaharova posted this 4 weeks ago

Hello Richard,

 

No, Skyvia does not support such a case. As we have already mentioned, it is recommended to use the general URL for your instance (i.e. https://<Server>:<WebServicePort>/<ServerInstance>/OData) in the OData connection, without filters, and then use this OData connection in the Query Tool or Export package to get the required data for the required objects. 

When you select your OData connection, you will get the list of the available objects. Filters can be added to the Export package or in the Query Tool.

 

Best regards,

Mariia

Close