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.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group