### Axis Application Control API (Start) Source: https://developer.axis.com/vapix/applications/application-api Demonstrates how to start an installed application using a GET request to the control endpoint, specifying the application package name. ```APIDOC GET /axis-cgi/applications/control.cgi?action=start&package=ExampleApp --- **Description:** Controls the execution state of an installed application. **Parameters:** * `action`: `start` (required) * `package`: The name of the application to control (required) **Example Usage:** ```http http://myserver/axis-cgi/applications/control.cgi?action=start&package=ExampleApp ``` **Response:** * **Success:** Typically `200 OK` with `OK` in the body. * **Error:** `200 OK` with `Error: ` in the body. ``` -------------------------------- ### Successful Deployment Output Example Source: https://developer.axis.com/acap/faq/deployment This is an example of the expected output when the PowerShell deployment script successfully installs and starts the ACAP application on multiple Axis devices. ```text 192.168.1.90 Install: OK Start: OK 192.168.1.91 Install: OK Start: OK 192.168.1.92 Install: OK Start: OK 192.168.1.93 Install: OK Start: OK 192.168.1.94 Install: OK Start: OK 192.168.1.95 Install: OK Start: OK 192.168.1.96 Install: OK Start: OK 192.168.1.97 Install: OK Start: OK 192.168.1.98 Install: OK Start: OK 192.168.1.99 Install: OK Start: OK ``` -------------------------------- ### Get Device Properties via VAPIX Source: https://developer.axis.com/acap/4/get-started/set-up-developer-environment/set-up-device This API documentation details how to retrieve basic device information, such as firmware version and hardware architecture, using the VAPIX CGI `basicdeviceinfo.cgi` endpoint. It utilizes a POST request with the `getAllProperties` method and demonstrates how to execute this using `curl`. ```APIDOC VAPIX CGI Endpoint for Device Properties: URL: http:///axis-cgi/basicdeviceinfo.cgi Method: POST Request Body (JSON): { "apiVersion": "1.0", "context": "Client defined request ID", "method": "getAllProperties" } Description: This POST request sends a JSON payload to the `basicdeviceinfo.cgi` service to fetch all available device properties. Example using curl: curl \ -u : \ --anyauth \ --data '{"apiVersion":"1.0","context":"Client defined request ID","method":"getAllProperties"}' \ "http://192.168.0.90/axis-cgi/basicdeviceinfo.cgi" Parameters for curl: - `-u :`: Specifies the username and password for authentication. - `--anyauth`: Allows curl to use any authentication method supported by the server. - `--data '...'`: The JSON payload containing the API method and context. Example JSON Response: { "apiVersion": "1.0", "context": "Client defined request ID", "data": { "propertyList": { "Architecture": "armv7hf", "Brand": "AXIS", "BuildDate": "Nov 07 2019 11:16", "HardwareID": "764", "ProdFullName": "AXIS P1448-LE Network Camera", "ProdNbr": "P1448-LE", "ProdShortName": "AXIS P1448-LE", "ProdType": "Network Camera", "SerialNumber": "ACCC8ED0C9EC", "Soc": "Axis Artpec-6", "SocSerialNumber": "00000000-00000000-442C2402-87C00153", "Version": "9.50.1", "WebURL": "http://www.axis.com" } } } Note: To pretty-print the JSON response, append `| jq` to the curl command, e.g., ` | jq`. ``` -------------------------------- ### Successful Deployment Output Example Source: https://developer.axis.com/acap/4/faq/deployment This is an example of the expected output when the PowerShell deployment script successfully installs and starts the ACAP application on multiple Axis devices. ```text 192.168.1.90 Install: OK Start: OK 192.168.1.91 Install: OK Start: OK 192.168.1.92 Install: OK Start: OK 192.168.1.93 Install: OK Start: OK 192.168.1.94 Install: OK Start: OK 192.168.1.95 Install: OK Start: OK 192.168.1.96 Install: OK Start: OK 192.168.1.97 Install: OK Start: OK 192.168.1.98 Install: OK Start: OK 192.168.1.99 Install: OK Start: OK ``` -------------------------------- ### Configure Single Relay Lock for Door Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Demonstrates setting up a door with a single relay lock using JSON and XML configurations. This includes parameters for lock type, relay state, and door monitoring. ```json { "axtdc:SetDoorConfiguration": { "DoorConfiguration": [ { "DeviceUUID": "", "Configuration": [ { "Name": "Lock.LockWhenDoorOpens", "Value": "false" }, { "Name": "DoorMonitor.ValueWhenOpen", "Value": "Input Open" }, { "Name": "DoorMonitor.ValueWhenClosed", "Value": "Input Ground" }, { "Name": "DoubleLock.Type", "Value": "None" }, { "Name": "Lock.Type", "Value": "Relay" }, { "Name": "Lock.RelayStateWhenLocked", "Value": "Open" }, { "Name": "Lock.BoltOutTime", "Value": "0" }, { "Name": "Lock.BoltInTime", "Value": "0" } ] } ] } } ``` ```xml Lock.LockWhenDoorOpens false DoorMonitor.ValueWhenOpen Input Open DoorMonitor.ValueWhenClosed Input Ground DoubleLock.Type None Lock.Type Relay Lock.RelayStateWhenLocked Open Lock.BoltOutTime 0 Lock.BoltInTime 0 ``` -------------------------------- ### Retrieve All Device Properties via VAPIX CGI Source: https://developer.axis.com/acap/3/get-started/set-up-the-device This section details how to fetch comprehensive device information, including firmware version and hardware architecture, using a VAPIX POST request to the basicdeviceinfo.cgi endpoint. It also shows how to execute this using curl. ```HTTP POST /axis-cgi/basicdeviceinfo.cgi HTTP/1.1 Host: Content-Type: application/json { "apiVersion": "1.0", "context": "Client defined request ID", "method": "getAllProperties" } ``` ```bash curl --anyauth -u : "http:///axis-cgi/basicdeviceinfo.cgi" --data '{"apiVersion":"1.0","context":"Client defined request ID","method":"getAllProperties"}' # To pretty-print the JSON output using jq: curl --anyauth -u : "http:///axis-cgi/basicdeviceinfo.cgi" --data '{"apiVersion":"1.0","context":"Client defined request ID","method":"getAllProperties"}' | jq ``` ```APIDOC API Endpoint: /axis-cgi/basicdeviceinfo.cgi Method: POST Description: Retrieves basic device information such as firmware version, hardware architecture, serial number, etc. Request Body (JSON): { "apiVersion": "1.0", "context": "Client defined request ID", "method": "getAllProperties" } Parameters: apiVersion: Specifies the API version (e.g., "1.0"). context: A client-defined identifier for the request. method: The method to call, "getAllProperties" to get all device properties. Authentication: Uses HTTP Basic Authentication. Replace and with valid device credentials. Example Response (JSON): { "apiVersion": "1.0", "context": "Client defined request ID", "data": { "propertyList": { "Architecture": "armv7hf", "Brand": "AXIS", "BuildDate": "Nov 07 2019 11:16", "HardwareID": "764", "ProdFullName": "AXIS P1448-LE Network Camera", "ProdNbr": "P1448-LE", "ProdShortName": "AXIS P1448-LE", "ProdType": "Network Camera", "SerialNumber": "ACCC8ED0C9EC", "Soc": "Axis Artpec-6", "SocSerialNumber": "00000000-00000000-442C2402-87C00153", "Version": "9.50.1", "WebURL": "" } } } Note: Replace , , and with your device's specific details. ``` -------------------------------- ### Create Access Profile (JSON) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Example of creating a new access profile (group) with no initial access policies using JSON format. ```JSON { "pacsaxis:SetAccessProfile": { "AccessProfile": [ { "Name": "Physicists", "Description": "", "Enabled": true, "Schedule": [], "AccessPolicy": [], "Attribute": [], "AuthenticationProfile": [] } ] } } ``` -------------------------------- ### Example Deployment Output Source: https://developer.axis.com/acap/faq/deployment Sample output indicating the successful installation and start of an ACAP application on multiple Axis devices. ```text 192.168.1.90   Install: OK   Start: OK 192.168.1.91   Install: OK   Start: OK 192.168.1.92   Install: OK   Start: OK 192.168.1.93   Install: OK   Start: OK 192.168.1.94   Install: OK   Start: OK 192.168.1.95   Install: OK   Start: OK 192.168.1.96   Install: OK   Start: OK 192.168.1.97   Install: OK   Start: OK 192.168.1.98   Install: OK   Start: OK 192.168.1.99   Install: OK   Start: OK ``` -------------------------------- ### Create Access Profile (XML) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Example of creating a new access profile (group) with no initial access policies using XML format. ```XML true Physicists ``` -------------------------------- ### Example Deployment Output Source: https://developer.axis.com/acap/4/faq/deployment Sample output indicating the successful installation and start of an ACAP application on multiple Axis devices. ```text 192.168.1.90   Install: OK   Start: OK 192.168.1.91   Install: OK   Start: OK 192.168.1.92   Install: OK   Start: OK 192.168.1.93   Install: OK   Start: OK 192.168.1.94   Install: OK   Start: OK 192.168.1.95   Install: OK   Start: OK 192.168.1.96   Install: OK   Start: OK 192.168.1.97   Install: OK   Start: OK 192.168.1.98   Install: OK   Start: OK 192.168.1.99   Install: OK   Start: OK ``` -------------------------------- ### ACAP Computer Vision SDK Examples Source: https://developer.axis.com/acap/develop-container-applications/include-third-party-libraries Offers examples for using the refactored ACAP Computer Vision SDK components, now available via the ACAP Runtime. This repository guides users on the new setup for computer vision applications. ```APIDOC Repository: https://github.com/AxisCommunications/acap-computer-vision-sdk-examples Purpose: Provides usage examples for the refactored ACAP Computer Vision SDK components. Context: From AXIS OS 12.0, the setup for ACAP Computer Vision solutions is based on installing public Python packages. ``` -------------------------------- ### Configure Door Lock and Monitor Settings Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Sets the configuration for a door's lock and monitor, specifying parameters like lock type, voltage, and door sensor behavior. This example shows the structure for defining these hardware-specific settings. ```json { "axtdc:SetDoorConfiguration": { "DoorConfiguration": [ { "DeviceUUID": "", "Configuration": [ { "Name": "Lock.LockWhenDoorOpens", "Value": "false" }, { "Name": "DoorMonitor.ValueWhenOpen", "Value": "Input Open" }, { "Name": "DoorMonitor.ValueWhenClosed", "Value": "Input Ground" }, { "Name": "DoubleLock.Type", "Value": "None" }, { "Name": "Lock.Type", "Value": "Standard" }, { "Name": "Lock.ValueWhenLocked", "Value": "Gnd" }, { "Name": "Lock.ValueWhenUnlocked", "Value": "12V" }, { "Name": "Lock.BoltOutTime", "Value": "0" }, { "Name": "Lock.BoltInTime", "Value": "0" } ] } ] } } ``` ```xml Lock.LockWhenDoorOpens false DoorMonitor.ValueWhenOpen Input Open DoorMonitor.ValueWhenClosed Input Ground DoubleLock.Type None Lock.Type Standard Lock.ValueWhenLocked Gnd Lock.ValueWhenUnlocked 12V Lock.BoltOutTime 0 Lock.BoltInTime 0 ``` -------------------------------- ### Example Door Configuration XML Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples An example snippet showing how configuration items for door locks might be represented in an XML-like format within the AXIS Entry Manager system. ```XML DoubleLock.Type None ... Lock.Type Standard ... Lock.ValueWhenLocked Gnd ... Lock.ValueWhenUnlocked 12V ... ``` -------------------------------- ### Get Configuration Capabilities Request Source: https://developer.axis.com/vapix/radar/radar-configuration Example HTTP request to get radar configuration capabilities. ```HTTP POST /axis-cgi/radar/radaranalytics.cgi HTTP/1.1 Host: myserver Content-Type: application/json { "apiVersion": "2.2", "context": "", "method": "getConfigurationCapabilities" } ``` -------------------------------- ### Run ACAP Native SDK Container Interactively Source: https://developer.axis.com/acap/4/develop/build-install-run Starts the ACAP Native SDK Docker container, mounts the local application directory, and runs it interactively. This setup allows for direct development and management of ACAP applications within the containerized environment. ```shell docker run -v $PWD/app:/opt/app --rm -i -t axisecp/acap-native-sdk:1.0-armv7hf-ubuntu20.04 ``` -------------------------------- ### Grant Access to Door (XML) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Example of updating an existing access profile to grant access to specific doors (AccessPoints) using XML format. ```XML Axis-00408c184bd9:1350630875.789015000 standard_always Axis-00408c184bd9:1350630876.738613000 standard_always true Physicists ``` -------------------------------- ### Example PTZ Command Request Source: https://developer.axis.com/vapix/network-video/pantiltzoom-api An example HTTP GET request to query information about available PTZ commands on a specific video channel. ```HTTP http://myserver/axis-cgi/com/ptz.cgi?info=1&camera=3 ``` -------------------------------- ### Grant Access to Door (JSON) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Example of updating an existing access profile to grant access to specific doors (AccessPoints) using JSON format. ```JSON { "pacsaxis:SetAccessProfile": { "AccessProfile": [ { "Name": "Physicists", "Description": "", "Enabled": true, "Schedule": [], "AccessPolicy": [ { "Schedule": ["standard_always"], "AccessPoint": "Axis-00408c184bd9:1350630875.789015000" }, { "Schedule": ["standard_always"], "AccessPoint": "Axis-00408c184bd9:1350630876.738613000" } ], "Attribute": [], "AuthenticationProfile": [], "token": "Axis-00408c184bd9:1350644754.557727000" } ] } } ``` -------------------------------- ### Create Authentication Profile (Card & PIN) (XML) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Creates an authentication profile that requires both a Card Number and a PIN for access. ```xml pacsaxis:Description> CardNr IdDataEqual pacsaxis:OperatorValue> PIN IdDataEqual standard_always ``` -------------------------------- ### ACAP Native SDK Hello World Example Source: https://developer.axis.com/acap/4/get-started/hello-world-example This snippet guides users to create their first ACAP application using the Native SDK. It points to a 'Hello World' example on GitHub, which is part of the ACAP Native SDK examples repository. ```link https://github.com/AxisCommunications/acap-native-sdk-examples/tree/main/hello-world ``` -------------------------------- ### ACAP Computer Vision SDK Examples Repository Source: https://developer.axis.com/acap/develop-container-applications/build-install-run Link to the GitHub repository for ACAP Computer Vision SDK examples. This repository provides usage examples for the refactored components of the SDK, now available in ACAP Runtime. ```url https://github.com/AxisCommunications/acap-computer-vision-sdk-examples ``` -------------------------------- ### Create One-Off Schedule Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Illustrates how to create a schedule for a single, specific time interval, such as a one-off event on a particular date. ```json { "axsch:SetSchedule": { "Schedule": [ { "Name": "Christmas 2012", "Description": "", "ScheduleDefinition": "BEGIN:VCALENDAR\r\nPRODID:\r\nVERSION:2.0\r\nBEGIN:VEVENT\r\nSUMMARY:December 24 2012\r\nDTSTART:20121224T000000\r\nDTEND:20121225T000000\r\nDTSTAMP:20121019T122502\r\nUID:c674cc86cf597f1c\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", "ExceptionScheduleDefinition": "", "Attribute": [] } ] } } ``` ```xml Christmas 2012 BEGIN:VCALENDAR PRODID: VERSION:2.0 BEGIN:VEVENT SUMMARY:December 24 2012 DTSTART:20121224T000000 DTEND:20121225T000000 DTSTAMP:20121019T122502 UID:c674cc86cf597f1c END:VEVENT END:VCALENDAR ``` -------------------------------- ### Get Current Angle of Illumination Source: https://developer.axis.com/vapix/network-video/light-control Retrieves the current angle of illumination for a specified light. This example demonstrates accessing the light service client and light information to get the illumination value. ```C# /* Get the Light ID.*/ LightInformation lightInformation = lightInformationList[0]; string lightID = lightInformation.LightID; /* Get and print the current angle of illumination.*/ int angleOfIllumination = myLightService.GetCurrentAngleOfIllumination(lightID); Console.WriteLine("Current angle of illumination: {0} ", angleOfIllumination); ``` -------------------------------- ### Create Authentication Profile (Card & PIN) (JSON) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Creates an authentication profile that requires both a Card Number and a PIN for access. ```json { "pacsaxis:SetAuthenticationProfile": { "AuthenticationProfile": [ { "Name": "", "Description": "", "Schedule": ["standard_always"], "IdFactor": [ { "IdDataName": "CardNr", "IdMatchOperatorName": "IdDataEqual", "OperatorValue": "" }, { "IdDataName": "PIN", "IdMatchOperatorName": "IdDataEqual", "OperatorValue": "" } ] } ] } } ``` -------------------------------- ### Configure Half Duplex OSDP Reader (XML-like) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Sets up a half-duplex OSDP reader using an XML-like structure. This format details device configurations, including reader type, LED, beeper, tampering, REX, keypress settings, and associated data configurations. ```xml IdPoint.Reader.Type RS-485HD IdPoint.LED.Type SingleLED IdPoint.LED.ActiveLevel ActiveLow IdPoint.Beeper.Type ActiveLow IdPoint.Tampering.Type ActiveLow IdPoint.REX.Type None IdPoint.Keypress.Type Auto IdPoint.RS-485HD.Protocol OSDP iddataconf_wiegand_26bit_h10301 iddataconf_wiegand_34bit iddataconf_wiegand_37bit_h10302 iddataconf_wiegand_37bit_h10304 iddataconf_wiegand_35bit_corporate1000 ``` -------------------------------- ### Get Recording ID (HTTP/XML) Source: https://developer.axis.com/vapix/network-video/edge-storage-api Retrieves Recording IDs and associated metadata from an Axis device using the Recording API. This example shows an HTTP GET request to list recordings. ```HTTP http:///axis-cgi/record/list.cgi?recordingid=all ``` ```XML HTTP/1.0 200 OK Content-Type: text/xml ... ``` -------------------------------- ### Configure Two 12V Locks for Door Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Illustrates configuring a door with two 12V locks, specifying double lock type, and voltage values for locked/unlocked states in JSON and XML formats. ```json { "axtdc:SetDoorConfiguration": { "DoorConfiguration": [ { "DeviceUUID": "", "Configuration": [ { "Name": "Lock.LockWhenDoorOpens", "Value": "false" }, { "Name": "DoorMonitor.ValueWhenOpen", "Value": "Input Open" }, { "Name": "DoorMonitor.ValueWhenClosed", "Value": "Input Ground" }, { "Name": "DoubleLock.Type", "Value": "Standard" }, { "Name": "DoubleLock.ValueWhenLocked", "Value": "Gnd" }, { "Name": "DoubleLock.ValueWhenUnlocked", "Value": "12V" } ] } ] } } ``` ```xml Lock.LockWhenDoorOpens false DoorMonitor.ValueWhenOpen Input Open DoorMonitor.ValueWhenClosed Input Ground DoubleLock.Type Standard DoubleLock.ValueWhenLocked Gnd DoubleLock.ValueWhenUnlocked 12V Lock.Type Standard Lock.ValueWhenLocked Gnd Lock.ValueWhenUnlocked 12V ``` -------------------------------- ### Get Supported API Versions API Example Source: https://developer.axis.com/vapix/network-video/supervised-io Example of querying the AXIS A9210 module for supported JSON API versions. This is useful for checking device compatibility before implementing features. ```http http://myserver/axis-cgi/supervisedio.cgi ``` ```json { "method": "getSupportedVersions", "context": "123" } ``` ```json { "apiVersion": "2.0", "method": "getSupportedVersions", "context": "123", "data": { "apiVersions": ["1.0", "2.0"] } } ``` -------------------------------- ### ACAP Computer Vision SDK Examples Source: https://developer.axis.com/acap/develop-container-applications Repository for examples demonstrating the usage of the new setup for ACAP Computer Vision applications, utilizing components from the ACAP Runtime. ```link https://github.com/AxisCommunications/acap-computer-vision-sdk-examples ``` -------------------------------- ### Create User (XML) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Demonstrates the XML request format for creating a new user, specifying first and last names as attributes. This operation is part of the user management API. ```xml Freeman, Gordon ``` ```xml Axis-00408c184bd9:1350638010.566278000 ``` -------------------------------- ### Set Location Tag Example Source: https://developer.axis.com/vapix/network-video/geolocation-api Example of setting location tags using a GET request to the geolocation set CGI script. This is useful for distinguishing devices in the same physical location but on different floors. ```http http://myserver/axis-cgi/geolocation/set.cgi?lat=51.0&lng=-0.1&text="floor 2" ``` -------------------------------- ### Create Weekly Recurring Schedule Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Demonstrates how to create a schedule with weekly recurring intervals, specifying the days of the week and time range for the recurrence. ```json { "axsch:SetSchedule": { "Schedule": [ { "Name": "Lunch", "Description": "", "ScheduleDefinition": "BEGIN:VCALENDAR\r\nPRODID:\r\nVERSION:2.0\r\nBEGIN:VEVENT\r\nSUMMARY:Lunch\r\nDTSTART:20000103T110000\r\nDTEND:20000103T120000\r\nRRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR\r\nDTSTAMP:20121019T123359\r\nUID:c5d62887d9a269ab\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", "ExceptionScheduleDefinition": "", "Attribute": [] } ] } } ``` ```xml Lunch BEGIN:VCALENDAR PRODID: VERSION:2.0 BEGIN:VEVENT SUMMARY:Lunch DTSTART:20000103T110000 DTEND:20000103T120000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR DTSTAMP:20121019T123359 UID:c5d62887d9a269 END:VEVENT END:VCALENDAR ``` -------------------------------- ### Create User (JSON) Source: https://developer.axis.com/vapix/physical-access-control/system-integration-examples Demonstrates the JSON request format for creating a new user, specifying first and last names as attributes. This operation is part of the user management API. ```json { "axudb:SetUser": { "User": [ { "Name": "Freeman, Gordon", "Description": "", "Attribute": [ { "type": "string", "Name": "FirstName", "Value": "Gordon" }, { "type": "string", "Name": "LastName", "Value": "Freeman" } ] } ] } } ``` ```json { "Token": ["Axis-00408c184bd9:1350638010.566278000"] } ``` -------------------------------- ### Get Ended Tracks Request and Examples Source: https://developer.axis.com/vapix/applications/demographic-identifier-api Demonstrates the HTTP request to fetch ended tracks and provides example JSON responses for scenarios with no ended tracks, one track, and multiple tracks. ```HTTP GET http:///local/demographics/.api?tracks-ended.json ``` ```JSON { "ended": { "time_start": 1447748743.039911, "time_end": 1447749643.039911, "tracks": [] } } ``` ```JSON { "ended": { "time_start": 1447749887.539835, "time_end": 1447749947.539835, "tracks": [ { "time_start": 1447749942.930319, "time_end": 1447749946.210321, "gender_average": 1, "age_average": 21, "boxsize_average": 219 } ] } } ``` ```JSON { "ended": { "time_start": 1447750011.470372, "time_end": 1447750071.470372, "tracks": [ { "time_start": 1447750064.890142, "time_end": 1447750067.690133, "gender_average": 1, "age_average": 22, "boxsize_average": 217 }, { "time_start": 1447750066.130135, "time_end": 1447750067.690133, "gender_average": -1, "age_average": 18, "boxsize_average": 192 } ] } } ```