Ask a Question

Connect to Azure Cosmos DB from ReadyApi

SOLVED
_Oliver_
Contributor

Connect to Azure Cosmos DB from ReadyApi

Hi all,

 

I am trying to find a way to connect to Azure Cosmos DB from readyApi. I assume the best way is to do it using a groovy script but I am not really sure. I searched for a solution here and on the web in general, and even though I can see that I am definitely not the first one trying to achieve this, I was unable so far to find any answer that provides an actual solution...

Any help on this subject would be more than welcome !

 

Thanks guys

1 ACCEPTED SOLUTION

Accepted Solutions
richie
Community Hero

Re: Connect to Azure Cosmos DB from ReadyApi

Hey @_Oliver_

In that case i'd go back and confirm the Cosmos DB version. If that resource i pointed you to was a little old, i know that MS have changed REST auth schemes for a number of their products over the last 5 years. Perhaps those instructions i found were out of date.

Essentially there will be a number of URI/QUERY and HEADER parms you'll need to specify with the correct details, otherwise it wont work. Did you confirm and re-confirm youd specified the correct value for each of those parms defined in the postman instructions? If even one of those parms are incorrect, you wont be able to connect.

Alternatively im guessing you might be able to ask Dev? Considering youre testing their code, it seems logical to think they might know something about this.

Cheers

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

8 REPLIES 8
richie
Community Hero

Re: Connect to Azure Cosmos DB from ReadyApi

Hey @_Oliver_ 

 

 

have a look at the following link - someone else asked about this awhile ago for SoapUI.

 

the link provides further link to setup your DB connection using REST rather than JDBC - as long as you're doing reasonably simple queries - using the REST API rather than JDBC should sort you fine.

 

https://community.smartbear.com/t5/SoapUI-Open-Source/Does-soap-UI-support-cosmos-DB-testing/td-p/20...

 

Cheers,

 

Rich

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
_Oliver_
Contributor

Re: Connect to Azure Cosmos DB from ReadyApi

Hi Rich,

 

Thanks. I did see this link but it does not provide a solution for the authentication part, which is the most tricky part to put in place. Apologies, I did not mention that specific item in my previous message.

 

Regards

Olivier

richie
Community Hero

Re: Connect to Azure Cosmos DB from ReadyApi

Hey @_Oliver_ 

 

have a look here --> https://sajeetharan.com/2019/07/01/easily-explore-cosmos-db-rest-apis-with-postman/

 

I know it says postman - but authentication is authentication and as long as you have all the mandatory headers setup (ignoring the stupid dynamically generated postman ones) you should be able to setup the connection in ReadyAPI!

 

Hit back if you're still struggling after trying to apply the postman instructions

 

ta

 

Rich

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
_Oliver_
Contributor

Re: Connect to Azure Cosmos DB from ReadyApi

Thanks Rich for your replies.

 

I saw these instructions and tried to use them but the authorization generation does not work for some reasons...

I tried to use this in my groovy script :

https://www.jokecamp.com/blog/examples-of-creating-base64-hashes-using-hmac-sha256-in-different-lang...

Everything else is okay, it is the authorization part which fails.

richie
Community Hero

Re: Connect to Azure Cosmos DB from ReadyApi

Hey @_Oliver_

In that case i'd go back and confirm the Cosmos DB version. If that resource i pointed you to was a little old, i know that MS have changed REST auth schemes for a number of their products over the last 5 years. Perhaps those instructions i found were out of date.

Essentially there will be a number of URI/QUERY and HEADER parms you'll need to specify with the correct details, otherwise it wont work. Did you confirm and re-confirm youd specified the correct value for each of those parms defined in the postman instructions? If even one of those parms are incorrect, you wont be able to connect.

Alternatively im guessing you might be able to ask Dev? Considering youre testing their code, it seems logical to think they might know something about this.

Cheers

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

_Oliver_
Contributor

Re: Connect to Azure Cosmos DB from ReadyApi

Thanks Rich.

 

The dev team cannot help, they did not implement neither use these APIs. One of the dev tried to help but the MS documentation is not the best IMHO 😞

 

Regards

Olivier

_Oliver_
Contributor

Re: Connect to Azure Cosmos DB from ReadyApi

FYI, I have contactes MS support as we have been unable to find a solution to this problem.

 

_Oliver_
Contributor

Re: Connect to Azure Cosmos DB from ReadyApi

@sonya_m 

I am not sure why a message was marked as "accepted as a solution" as there is no solution available so far.

 

cancel
Showing results for 
Search instead for 
Did you mean: