Forum Discussion
ameesh1984
Contributor
I see azure cosmos db has its own rest calls so we can use that directly from soap ui instead of using the jdbc driver
https://docs.microsoft.com/en-us/rest/api/cosmos-db/
https://docs.microsoft.com/en-us/rest/api/cosmos-db/
richie
5 years agoCommunity Hero
Hey ameesh1984,
Ah...sorry...my bad...i thought you wanted an SQL connection.
I just want to highlight that my experience of querying a db via REST (ive queried a cloud based Windows Azure SQL DB via its WebAPI) has been quite difficult on certain occasions to put the REST parms together if youre executing a complex query.
Actually, remembering back to when i was doing it about a year ago, it was actually impossible to execute certain complex SQL functions (e.g. CAST, etc.) via the REST API.....the API just didnt support that sort of thing. You can still join etc., but i dont think that i could do subqueries if memory serves.
Maybe cosmosDB is different....its a NoSQL database, right? Yeah, nope...ive got zero experience hitting a NoSQL db, so i'll shut up about it! 🙂
Cheers,
Rich
Ah...sorry...my bad...i thought you wanted an SQL connection.
I just want to highlight that my experience of querying a db via REST (ive queried a cloud based Windows Azure SQL DB via its WebAPI) has been quite difficult on certain occasions to put the REST parms together if youre executing a complex query.
Actually, remembering back to when i was doing it about a year ago, it was actually impossible to execute certain complex SQL functions (e.g. CAST, etc.) via the REST API.....the API just didnt support that sort of thing. You can still join etc., but i dont think that i could do subqueries if memory serves.
Maybe cosmosDB is different....its a NoSQL database, right? Yeah, nope...ive got zero experience hitting a NoSQL db, so i'll shut up about it! 🙂
Cheers,
Rich
- ameesh19845 years agoContributorIf you see this link on azure site they have a lot of get and post rest calls to cosmos azure db which shows its widely used for Nosql
https://docs.microsoft.com/en-us/rest/api/cosmos-db/
Any idea on those they seems simple queries to the db- richie5 years agoCommunity HeroHey ameesh1984,
i had a quick look at a GET (SELECT query) and it appears very simple....i.e. you can do a simple SELECT with basic filters and you can do INNER JOINS (didnt see any aggregate functions) but that appears to be the limit of what the REST API supports so looks a little disappointing.
HOWEVER, I need to highlight that i dont know how data is stored in a NoSQL database. Perhaps due to how the data is stored referentially etc. more complex queries arent necessary to do what you need?
I do appreciate that if youre hitting a cloud hosted database, typically the host doesnt allow its customers direct queryable access via JDBC like you would have for an on premise instance.
I always try and put my SQL together in a single complex query rather than multiple sequential queries (cos i like stretching my mind a bit and its more efficient), but theres nothing wrong in having multiple queries instead of a single complex query. Perhaps this is the approach you should use id you need to put a complex query together?
Sorry i cant be more help!
Rich- ameesh19845 years agoContributorAzure Cosmos DB REST API Reference | Microsoft Docs https://docs.microsoft.com/en-us/rest/api/cosmos-db/?WT.mc_id=email
This looks like it supports all crud operations and many more for cosmos
Related Content
- 3 years ago
Recent Discussions
- 15 years ago