Trying to issue an API request for "getAccumulatedCounts" but getting 'Unauthorized' error response #684
-
I have created a very simple shell script that issues a curl command as seen below #!/bin/bash if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then curl --user $1:$2 but I continue to get an error response <title>401 Unauthorized</title>UnauthorizedThis server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required. FYI .. I have also configured the network settings on the camera for HTTP only |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
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.
-
Hi @josephmtz , AXIS Object Analytics Scenario 2 is configured as Crossline counting:#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
echo "Error: missing required parameter."
echo "Usage: get_counts.sh <username> <password> <scenario>"
exit 1
fi
username=$1
password=$2
scenario=$3
curl --digest--user "$username:$password" --verbose \
--location 'http://195.60.68.14:11117/local/objectanalytics/control.cgi' \
--header 'Content-Type: application/json' \
--data '{
"apiVersion": "1.0",
"context": "vivek",
"method": "getAccumulatedCounts",
"params":{"scenario":'"$scenario"'}
}' Output: |
Beta Was this translation helpful? Give feedback.
Hi @josephmtz ,
I am adding my script which I tested with the following device:
AXIS Q1656-DLE Radar-Video Fusion Camera
AXIS OS version 11.10.61
AXIS Object Analytics
Version: 1.13.28
Scenario 2 is configured as Crossline counting: