01-17-2025 02:52 AM
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?
01-17-2025 04:42 AM
Hello @sshukla,
What is the actual REST API endpoint you are trying to call?
01-17-2025 04:48 AM
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
01-17-2025 06:25 AM
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?
01-18-2025 08:36 AM
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
01-19-2025 05:46 AM
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.
17 hours ago
I have also faced the same issue, where for some payload the API is taking so much time but it is working absolutely fine on postman. Is is some response data size or cluster memory issue?
17 hours ago
The issue was due to data size and after filtering the data the issue got resolved
12 hours ago
how to reduce the data size, like API will going to give the data in onetime. can you give with some example.
res = request.get("api")
this above code is taking is lot of time
Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!
Sign Up Now