Skip to main content
Solved

What is the format to write the Body in HTTP connector for API?


Rucha Naik
Forum|alt.badge.img+5

I want to create users in IAM using API. In order to POST the details , I am using below JSON query as the Body. Its working via Postman, but not through SF. I think the format to write JSON query is not correct. Has someone tried it. Please let me know the correct format to use JSON query in Body of an API.

Postman Details
SF input

 

Best answer by Erwin Ekkel

that should work:

 

Did you remove the square brackets from the content input for the http connector and did you then synchronize (when using iam) or reload the model (when using the sf)?

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi,

Can you show the status code, HTTP status code and content returned?

Also, the Content posted should not have the “[]” characters around the JSON. See: https://docs.thinkwisesoftware.com/docs/indicium/api#performing-crud-operations-functions-and-procedures


Rucha Naik
Forum|alt.badge.img+5

I updated the JSON format as per your suggestion, and re-run the HTTP connector:
 

Its working in Insomnia

 

No content is returned

 


Mark Jongeling
Administrator
Forum|alt.badge.img+23
Rucha Naik wrote:

 

 

The Result tab is the tab I'm interested in 😉 could you show that one?


Rucha Naik
Forum|alt.badge.img+5
sure.. :)
  Http response set-cookie ApplicationGatewayAffinityCORS=14b0db35d742b6b854c8e82c613a990b; Path=/; SameSite=None; Secure,ApplicationGatewayAffinity=14b0db35d742b6b854c8e82c613a990b; Path=/,.AspNetCore.Session=CfDJ8HTtrwtDJMpMvSbm3YJQwdmQfOkygnbVxapogUHloGwJPSj%2B35%2BOqUFdD0PbeEIbNBh0LcDZQ8vkHoBjUur2h%2BjrQPOqC1MbomZRqbdPTgA5KbDhzJRU8zV%2FN1EJv72uNuh6si%2B3V68Maq9uDN%2BFACVJ0hFAaTovKJds2pwPnmca; path=/; secure; samesite=lax; httponly,ARRAffinity=862cb2017d946478a07d3cccc5d4c9c8bb0f73d25b9d5e4ac8320e7d56368284;Path=/;HttpOnly;Secure;Domain=sisarbv-thinklab-indicium-prod.azurewebsites.net:443,ARRAffinitySameSite=862cb2017d946478a07d3cccc5d4c9c8bb0f73d25b9d5e4ac8320e7d56368284;Path=/;HttpOnly;SameSite=None;Secure;Domain=sisarbv-thinklab-indicium-prod.azurewebsites.net:443

Forum|alt.badge.img+17

Can you show the current content input for the http connector? 


Rucha Naik
Forum|alt.badge.img+5

below is the Content input:
 {
           "usr_id": "a_test_user5"
           ,"first_name":  "Rey"
           ,"sur_name": "naik"
           ,"appl_lang_id": "ENG"
           ,"authentication_type": 3
           ,"email": "email1@test.com"
           ,"allow_change_password": 1
  }

 

below is the Content-Type: application/json


Forum|alt.badge.img+17

that should work:

 

Did you remove the square brackets from the content input for the http connector and did you then synchronize (when using iam) or reload the model (when using the sf)?


Rucha Naik
Forum|alt.badge.img+5

Hi Erwin!! After IAM synchronization its working!! Thanks a lot!


Rucha Naik
Forum|alt.badge.img+5

Thanks Mark for you help too!


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