QuadView configuration

Description

The QuadView configuration API makes it possible to make adjustments to the quad view in an Axis device, either by changing the order of the sub views, or by adding a fifth so called overview to the centre of your quad view.

Model

The API implements quadviewsetup.cgi as its communications interface and supports the following methods:

MethodDescription
getOrderRetrieve the order of sub views in a quad view.
setOrderSet the order of sub views in a quad view.
getQuadEyeValueRead if quad view and overview is enabled or disabled.
setQuadEyeValueEnable or disable quad view plus overview.
getSupportedVersionsRetrieve a list of supported API versions.

The quad view itself is made up of dewarped images from the Overview channel divided into four sub views.

Overview

The Overview channel has the shape of a circle.

The QuadView consist of 4 dewarped views (subviews), of the Overview

QuadView

The QuadView, where each sub view ID matches the Overview channel. The order are camera and mounting position dependant, meaning that while the initial order can be 1, 2, 3 and 4 or 2, 1, 3 and 4 for a different position. Please note that the order of views can be forcefully rearranged if you use the mounting position parameter root.ImageSource.IO.CameraTiltOrientation.

Identification

Identification for the quad view order

Property

Properties.QuadOverview.QuadViewOrder=yes

API Discovery

id=reposition-quadview

Identification for the quad view and the overview

Property

Properties.QuadOverview.QuadOverview=yes

Common examples

Get the current order of the sub views

Use this example to retrieve the current order of the sub views in the quad view.

1. Retrieve the order of sub views.

http://<servername>/axis-cgi/quadviewsetup.cgi
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "getOrder"
}

2. Parse the JSON response. A successful response will return the sub views in the order that they were configured in the quad view.

Successful response
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "getOrder",
  "data": {
    "id": [
      1,
      2,
      3,
      4
    ]
  }
}
Error response
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "getOrder",
  "error": {
    "code": 2100,
    "message": "API version not supported"
  }
}

API references

Reorder the sub views

Use this example to rearrange the order of the sub views in your quad view.

1. Rearrange the order of the sub views by switching the top-right and bottom-left ID:s. The order of views in this example are 1, 2, 4, 3 (top left, top right, bottom left and bottom right).

http://<servername>/axis-cgi/quadviewsetup.cgi
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "setOrder",
  "params": {
    "id": [
      1,
      4,
      2,
      3
    ]
  }
}

2. Parse the JSON response. A successful response will return the rearranged order of the sub views.

Successful response
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "setOrder",
  "data": {
    "id": [
      1,
      4,
      2,
      3
    ]
  }
}
Error response
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "setOrder",
  "error": {
    "code": 1100,
    "message": "Internal error"
  }
}

API references

Enable and disable the QuadEye

Use this example to enable QuadOverView. This lets you adjust the quad view to a desired position during the installation. Enabling both quad view and overview lets you add overview as an overlay to the center of the quad view.

Set the value for the QuadEye

1. Enable the QuadEye

http://<servername>/axis-cgi/quadviewsetup.cgi
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "setQuadEyeValue",
  "params": {
    "quadeye": true
  }
}

2. Parse the JSON response. A successful response will return a new value for the QuadEyeValue: true if it has been enabled and false if it was disabled.

Successful response
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "setQuadEyeValue",
  "data": {
    "quadeye": "true"
  }
}
Error response
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "setQuadEyeValue",
  "error": {
    "code": 1100,
    "message": "Internal error"
  }
}

API references

Get the status of the QuadEye

Use this example during the installation to enable QuadOverView and realign the quad view to a desired position. Enabling both quad view and overview will add an overview as an overlay to the center of the quad view.

Retrieve the value of the QuadEye

1. Check the status of the QuadEye.

http://<servername>/axis-cgi/quadviewsetup.cgi
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "getQuadEyeValue"
}

2. Parse the JSON response. A successful response will return a new value for the QuadEyeValue: true will enable the value while false disables it.

Successful response
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "getQuadEyeValue",
  "data": {
    "quadeye": "false"
  }
}
Error response
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "getQuadEyeValue",
  "error": {
    "code": 2100,
    "message": "API version not supported"
  }
}

API references

Get supported versions

Use this example to retrieve a list of API versions supported by your device.

1. Retrieve a list of supported API versions:

http://<servername>/axis-cgi/quadviewsetup.cgi
{
  "context": "123",
  "method": "getSupportedVersions"
}

2. Parse the JSON response.

Successful response
{
  "context": "123",
  "method": "getSupportedVersions",
  "data": {
    "apiVersions": ["1.0"]
  }
}
Error response
{
  "apiVersion": "1.0",
  "context": "123",
  "method": "getSupportedVersions",
  "error": {
    "code": 2102,
    "message": "Method not supported"
  }
}

API references

API specification

getOrder

This API method can be used to retrieve the order of sub views configured in the quad view.

Request

Security level

Admin, operator

Method

POST

http://<servername>/axis-cgi/quadviewsetup.cgi
Request body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "getOrder"
}
ParameterDescription
apiVersionThe API version that should be used.
context=<string>The user sets this value and the application echoes it back in the response (optional).
method="getOrder"The performed method.

Return value - Success

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "getOrder",
  "data": {
    "id": [
      <int>,
      <int>,
      <int>,
      <int>
    ]
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="getOrder"The method that was performed.
id=<array>Contains the order of sub views in the QuadView. The array has a length of 4 integers<int>, <int>, <int>, <int>numbered between 1 to 4 that represents the order of how they are configured in the quad view (top left, top right, bottom left and bottom right). The ID’s represent the part of the overview that is being dewarped into a view. In fisheye cameras the overview is a single source image in the shape of a circle divided into 4 parts with boundaries at 0, 90, 180 and 270 degree angles.

Return value - Failure

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "getOrder",
  "error": {
    "code": <integer error code>,
    "message": <string>
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="getOrder"The method that was performed.
error.codeThe error code.
error.messageThe error message.

Error codes

See General error codes for a list of potential errors.

setOrder

This API method can be used to configure the order of sub views in a quad view.

Request

Security level

Admin, operator

Method

POST

http://<servername>/axis-cgi/quadviewsetup.cgi
Request body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "setOrder",
  "params": {
    "id": [
      <int>,
      <int>,
      <int>,
      <int>
    ]
  }
}
ParameterDescription
apiVersionThe API version that should be used.
context=<string>The user sets this value and the application echoes it back in the response (optional).
method= "setOrder"The performed method.
id=<array>Contains the new order for the sub views that will be set in the QuadView. The format is an array <int>, <int>, <int>, <int> where the integers ranges in value from 1 to 4.

Return value - Success

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "setOrder",
  "data": {
    "id": [
      <int>,
      <int>,
      <int>,
      <int>
    ]
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="addText"The method that was performed.
data.id=<array>The ID echoed back in the format <int>, <int>, <int>, <int>.

Return value - Failure

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "setOrder",
  "error": {
    "code": <integer error code>,
    "message": <string>
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="setOrder"The method that was performed.
error.codeThe error code.
error.messageThe error message.

Error codes

See General error codes for a list of potential errors.

getQuadEyeValue

This API method can be used to return the status of both the quad view and overview whether it is active or not.

Request

Security level

Admin, operator

Method

POST

http://<servername>/axis-cgi/quadviewsetup.cgi
Request body syntax
{
  "apiVersion": "1.0",
  "context": "my context",
  "method": "getQuadEyeValue"
}
ParameterDescription
apiVersionThe API version that should be used.
context=<string>The user sets this value and the application echoes it back in the response (optional).
method="getQuadEyeValue"The performed method.

Return value - Success

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "getQuadEyeValue",
  "data": {
    "quadeye": <string>
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="addText"The method that was performed.
data.quadeye=<string>The string can be either true or false.

Return value - Failure

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "getQuadEyeValue",
  "error": {
    "code": <integer error code>,
    "message": <string>
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="getQuadEyeValue"The method that was performed.
error.codeThe error code.
error.messageThe error message.

Error codes

See General error codes for a list of potential errors.

setQuadEyeValue

This API method can be used to activate or deactivate the quad view and Overview.

Request

Security level

Admin, operator

Method

POST

http://<servername>/axis-cgi/quadviewsetup.cgi
Request body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "setQuadEyeValue",
  "params": {
    "quadeye": <boolean>
  }
}
ParameterDescription
apiVersionThe API version that should be used.
context=<string>The user sets this value and the application echoes it back in the response (optional).
method="setQuadEyeValue"The performed method.
quadeye=<boolean>Defines whether quadeye should be enabled or disabled.

Return value - Success

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "setQuadEyeValue",
  "data": {
    "quadeye": <string>
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="setQuadEyeValue"The method that was performed.
data.quadeye=<string>The string can be either true or false.

Return value - Failure

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "setQuadEyeValue",
  "error": {
    "code": <integer error code>,
    "message": <string>
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="setQuadEyeValue"The method that was performed.
error.codeThe error code.
error.messageThe error message.

Error codes

See General error codes for a list of potential errors.

getSupportedVersions

This API method can be used to retrieve a list of API versions that is available on your device.

Request

Security level

Operator

Method

POST

{
  "context": <string>,
  "method": "getSupportedVersions"
}
ParameterDescription
method="getSupportedVersions"The performed method.
context=<string>The user sets this value and the application echoes it back in the response (optional).

Return value - Success

HTTP code

200 OK

Content-type

text/json

Response body syntax
{
  "context": <string>,
  "method": "getSupportedVersions",
  "data": {
    "apiVersions": ["<Major1>.<Minor1>","<Major2>.<Major2>"]
  }
}
ParameterDescription
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="getSupportedVersions"The method that was performed.
data.apiVersions[]=<list of versions>Lists all supported major versions along with their highest supported minor version.
<list of versions>List of “<Major>.<Minor>” versions, e.g. [”1.4”, “2.5”].

Return value - Failure

HTTP code

200 OK

Content-type

application/json

Response body syntax
{
  "apiVersion": "<Major>.<Minor>",
  "context": <string>,
  "method": "getSupportedVersions",
  "error": {
    "code": <integer error code>,
    "message": <string>
  }
}
ParameterDescription
apiVersionThe API version that was used.
context=<string>A text string that will be echoed back if it was provided by the client in the corresponding request (optional).
method="getSupportedVersions"The method that was performed.
error.codeThe error code.
error.messageThe error message.

Error codes

See General error codes for a list of potential errors.

General error codes

CodeDescription
1100Internal error
2100API version not supported
2101Invalid JSON
2102Method not supported
2103Required parameter missing
2104Invalid parameter value specified