# VAPIX Overview
**VAPIX® Library** | [VAPIX Documentation](https://developer.axis.com/vapix/)
:::info
**VAPIX is Axis own open API (Application Programming Interface) to AXIS products**, using standard protocols that enable integration into a wide range of solutions on different platforms.
- **Network video**
- Audio systems
- Intercom
- **Applications**
- Body worn systems
- Physical access control
- Radar
:::
[toc]
## Authentication Policy
:::info
**Network.HTTP.AuthenticationPolicy**
We can set the authentication capabilities to either Basic, Digest, Basic_Digest, or Recommended. **Default value is Recommended**.
:::
>[!Note] Developer Documentation > Network video > Network settings

>[!Note] Web GUI > System > Plain config (change back to **Recommended**)

### Hands-on template
* **Systemready API**
* Request url: ``http://<servername>/axis-cgi/systemready.cgi``
* JSON input parameters
```bash!
star@delta:~/workspace/AXIS/VAPIX$ cat systemready.json
{
"apiVersion": "1.1",
"context": "my context",
"method": "systemready",
"params": {
"timeout": 20
}
}
```
* Using curl to send HTTP request
```bash!
curl --digest -u swae:5Giotlead -v http://192.168.1.57/axis-cgi/systemready.cgi -d @systemready.json | jq .
```
* HTTP responses (header + body)
* 1st HTTP request call (取得 digest nonce 一次性隨機數, 作為第二次呼叫的輸入參數。)
```
star@delta:~/workspace/AXIS/VAPIX$ curl --digest -u swae:5Giotlead -v http://192.168.1.57/axis-cgi/systemready.cgi -d @systemready.json | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.168.1.57:80...
* Connected to 192.168.1.57 (192.168.1.57) port 80 (#0)
* Server auth using Digest with user 'swae'
> POST /axis-cgi/systemready.cgi HTTP/1.1
> Host: 192.168.1.57
> User-Agent: curl/7.88.1
> Accept: */*
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 200 OK
< Date: Tue, 15 Apr 2025 07:41:58 GMT
< Server: Apache/2.4.62 (Unix) OpenSSL/3.0.15
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Content-Security-Policy: default-src 'self'; frame-ancestors 'self'; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://*.axis.com mediastream: blob:; script-src 'self' https://*.googletagmanager.com https://www.google-analytics.com https://ssl.google-analytics.com https://*.axis.com; style-src 'self' 'unsafe-inline'; img-src 'self' https://*.google-analytics.com https://*.googletagmanager.com https://*.axis.com data: blob:; media-src 'self' mediastream: blob:; object-src 'none'
< Referrer-Policy: strict-origin-when-cross-origin
< Upgrade: h2
< Connection: Upgrade
< Transfer-Encoding: chunked
< Content-Type: application/json
<
* Ignoring the response-body
{ [85 bytes data]
100 79 0 79 0 0 2792 0 --:--:-- --:--:-- --:--:-- 2821
* Connection #0 to host 192.168.1.57 left intact
```
* 2nd HTTP request call (自帶 digest nonce 認證資訊)
```
* Issue another request to this URL: 'http://192.168.1.57/axis-cgi/systemready.cgi'
* Found bundle for host: 0x557caeada3d0 [serially]
* Can not multiplex, even if we wanted to
* Re-using existing connection #0 with host 192.168.1.57
> POST /axis-cgi/systemready.cgi HTTP/1.1
> Host: 192.168.1.57
> User-Agent: curl/7.88.1
> Accept: */*
> Content-Length: 109
> Content-Type: application/x-www-form-urlencoded
>
} [109 bytes data]
< HTTP/1.1 200 OK
< Date: Tue, 15 Apr 2025 07:41:58 GMT
< Server: Apache/2.4.62 (Unix) OpenSSL/3.0.15
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Content-Security-Policy: default-src 'self'; frame-ancestors 'self'; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://*.axis.com mediastream: blob:; script-src 'self' https://*.googletagmanager.com https://www.google-analytics.com https://ssl.google-analytics.com https://*.axis.com; style-src 'self' 'unsafe-inline'; img-src 'self' https://*.google-analytics.com https://*.googletagmanager.com https://*.axis.com data: blob:; media-src 'self' mediastream: blob:; object-src 'none'
< Referrer-Policy: strict-origin-when-cross-origin
< Transfer-Encoding: chunked
< Content-Type: application/json
<
{ [197 bytes data]
100 300 0 191 100 109 2682 1530 --:--:-- --:--:-- --:--:-- 4212
* Connection #0 to host 192.168.1.57 left intact
```
* Successful http response
```json!
{
"apiVersion": "1.4",
"context": "my context",
"method": "systemready",
"data": {
"systemready": "yes",
"needsetup": "no",
"uptime": "14875",
"bootid": "1accda9b-1d04-4017-8fe6-1d62558f562f"
}
}
```
-
## Applications
### Hands-on
* **Application API**
* List installed applications
* Request url: ``http://<servername>/axis-cgi/applications/list.cgi``
* Using curl to send HTTP request
```bash!
curl --digest -u swae:5Giotlead http://192.168.1.57/axis-cgi/applications/list.cgi
```
* HTTP responses (body)
```
salmon@delta:~/workspace/AXIS/VAPIX$ curl --digest -u swae:5Giotlead http://192.168.1.57/axis-cgi/applications/list.cgi
<reply result="ok">
<application Name="vmd" NiceName="AXIS Video Motion Detection" Vendor="Axis Communications" Version="4.5-8" ApplicationID="143440" License="None" Status="Stopped" ConfigurationPage="local/vmd/config.html" VendorHomePage="http://www.axis.com" LicenseName="Proprietary" />
<application Name="AXISImageHealthAnalytics" ApplicationID="414427" NiceName="AXIS Image Health Analytics" Vendor="Axis Communications" Version="1.2.1" Status="Running" License="None" ConfigurationPage="local/AXISImageHealthAnalytics/index.html" VendorHomePage="https://www.axis.com" LicenseName="available"></application>
<application Name="objectanalytics" ApplicationID="412806" NiceName="AXIS Object Analytics" Vendor="Axis Communications" Version="1.17.30" Status="Running" License="None" ConfigurationPage="local/objectanalytics/index.html" VendorHomePage="http://www.axis.com" LicenseName="available"></application>
</reply>
```
* Control application
* Upload application
* **AXIS Object analytics API**
* Read configuration capabilities
* Request url: ``http://<servername>/local/objectanalytics/control.cgi``
* JSON input parameters
```bash!
salmon@delta:~/workspace/AXIS/VAPIX$ cat aoa_control.json
{
"apiVersion": "1.2",
"context": "my context",
"method": "getConfigurationCapabilities"
}
```
* Using curl to send HTTP request
```bash!
curl --digest -u swae:5Giotlead -v http://192.168.1.57/local/objectanalytics/control.cgi -d @aoa_control.json | jq .
```
* HTTP responses (body)
```
salmon@delta:~/workspace/AXIS/VAPIX$ curl --digest -u swae:5Giotlead http://192.168.1.57/local/objectanalytics/control.c
gi -d @aoa_control.json | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 381 100 381 0 0 111k 0 --:--:-- --:--:-- --:--:-- 124k
100 4014 0 3916 100 98 245k 6303 --:--:-- --:--:-- --:--:-- 252k
```
* Successful http response
:::spoiler
```
{
"apiVersion": "1.6",
"context": "my context",
"data": {
"devices": [
{
"id": 1,
"imageIndex": 0,
"name": "Camera",
"resolutions": [
"1920x1080",
"1280x960",
"1280x800",
"1280x720",
"1024x768",
"1024x640",
"800x600",
"800x500",
"800x450",
"640x480",
"640x400",
"640x360",
"480x360",
"480x300",
"480x270",
"320x240",
"320x200",
"320x180",
"240x180",
"160x120",
"160x100",
"160x90"
],
"rotation": 180,
"tags": [
"primary"
],
"type": "camera"
}
],
"filters": [
{
"defaultInstance": [
[
-0.2,
-0.2
],
[
-0.2,
0.2
],
[
0.2,
0.2
],
[
0.2,
-0.2
]
],
"maxNbrInstances": 5,
"maxNbrVertices": 10,
"maxPosX": 1,
"maxPosY": 1,
"minNbrInstances": 0,
"minNbrVertices": 3,
"minPosX": -1,
"minPosY": -1,
"type": "excludeArea"
},
{
"defaultTime": 1,
"maxTime": 180,
"minTime": 1,
"type": "timeShortLivedLimit"
},
{
"defaultDistance": 5,
"maxDistance": 20,
"minDistance": 3,
"type": "distanceSwayingObject"
},
{
"defaultHeight": 3,
"defaultWidth": 3,
"maxHeight": 100,
"maxWidth": 100,
"minHeight": 3,
"minWidth": 3,
"type": "sizePercentage"
},
{
"defaultHeight": 75,
"defaultWidth": 75,
"maxHeight": 9999,
"maxWidth": 9999,
"minHeight": 10,
"minWidth": 10,
"type": "sizePerspective"
}
],
"metadataOverlay": {
"cameras": [
{
"canDrawInSpecifiedResolutions": true,
"id": 1,
"resolutions": [
"1920x1080",
"1280x960",
"1280x800",
"1280x720",
"1024x768",
"1024x640",
"800x600",
"800x500",
"800x450",
"640x480",
"640x400",
"640x360",
"480x360",
"480x300",
"480x270",
"320x240",
"320x200",
"320x180",
"240x180",
"160x120",
"160x100",
"160x90"
]
}
],
"maxNbrActiveCameras": 1,
"minNbrActiveCameras": 0
},
"objectClassifications": [
{
"type": "human"
},
{
"type": "missing_hardhat"
},
{
"subTypes": [
{
"type": "bus"
},
{
"type": "car"
},
{
"type": "motorcycle/bicycle"
},
{
"type": "truck"
},
{
"type": "unknown"
}
],
"type": "vehicle"
}
],
"perspective": {
"defaultHeight": 180,
"maxHeight": 9999,
"maxNbrBars": 3,
"maxNbrPerspectives": 10,
"maxNbrPerspectivesPerScenario": 1,
"minHeight": 10,
"minNbrBars": 2,
"minNbrPerspectives": 0,
"minNbrPerspectivesPerScenario": 1
},
"scenarios": {
"accumulatedCounts": {
"defaultTimedResetEnabled": false
},
"defaultDeviceId": 1,
"defaultScenario": "motion",
"eventInterval": {
"defaultEnabled": false
},
"maxLengthName": 15,
"maxNbrActiveDevices": 1,
"maxNbrDevices": 1,
"maxNbrScenariosPerCamera": 10,
"minLengthName": 1,
"minNbrActiveDevices": 0,
"minNbrDevices": 1,
"minNbrScenariosPerCamera": 0,
"passthroughConfiguration": {
"defaultEnabled": false,
"maxPeriod": 10000,
"minPeriod": 1
},
"supportedScenarios": [
"motion",
"fence",
"crosslinecounting",
"occupancyInArea",
"tailgating"
],
"tailgatingTimeRange": {
"defaultMax": 3,
"defaultMin": 1,
"maxTimeRange": 20,
"minTimeRange": 0
},
"thresholdConfiguration": {
"defaultEnabled": false,
"defaultLevel": 0,
"defaultTriggerDelay": 0,
"defaultType": "moreThan",
"maxLevel": 100,
"maxTriggerDelay": 7200,
"minLevelWithLessThanType": 1,
"minLevelWithMoreThanType": 0,
"minTriggerDelay": 0
}
},
"triggers": [
{
"conditions": {
"defaultConditionType": "individualTimeInArea",
"validConditionTypes": [
{
"classifications": [
{
"defaultAlarmTime": 1,
"defaultTime": 120,
"maxTime": 7200,
"minTime": 1,
"type": "human"
},
{
"defaultAlarmTime": 1,
"defaultTime": 120,
"maxTime": 7200,
"minTime": 1,
"type": "missing_hardhat"
},
{
"defaultAlarmTime": 1,
"defaultTime": 120,
"maxTime": 7200,
"minTime": 1,
"type": "vehicle"
}
],
"type": "individualTimeInArea"
}
]
},
"defaultInstance": [
[
-0.97,
-0.97
],
[
-0.97,
0.97
],
[
0.97,
0.97
],
[
0.97,
-0.97
]
],
"maxNbrInstances": 1,
"maxNbrVertices": 20,
"maxPosX": 1,
"maxPosY": 1,
"minNbrInstances": 1,
"minNbrVertices": 3,
"minPosX": -1,
"minPosY": -1,
"type": "includeArea"
},
{
"defaultAlarmDirection": "leftToRight",
"defaultInstance": [
[
0,
-0.7
],
[
0,
0.7
]
],
"maxNbrInstances": 1,
"maxNbrVertices": 10,
"maxPosX": 1,
"maxPosY": 1,
"minNbrInstances": 1,
"minNbrVertices": 2,
"minPosX": -1,
"minPosY": -1,
"type": "fence",
"validAlarmDirections": [
"leftToRight",
"rightToLeft"
]
},
{
"defaultCountingDirection": "leftToRight",
"defaultInstance": [
[
0,
-0.7
],
[
0,
0.7
]
],
"maxNbrInstances": 1,
"maxNbrVertices": 10,
"maxPosX": 1,
"maxPosY": 1,
"minNbrInstances": 1,
"minNbrVertices": 2,
"minPosX": -1,
"minPosY": -1,
"type": "countingLine",
"validCountingDirections": [
"leftToRight",
"rightToLeft"
]
}
]
},
"method": "getConfigurationCapabilities"
}
```
:::
* Backup
* Request url: ``http://<servername>/local/objectanalytics/control.cgi``
* JSON input parameters
```bash!
salmon@delta:~/workspace/AXIS/VAPIX$ cat aoa_control_Backup.json
{
"apiVersion": "1.2",
"context": "my context",
"method": "getConfiguration"
}
```
* Using curl to send HTTP request
```bash!
curl --digest -u swae:5Giotlead http://192.168.1.57/local/objectanalytics/control.cgi -d @aoa_control_Backup.json | jq .
```
* HTTP responses (body)
```
salmon@delta:~/workspace/AXIS/VAPIX$ curl --digest -u swae:5Giotlead http://192.168.1.57/local/objectanalytics/control.cgi -d @aoa_control_Backup.json | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 381 100 381 0 0 65463 0 --:--:-- --:--:-- --:--:-- 76200
100 1637 0 1551 100 86 98739 5474 --:--:-- --:--:-- --:--:-- 101k
```
## Devices configuration
## Network video
# Swagger UI configuration
## analytics-mqtt
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/analytics-mqtt/v1/openapi.json)
## video-analytics
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/video-analytics/v1/openapi.json)
## basic-device-info
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/basic-device-info/v2/openapi.json)
## best-snapshot
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/best-snapshot/v1/openapi.json)
## cert
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/cert/v1/openapi.json)
## firewall
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/firewall/v1/openapi.json)
## lldp
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/lldp/v1/openapi.json)
## log
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/log/v1/openapi.json)
## oidcsetup
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/oidcsetup/v1/openapi.json)
## recording-group
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/remote-object-storage/v1/openapi.json)
## remote-object-storage
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/remote-object-storage/v1/openapi.json)
## snmp
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/snmp/v1/openapi.json)
## ssh
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/ssh/v1/openapi.json)
## virtualhost
* [swagger-ui](http://192.168.1.57/config/web-ui/swagger-ui/?url=/config/discover/apis/virtualhost/v1/openapi.json)