Issue grabbing the GetActionConfigurations using a POST request #390
-
Hello! Ive been trying to access the camera actions list stored on my P3265-LVE using Postman. The camera has been setup with Basic authorization and I have filled out the authorization tab in Postman accordingly. The body has been set to the following:
I keep getting back a 400 Bad Request Ive also tried using cURL to request the configurations with the following command:
The cURL request still responds with the same 400 Bad Request.
Can you please share with me an known working example POST for the action configuration? Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
Adding sample code for your reference in Python: import requests,json
from requests.auth import HTTPDigestAuth
url = "http://10.176.12.83/vapix/services"
payload =""
# open the input xml file and read
# data in form of python dictionary
# using xmltodict module
with open("test.xml") as xml_file:
payload = xml_file.read()
# headers
headers = {
'Content-Type': 'text/xml; charset=utf-8'
}
# POST request
#response = requests.request("POST", url, headers=headers, data=payload)
response = requests.request('POST',url,data=payload, auth=HTTPDigestAuth('root','pass'), verify=False)
# prints the response
print(response.text)
print(response) test.xml content: <?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
<Header/>
<Body >
<GetActionConfigurations xmlns="http://www.axis.com/vapix/ws/action1"/>
</Body>
</Envelope> Similar topics: |
Beta Was this translation helpful? Give feedback.
Hello!
Thank you for the recommendation! Changing it to HTTPS, I still received a 400 Bad Request. However, I included a few more headers and got it working. Here are the headers I used if anyone else runs into the same issue: