Skip to main content
Solved

JSON Call - assigning a server connection / url with credentials

  • November 16, 2022
  • 9 replies
  • 199 views

Forum|alt.badge.img+1

Hi All,

 

I have a question about the connection in JSON Call.

I had given the url (GraphQL url )to connect in the url section,

and in the http headers section, I had given the Authorization in Name and credentials in value.
The same thing works in Postman but not in JSON calls.

Please make any suggestions.

 

Thanks

Avi

Best answer by AKislyakov

With JSON Call you have two options:

  • Register a Generic Server connection and provide credentials there. And then reference that server in Url Resource section of JSON Call step
     
  • You can set URL in the Url section of JSON Call. In that case you have to manually supply properly encoded Authorization header. E.g. to use basic authentication, you have to provide Base64 encoded user and password. (wiki)
View original
Did this topic help you find an answer to your question?

fbarretto
Space Explorer
Forum|alt.badge.img+3
  • Space Explorer
  • November 16, 2022

Hi @AvinashV0407 , can you share the postman request? error it shows in IDE? Even how you configured the json call request?


Forum|alt.badge.img+2

With JSON Call you have two options:

  • Register a Generic Server connection and provide credentials there. And then reference that server in Url Resource section of JSON Call step
     
  • You can set URL in the Url section of JSON Call. In that case you have to manually supply properly encoded Authorization header. E.g. to use basic authentication, you have to provide Base64 encoded user and password. (wiki)

fbarretto
Space Explorer
Forum|alt.badge.img+3
  • Space Explorer
  • November 16, 2022

Example of generic server configuration

 


Forum|alt.badge.img+2

That’s a Kafka server (you can notice Implementation field), Generic Server looks like this

 


Forum|alt.badge.img+1
Screenshots which are working in Postman.
1.Body with GraphQL Query

 

 

2.Header with authorization Details
3.After Execution Result

 


Forum|alt.badge.img+1
JSON Call Url details
​​​​​​

 

In Header provided the authorization details to connect to url

 


Forum|alt.badge.img+1

Thanks @AKislyakov and @fbarretto for the info shared.

I have tried creating connection and tried the way that I have mentioned in the above screenshots  too.

But unable to execute the input template query/mutation. Please let me know if I missed anything.


Forum|alt.badge.img+2

Hi @AvinashV0407, can you please share the whole plan with JSON call (you can remove Authorization details and obscure URL) and the error details. 

Meanwhile, I noticed that you set Content-Type:application/json in JSON Call, whereas Postman uses Content-Type:application/graphql, so please check that you properly transformed the query for the JSON Call (check graphql docs for the details)


Forum|alt.badge.img+1
Postman used application/json only . will share the plan so that you can have a look.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings