cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

External Api not returning any response

sshukla
New Contributor III

import requests

url = "https://example.com/api"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
Payload = json.dumps({json_data})

response = requests.post(url, headers=headers, data=Payload)

print(response.status_code)
print(response.text)

 

this is running for very long time

Same url is working for other payload 

could you please let me know why this is happening?

 

5 REPLIES 5

Alberto_Umana
Databricks Employee
Databricks Employee

Hello @sshukla,

What is the actual REST API endpoint you are trying to call?

its Kinaxis Api end point.

 

same endpoint is working for other payload but for one specific payload it is not working.

same i have tried in postman and it was giving me result but in databricks it is running for very long 

Alberto_Umana
Databricks Employee
Databricks Employee

Oh I see, it's an external endpoint. Can you test connectivity to the endpoint first? with curl -vX POST https:// endpoint from within Databricks?

Hi,

connectivity is there as i am able to read data for other payload but for one specific payload it is not returning any response

Alberto_Umana
Databricks Employee
Databricks Employee

Can you DIM the two payload, it has to do with something on endpoint, since it is working on one payload fine, where in the other is not to the same endpoint.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now