Thermometry
The VAPIX® Thermometry API provides the information that makes it possible to configure the temperature monitoring functions on a temperature calibrated thermal camera:
- Isothermal palettes: Pixels colored differently depending on their temperature for an overview of the temperatures across the scene. You can choose between a number of palettes that can be either isothermal or non-isothermal. The chosen palette is stored in the parameter
Image.I0.Appearance.Palette
, which is used by the majority of thermal cameras, including those without thermometric capabilities. However, only thermometric cameras have isothermal palettes as an option, further detailed ingetIsothermLevels
andsetIsothermLevels
. Three temperature levels must be provided if an isothermal palette is chosen. These temperatures will be tied to three distinct colors in the palette. Temperatures between and outside of these levels will be linearly mapped to the colors of the palette. An image of the palette and the three levels can also be included in the video stream as an overlay. - Temperature detection areas: Defined numbers of polygon-shaped areas in which the temperature can be monitored. You are able to set a number of conditions that must be met before the alarm will trigger. For example, you are able to set a temperature limit that will trigger the alarm whenever the temperature goes above or below it. An alternative to the fixed threshold is setting a limit on how fast the temperature is allowed to increase or decrease. This means that you need to set a delay time (in seconds) before the alarm will trigger and if it will trigger on the highest, lowest or at an average temperature in the area. It is possible to include the areas as overlays in the video. The areas can also be tied to a preset on a mounted pan/tilt-device.
- Spot temperature measurement: A single spot in the image chosen to measure the temperature. There can only be one spot temperature, which will then be included in the video stream as an overlay.
Overview
The API implements thermometry.cgi
as its communications interface and supports the following methods:
Method | Description |
---|---|
getSupportedVersions | List supported API versions. |
getConfigurationCapabilities | Retrieve values to configure the functionality. |
setTemperatureScale | Set temperature scale. |
getIsothermLevels | Retrieve current isotherm levels. |
setIsothermLevels | Set isotherm levels. |
addArea | Add a new alarm area. |
updateArea | Update alarm area. |
removeAreas | Delete one or several areas. |
listAreas | List temperature areas. |
getAreaStatus | Retrieve the current status of active areas. |
addSpotTemperature | Adds the spot meter to new coordinates. |
getSpotTemperature | Retrieve a spot temperature. |
removeSpotTemperature | Remove the spot meter. |
getTgtConfiguration | Retrieve the thermometric guard tour configuration. |
setTgtConfiguration | Set the thermometric guard tour configuration. |
Identification
- API Discovery:
id=thermometry
Common examples
List supported API versions
This example will show you how to list the API versions that are supported by your device.
1. List supported API versions.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"context": "my context",
"method": "getSupportedVersions"
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getSupportedVersions",
"data": {
"apiVersions": [
"1.0"
]
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getSupportedVersions",
"error": {
"code": 1100,
"message": "Internal error."
}
}
See getSupportedVersions for additional details.
List thermometry configuration capabilities
This example will show you how to list the thermometric capabilities featured on your camera. It is useful when you want to set up the user interface without hard coded information or legacy parameters. The parameter maxNumberOfAreas
is used per each individual preset on PTZ cameras.
1. List thermometric capabilities.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "getConfigurationCapabilities",
"params": {
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getConfigurationCapabilities",
"data": {
"currentTemperatureScale": "celsius",
"minTemperature": -40,
"maxTemperature": 350,
"maxNumberOfAreas": 10,
"maxNumberOfVertices": 10,
"maxDelayTime": 300,
"defaultDelayTime": 5,
"maxNameLength": 60
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getConfigurationCapabilities",
"error": {
"code": 3000,
"message": "The requested API version is not supported."
}
}
See getConfigurationCapabilities for additional details.
Set temperature scale
This example will show you how to set the temperature scale to be either Celsius or Fahrenheit.
1. Set the temperature scale.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "setTemperatureScale",
"params": {
"unit": "fahrenheit"
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "setTemperatureScale",
"data": {
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "setTemperatureScale",
"error": {
"code": 2104,
"message": "Invalid parameter value."
}
}
See setTemperatureScale for additional details.
List isotherm levels
This example will show you how to list the current isotherm levels.
1. Retrieve the current isotherm levels.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "getIsothermLevels",
"params": {
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getIsothermLevels",
"data": {
"high": 100,
"middle": 50,
"low": 10,
"renderOverlay": true
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getIsothermLevels",
"error": {
"code": 2102,
"message": "Method not supported."
}
}
See getIsothermLevels for additional details.
Set isotherm levels
This example will show you how to colorize the image with an isothermal palette. The palette consists of the three temperature levels that were obtained in the previous example. The palette is chosen with the parameter Image.IO.Appearance.Palette
.
1. Set the active palette.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "setIsothermLevels",
"params": {
"high": 100,
"middle": 50,
"low": 10,
"renderOverlay": true
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "setIsothermLevels",
"data": {
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "setIsothermLevels",
"error": {
"code": 2104,
"message": "Invalid parameter: Levels not in correct order."
}
}
See setIsothermLevels for additional details.
Add a temperature detection area
This example will show you how to monitor the temperature of a selected area or object and set a temperature threshold. An alarm will be raised if the temperature goes outside of the limits defined by the threshold.
1. Add a new temperature area.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "addArea",
"params": {
"imagesource": 0,
"enabled": true,
"name": "Area 1",
"detectionType": "above",
"measurement": "average",
"threshold": 100,
"delay": 5,
"vertices": [[-0.5, -0.5], [0.5, -0.5], [0.5, 0.5], [-0.5, 0.5]],
"areaOverlay": "always",
"temperatureOverlay": true,
"presetNbr": 1
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "addArea",
"data": {
"id": 0
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "addArea",
"error": {
"code": 2103,
"message": "Required parameter missing."
}
}
See addArea for additional details.
Modify a temperature detection area
This example will show you how to modify the settings of a detection area.
1. Update an existing temperature area.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "updateArea",
"params": {
"id": 0,
"imagesource": 0,
"enabled": true,
"name": "Area 1",
"detectionType": "below",
"measurement": "minimum",
"threshold": 100,
"delay": 5,
"vertices": [[-0.5, -0.5], [0.5, -0.5], [0.5, 0.5], [-0.5, 0.5]],
"areaOverlay": "if_triggered",
"temperatureOverlay": true,
"presetNbr": 2
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "updateArea",
"data": {
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "updateArea",
"error": {
"code": 1000,
"message": "Invalid parameter value."
}
}
See updateArea for additional details.
Remove temperature detection areas
This example will show you how to remove one or more temperature areas.
1. Delete 3 temperature areas.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "removeAreas",
"params": {
"areas": [0, 1, 3]
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "removeAreas",
"data": {
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "removeAreas",
"error": {
"code": 1100,
"message": "Internal error."
}
}
See removeAreas for additional details.
List temperature detection areas
This example will show you how to list existing temperature areas and their individual settings.
1. Create a list.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "listAreas",
"params": {
"presetNbr": 0
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "listAreas",
"data": {
"areaList": [
{
"id": 0,
"imageSource": 0,
"enabled": true,
"name": "Area 1",
"detectionType": "below",
"measurement": "minimum",
"threshold": 100,
"delay": 5,
"position": [[-0.5, -0.5], [0.5, -0.5], [0.5, 0.5], [-0.5, 0.5]],
"areaOverlay": "if triggered",
"temperatureOverlay": true,
"presetNbr": 1
}
]
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "listAreas",
"error": {
"code": 2110,
"message": "User is not authorized to this request, permission denied."
}
}
See listAreas for additional details.
Check area status
This example will show you how to investigate the current status of the alarm areas.
1. Retrieve current status of the active areas.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "getAreaStatus",
"params": {
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getAreaStatus",
"data": {
"areaList": [
{
"id": 0,
"avg": 5,
"min": 0,
"max": 10,
"maxPos": [0.91, 0.12],
"minPos": [-0.63, -0.31],
"triggered": true
}
]
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getAreaStatus",
"error": {
"code": 1100,
"message": "Internal error."
}
}
See getAreaStatus for additional information.
Add a spot temperature
This example will show you how to activate the spot temperature for the given coordinates and render it as an overlay in the image.
1. Add a spot temperature.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "addSpotTemperature",
"params": {
"spotCoordinates": [0.37, -0.95],
"coordinateSystem": "coord_neg1_1"
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "addSpotTemperature",
"data": {}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "addSpotTemperature",
"error": {
"code": 1100,
"message": "Internal error."
}
}
See addSpotTemperature for additional information.
Check spot temperature
This example will show you how to check the temperature in the spot chosen with the addSpotTemperature
method.
1. Take the temperature for a spot-sized area.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "getSpotTemperature",
"params": {
"coordinateSystem": "coord_neg1_1"
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getSpotTemperature",
"data": {
"spotTemperature": 7,
"spotCoordinates": [-0.53, 0.45],
"renderOverlay": true
}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "getSpotTemperature",
"error": {
"code": 1100,
"message": "Internal error."
}
}
See getSpotTemperature for additional details.
Remove a spot temperature
This example will show you how to remove the spot temperature and disable the overlay.
1. Remove the spot temperature.
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.0",
"context": "my context",
"method": "removeSpotTemperature",
"params": {}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "removeSpotTemperature",
"data": {}
}
Error response example
{
"apiVersion": "1.0",
"context": "my context",
"method": "removeSpotTemperature",
"error": {
"code": 1100,
"message": "Internal error."
}
}
See removeSpotTemperature for additional details.
Get TGT configuration
This example will show you how to check the current thermometric guard tour settings.
1. Get TGT configuration:
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.1",
"context": "my context",
"method": "getTgtConfiguration",
"params": {}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.1",
"context": "my context",
"method": "getTgtConfiguration",
"data": {
"pauseOnAlarm": true,
"autoResume": true
}
}
Error response example
{
"apiVersion": "1.1",
"context": "my context",
"method": "getTgtConfiguration",
"error": {
"code": 1100,
"message": "Internal error."
}
}
See getTgtConfiguration for additional details.
Set TGT configuration
This example will show you how to change the thermometric guard tour settings.
1. Set TGT configuration:
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "1.1",
"context": "my context",
"method": "setTgtConfiguration",
"params": {
"pauseOnAlarm": true,
"autoResume": true
}
}
2. Parse the JSON response.
Successful response example
{
"apiVersion": "1.1",
"context": "my context",
"method": "setTgtConfiguration",
"data": {}
}
Error response example
{
"apiVersion": "1.1",
"context": "my context",
"method": "setTgtConfiguration",
"error": {
"code": 1100,
"message": "Internal error."
}
}
See setTgtConfiguration for additional details.
API specifications
getSupportedVersions
This method should be used when you want to list all API versions supported by your device. The list will consist of all supported major versions along with their highest supported minor version.
Request
- Security level: Operator
- Method:
POST
- Content-Type:
application/json
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"context": <string>,
"method": "getSupportedVersions"
}
Parameter | Description |
---|---|
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="getSupportedVersions" | The method that should be used. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getSupportedVersions",
"data": {
"apiVersions": [ "<Major1>.<Minor1>", "<Major2>.<Minor2>", ... ]
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getSupportedVersions" | The requested method. |
apiVersions[]=<list of versions> | A list containing all supported API versions along with their highest supported minor version. |
Return value - Failure
- HTTP code:
400 Bad Request
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getSupportedVersions",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getSupportedVersions" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
getConfigurationCapabilities
This method should be used when you want to list the thermometric limits and values for the configuration values on your device.
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getConfigurationCapabilities"
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="getConfigurationCapabilities" | The method that should be used. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getConfigurationCapabilities",
"data": {
"currentTemperatureScale": <string>,
"minTemperature": <int>,
"maxTemperature": <int>,
"maxNumberOfAreas": <int>,
"maxNumberOfVertices": <int>,
"maxDelayTime": <int>,
"defaultDelayTime": <int>,
"maxNameLength": <int>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getConfigurationCapabilities" | The requested method. |
currentTemperatureScale="celsius" | "fahrenheit" | The current temperature scale. Can be either Celsius or Fahrenheit. |
minTemperature=<int> | The minimum temperature possible to measure with the current temperature scale. |
maxTemperature=<int> | The maximum temperature possible to measure with the current temperature scale. |
maxNumberOfAreas=<int> | The maximum number of areas that can be defined. |
maxNumberOfVertices=<int> | The maximum number of vertices that an alarm area can have. |
maxDelayTime=<int> | The maximum delay time, measured in seconds. |
defaultDelayTime=<int> | The default delay time, measured in seconds. |
maxNameLength=<int> | The maximum number of characters you can use for an area name. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getConfigurationCapabilities",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getConfigurationCapabilities" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
setTemperatureScale
This method should be used when you want to set the temperature scale on your device to measure in either Celsius (default) or Fahrenheit. Please note that the current temperature scale is called by the method getConfigurationCapabilities
.
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setTemperatureScale"
"params": {
"unit": "celsius" | "fahrenheit"
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="setTemperatureScale" | The method that should be used. |
unit="celsius" | "fahrenheit" | The temperature scale that should be used. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setTemperatureScale",
"data": {
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="setTemperatureScale" | The requested method. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setTemperatureScale",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="setTemperatureScale" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
2104 | Unit is neither Celsius nor Fahrenheit |
getIsothermLevels
This method should only be used together with isothermal palettes, which always have names that begins with "Iso-". Available palettes and their current value are given by the parameter Image.IO.Appearance.Palette
, and fetched with the param.cgi
. More information is available in Parameter management.
This method returns the three temperature levels that have been set as fixed on the color scale as well as if the palette overlay is active or not.
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getIsothermLevels"
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="getIsothermLevels" | The method that should be used. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getIsothermLevels",
"data": {
"high": <int>,
"middle": <int>,
"low": <int>,
"renderOverlay": <boolean>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getIsothermLevels" | The requested method. |
high=<int> | The highest temperature level on the temperature color scale. |
middle=<int> | The middle temperature level on the temperature color scale. |
low=<int> | The lowest temperature level on the temperature color scale. |
renderOverlay=<boolean> | true if the chosen color palette is included in the video stream. The three isotherm levels will be marked on the palette. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getIsothermLevels",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getIsothermLevels" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
setIsothermLevels
This method should only be used when you want to set the isothermal levels for the three isothermal palettes. The request action=update&root.Image.IO.Appearance.Palette=<name>
should be used by param.cgi
to set the palette that should be used. All isothermal palettes have names that start with "Iso-". More information is available in Parameter management.
The three temperature levels tied to three colors on the temperature color scale must be set before the isotherm functions can be used. These levels must be unique and set in rising order from lowest to highest. getConfigurationCapabilities
is used to check the current temperature scale. The palette can be included in the video stream as an overlay.
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setIsothermLevels"
"params": {
"high": <int>,
"middle": <int>,
"low": <int>,
"renderOverlay": <boolean>
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="setIsothermLevels" | The method that should be used. |
high=<int> | The highest temperature level on the temperature color scale. |
middle=<int> | The middle temperature level on the temperature color scale. |
low=<int> | The lowest temperature level on the temperature color scale. |
renderOverlay=<boolean> | The color palette chosen to be included in the video stream. The three isotherm levels are marked on the palette. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setIsothermLevels",
"data": {
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="setIsothermLevels" | The requested method. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setIsothermLevels",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="setIsothermLevels" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
2104 | Invalid parameter: Levels not in correct order |
addArea
This method should be used when you want to add a new temperature detection area. The area is a polygon given as a set of coordinates in consecutive order where no edges may cross each other. Additionally, a number of conditions must be provided for when an alarm should be triggered. The maximum number of areas per preset is given by the method getConfigurationCapabilities
.
Request
- Security level: Administrator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "addArea"
"params": {
"imagesource": <int>,
"enabled": <boolean>,
"name": <string>,
"detectionType": <string>,
"measurement": <string>,
"threshold": <int>,
"delay": <int>,
"vertices": [[<float>, <float>],...],
"areaOverlay": <string>,
"temperatureOverlay": <boolean>,
"presetNbr": <int>
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="addArea" | The method that should be used. |
imagesource=<int> | The image source for the area. |
enabled=<boolean> | Enables the area monitoring if true . |
name=<string> | The area name. The maximum length is given by getConfigurationCapabilities . |
detectionType="above" | "below" | "increase" | "decrease" | The detection type - above and below : The alarm will trigger if the value goes above or below the threshold value.- increase and decrease : Monitors the change rate of the temperature. The alarm will trigger if the temperature increases or decreases faster than the threshold value divided by the delay time. |
measurement="maximum" | "minimum" | "average" | The area value. The alarm will trigger depending on the maximum, minimum or average temperature in the area. |
threshold=<int> | The temperature value that activates the trigger. This is the temperature change during the delay time and must be positive for the increase and decrease detection types. The allowed range is given by the method getConfigurationCapabilities . |
delayTime=<int> | The number of seconds the trigger condition must be true before an alarm is triggered. If the delay time is zero the alarm will activate immediately when the trigger conditions are met. This is the time during which the temperature must have changed with the threshold value to trigger the alarm for the increase and decrease detection types. Both the maximum and default delay time is given in the method getConfigurationCapabilities . |
vertices=Array of coordinates | The vertices of the polygon, given as an array of its x and y coordinates [x, y]. All vertices must be unique and the edges of the polygon can not cross each other. The coordinates are normalized to the size of the image and spans from -1 to 1 in both the horizontal and vertical direction. This means that the upper right corner has the coordinates [1, 1], while the lower left corner has the coordinates [-1, -1]. The coordinates must always be given for an image that is neither rotated or mirrored. The minimum number of vertices in a polygon is 3, the maximum is given by the method getConfigurationCapabilities . |
areaOverlay="none" | "always" | "if_triggered" | Tells if and when the area should be included in the video stream and visible on recordings. The overlay color will change from green to red if the alarm is triggered. |
temperatureOverlay=<boolean> | Indicates if the temperature of the area should be shown, but only when the area overlay is visible. The chosen measurement value is shown. |
presetNbr=<int> | The preset number for the area. Will be ignored on non PTZ cameras and must be an existing preset number for PTZ cameras. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "addArea",
"data": {
"id": <int>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="addArea" | The requested method. |
id=<int> | The area id. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "addArea",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="addArea" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
1200 | Maximum amount of areas in preset reached |
updateArea
This method should be used when you want to update an existing area.
Request
- Security level: Administrator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "updateArea"
"params": {
"id": <int>,
"imagesource": <int>,
"enabled": <boolean>,
"name": <string>,
"detectionType": <string>,
"measurement": <string>,
"threshold": <int>,
"delay": <int>,
"vertices": [[<float>, <float>],...],
"areaOverlay": <string>,
"temperatureOverlay": <boolean>,
"presetNbr": <int>
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="updateArea" | The method that should be used. |
id=<int> | The area ID. |
imagesource=<int> | The image source for the area. |
enabled=<boolean> | Enables the area monitoring if true . |
name=<string> | The area name. The maximum length is given by getConfigurationCapabilities . |
detectionType="above" | "below" | "increase" | "decrease" | The detection type - above and below : The alarm will trigger if the value goes above or below the threshold value.- increase and decrease : Monitors the change rate of the temperature. The alarm will trigger if the temperature increases or decreases faster than the threshold value divided by the delay time. |
measurement="maximum" | "minimum" | "average" | The area value. The alarm will trigger depending on the maximum, minimum or average temperature in the area. |
threshold=<int> | The temperature value that activates the trigger. This is the temperature change during the delay time and must be positive for the increase and decrease detection types. The allowed range is given by the method getConfigurationCapabilities . |
delayTime=<int> | The number of seconds the trigger condition must be true before an alarm is triggered. If the delay time is zero the alarm will activate immediately when the trigger conditions are met. This is the time during which the temperature must have changed with the threshold value to trigger the alarm for the increase and decrease detection types. Both the maximum and default delay time is given in the method getConfigurationCapabilities . |
vertices=Array of coordinates | The vertices of the polygon, given as an array of it x and y coordinates [x, y]. All vertices must be unique and the edges of the polygon can not cross each other. The coordinates are normalized to the size of the image and spans from -1 to 1 in both the horizontal and vertical direction. This means that the upper right corner has the coordinates [1, 1], while the lower left corner has the coordinates [-1, -1]. The coordinates must always be given for an image that is neither rotated or mirrored. The minimum number of vertices in a polygon is 3, the maximum is given by the method getConfigurationCapabilities . |
areaOverlay="none" | "always" | "if_triggered" | Tells if and when the area should be included in the video stream and visible on recordings. The overlay color will change from green to red if the alarm is triggered. |
temperatureOverlay=<boolean> | Indicates if the temperature of the area should be shown, but only when the area overlay is visible. The chosen measurement value is shown. |
presetNbr=<int> | The preset number for the area. Will be ignored on non PTZ cameras and must be an existing preset number for PTZ cameras. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "updateArea",
"data": {
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="updateArea" | The requested method. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "updateArea",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="updateArea" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
1201 | Could not update area. |
removeAreas
This method should be used when you want to remove specified areas.
Request
- Security level: Administrator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "removeAreas"
"params": {
"areas": [<int>, <int>, ...]
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="removeAreas" | The method that should be used. |
params.areas=[<int>, <int>, ...] | ID:s of the areas that should be removed. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "removeAreas",
"data": {
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="removeAreas" | The requested method. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "removeAreas",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="removeAreas" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
2104 | No areas specified |
2104 | Area could not be found |
listAreas
This method should be used when you want to list all temperature detection areas for a provided preset number. All areas will be returned for all presets if the preset number is set to 0.
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "listAreas"
"params": {
"presetNbr": <int>
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="listAreas" | The method that should be used. |
params.presetNbr=<integer> | The preset number for which the temperature areas will be returned. All areas for all presets are returned if the number is 0. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "listAreas",
"data": {
"areaList": [
{
"id": <int>,
"imagesource": <int>,
"enabled": <boolean>,
"name": <string>,
"detectionType": <string>,
"measurement": <string>,
"threshold": <int>,
"delay": <int>,
"position": [[<float>, <float>],...],
"areaOverlay": <string>,
"temperatureOverlay": <boolean>,
"presetNbr": <int>
}, ...
]
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="listAreas" | The requested method. |
id=<int> | The area ID. |
imagesource=<int> | The image source for the area. |
enabled=<boolean> | Enables the area monitoring if true . |
name=<string> | The area name. The maximum length is given by getConfigurationCapabilities . |
detectionType="above" | "below" | "increase" | "decrease" | The detection type - above and below : The alarm will trigger if the value goes above or below the threshold value.- increase and decrease : Monitors the change rate of the temperature. The alarm will trigger if the temperature increases or decreases faster than the threshold value divided by the delay time. |
measurement="maximum" | "minimum" | "average" | The area value. The alarm will trigger depending on the maximum, minimum or average temperature in the area. |
threshold=<int> | The temperature value that activates the trigger. This is the temperature change during the delay time and must be positive for the increase and decrease detection types. The allowed range is given by the method getConfigurationCapabilities . |
delayTime=<int> | The number of seconds the trigger condition must be true before an alarm is triggered. If the delay time is zero the alarm will activate immediately when the trigger conditions are met. This is the time during which the temperature must have changed with the threshold value to trigger the alarm for the increase and decrease detection types. The maximum delay time is given in the method getConfigurationCapabilities . |
vertices=Array of vertices | The vertices of the polygon, given as an array of it x and y coordinates [x, y]. All vertices must be unique and the edges of the polygon can not cross each other. The coordinates are normalized to the size of the image and spans from -1 to 1 in both the horizontal and vertical direction. This means that the upper right corner has the coordinates [1, 1], while the lower left corner has the coordinates [-1, -1]. The coordinates must always be given for an image that is neither rotated or mirrored. The minimum number of vertices in a polygon is 3, the maximum is given by the method getConfigurationCapabilities . |
areaOverlay="none" | "always" | "if_triggered" | Tells if and when the area should be included in the video stream and visible on recordings. The overlay color will change from green to red if the alarm is triggered. |
temperatureOverlay=<boolean> | Indicates if the temperature of the area should be shown, but only when the area overlay is visible. The chosen measurement value is shown. |
presetNbr=<int> | The preset number for the area. Will be ignored on non PTZ cameras and must be an existing preset number for PTZ cameras. |
Return value - Failure
- HTTP code:
400 Bad request
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "listAreas",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="listAreas" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
getAreaStatus
This method should be used when you want to return the current temperature and trigger status of the active areas.
PTZ cameras will return either the status for the active areas on the current preset, or an empty status if not on preset positions
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getAreaStatus"
"params": {
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="getAreaStatus" | The method that should be used. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getAreaStatus",
"data": {
"areaList": [
{
"id": <int>,
"avg": <int>,
"min": <int>,
"max": <int>,
"minCoordinates": [<float, float>],
"maxCoordinates": [<float, float>],
"triggered": <boolean>,
}, ...
]
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getAreaStatus" | The requested method. |
id=<int> | The area ID. |
avg=<int> | The average temperature of the area. |
min=<int> | The minimum temperature of the area. |
max=<int> | The maximum temperature of the area. |
minCoordinates=[<float, float>] | The coordinates for the minimum temperature. Only the first found pixel with this temperature is returned. |
maxCoordinates=[<float, float>] | The coordinates for the maximum temperature. Only the first found pixel with this temperature is returned. |
triggered=<boolean> | Tells if the area alarm has been triggered. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getAreaStatus",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getAreaStatus" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
1200 | Could not get status for areas |
addSpotTemperature
This method should be used when you want to activate the spot meter for the coordinates in the given coordinate system. Only one spotTemperature
will be replaced will be replaced when a new one is called for.
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "addSpotTemperature",
"params": {
"spotCoordinates": [<float, float>],
"coordinateSystem": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="addSpotTemperature" | The method that should be used. |
params.spotCoordinates=Array of coordinates | The coordinates of the pixel of interest. |
params.coordinateSystem=<"coord_neg1_1" | "coord_0_1"> | The coordinate system for the given coordinates. Possible values are: - coord_neg1_1 : The point of origin is placed in the middle of the image, with coordinates going from -1 to 1 and increases from left to right or bottom to top of the image.:- coord_0_1 : The point of origin is located in the upper left corner of the image, with coordinates going from 0 to 1. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "addSpotTemperature",
"data": {
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="addSpotTemperature" | The requested method. |
Return value - Failure
- HTTP code:
4xx/5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "addSpotTemperature",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="addSpotTemperature" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
1203 | Could not add spot temperature. |
2202 | Coordinates out of range. |
2202 | Coordinate system not supported. |
getSpotTemperature
This method should be used when you want to check the temperature in the spot set by the method addSpotTemperature
.
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getSpotTemperature",
"params": {
"coordinateSystem": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="getSpotTemperature" | The method that should be used. |
params.coordinateSystem=<"coord_neg1_1" | "coord_0_1"> | The coordinate system for the spot meter. Possible values are: - coord_neg1_1 : The point of origin is placed in the middle of the image, with coordinates going from -1 to 1 and increases from left to right or bottom to top of the image.:- coord_0_1 : The point of origin is located in the upper left corner of the image, with coordinates going from 0 to 1. The chosen coordinate system does not need to be the same as the one used in addSpotTemperature . |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getSpotTemperature",
"data": {
"spotTemperature": <float>,
"spotCoordinates": [<float>, <float>],
"renderOverlay": <boolean>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getSpotTemperature" | The requested method. |
data.spotTemperature=<float> | The current temperature in the given coordinates. |
data.spotCoordinates=Array of coordinates | The x and y coordinates of the spot temperature. |
data.renderOverlay=<boolean> | If the spot meter overlay has been activated or not. |
Return value - Failure
- HTTP code: ``
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method":
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getSpotTemperature" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
1203 | Could not fetch spot temperature. |
2202 | Coordinate system not supported. |
removeSpotTemperature
This method should be used when you want to remove the rendering of the spot meter.
Request
- Security level: Operator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "removeSpotTemperature"
"params": {}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="removeSpotTemperature" | The method that should be used. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "removeSpotTemperature",
"data": {}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="removeSpotTemperature" | The requested method. |
Return value - Failure
- HTTP code:
400 Bad request
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "removeSpotTemperature",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="removeSpotTemperature" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
1203 | Could not remove spot meter. |
getTgtConfiguration
This method should be used when you want to retrieve the current configuration of the thermometric guard tour.
Request
- Security level: Administrator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getTgtConfiguration"
"params": {}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="getTgtConfiguration" | The method that should be used. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getTgtConfiguration",
"data": {
"pauseOnAlarm": <boolean>,
"autoResume": <boolean>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getTgtConfiguration" | The requested method. |
pauseOnAlarm=<boolean> | The guard tour is paused on the preset when an event is active. |
autoResume=<boolean> | Only valid if pauseOnAlarm is true. The guard tour will resume automatically after the event becomes inactive. It must be restarted manually otherwise. |
Return value - Failure
- HTTP code:
4xx / 5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "getTgtConfiguration",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="getTgtConfiguration" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
1202 | Method not supported: No guard tour settings available since camera is fixed. |
setTgtConfiguration
This method should be used when you want to set the thermometric guard tour configuration.
Request
- Security level: Administrator
- Method:
POST
http://<servername>/axis-cgi/thermometry.cgi
JSON input parameters
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setTgtConfiguration"
"params": {
"pauseOnAlarm": <boolean>,
"autoResume": <boolean>
}
}
Parameter | Description |
---|---|
apiVersion | The API version that should be used. |
context=<string> | The user sets this value and the application echoes it back in the response (optional). |
method="setTgtConfiguration" | The method that should be used. |
pauseOnAlarm=<boolean> | The guard tour is paused on the preset when an event is active. |
autoResume=<boolean> | Only valid if pauseOnAlarm is true. The guard tour will resume automatically after the event becomes inactive. It must be restarted manually otherwise. |
Return value - Success
- HTTP code: 200 OK
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setTgtConfiguration",
"data": {}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="setTgtConfiguration" | The requested method. |
Return value - Failure
- HTTP code:
4xx / 5xx
- Content-Type:
application/json
Response body syntax
{
"apiVersion": "<Major>.<Minor>",
"context": <string>,
"method": "setTgtConfiguration",
"error": {
"code": <integer error code>,
"message": <string>
}
}
Parameter | Description |
---|---|
apiVersion | The API version returned from the request. |
context=<string> | The context set by the user in the request (optional). |
method="setTgtConfiguration" | The requested method. |
code=<integer> | The error code. |
message=<string> | The message corresponding to the error code. |
Error codes
See General error codes for a complete list of potential errors.
Code | Description |
---|---|
1202 | Method not supported: No guard tour settings available since camera is fixed. |
Temperature area event
This event will be true
if all conditions for an area is fulfilled.
- Topic:
tns1:VideoSource/tns1:RadiometryAlarm/tnsaxis:TemperatureDetection
- Type: Stateful
- Nice name:
Temperature Area Alarm
Field name | Type | Nice name | Description | Values |
---|---|---|---|---|
AreaID | Integer | Area ID | The temperature alarm area. | 0..maxAreas-1 |
AlarmActive (STATE) | Boolean | Alarm Activated | True when active. | true/false |
AreaName | String | Area Name | Name of the area. | Max 60 characters |
PresetNbr | Integer | Preset Token | The preset number that the area belongs to. Only present for PTZ-enabled cameras. | 1..maxPresetNbr |
AverageTemp | Float | Average Temperature | The average area temperature. | -40..700 |
MaximumTemp | Float | Maximum Temperature | The maximum area temperature. | -40..700 |
MinimumTemp | Float | Minimum Temperature | The minimum area temperature. | -40..700 |
TemperatureUnit | String | Temperature Unit | The used temperature unit. | Celsius or Fahrenheit |
MaxTempPositionX | Float | Maximum Temperature X Position | The X coordinate for maximum temperature. | -1..1 |
MaxTempPositionY | Float | Maximum Temperature Y Position | The Y coordinate for maximum temperature. | -1..1 |
MinTempPositionX | Float | Minimum Temperature X Position | The X coordinate for minimum temperature. | -1..1 |
MinTempPositionY | Float | Minimum Temperature Y Position | The Y coordinate for minimum temperature. | -1..1 |
Temperature Any Area Event
The Temperature Any Area Event is true if the conditions for any area is fulfilled.
- Topic:
tns1:VideoSource/tns1:RadiometryAlarm/tnsaxis:TemperatureDetectionAnyArea
- Type: Stateful
- Nice name:
Temperature Any Area Alarm
Field name | Type | Nice name | Description | Values |
---|---|---|---|---|
AreaName | String | Area Name | AnyArea | Max 60 characters |
AlarmActive (STATE) | Boolean | AlarmActivated | True when active, otherwise false | true/false |
Temperature Any Area On Preset Event
The Temperature Any Area On Preset Event is assigned to a unique preset position. The event is true if the conditions for any area on the selected preset is fulfilled.
- Topic:
tns1:VideoSource/tns1:RadiometryAlarm/tnsaxis:TemperatureDetectionAnyAreaOnPreset
- Type: Stateful
- Nice name:
Temperature Any Area On Preset Alarm
Field name | Type | Nice name | Description | Values |
---|---|---|---|---|
PresetNbr | Integer | Preset Token | The preset number that the area belongs to. Only present on PTZ-enabled cameras. | 1..maxPresetNbr |
AlarmActive (STATE) | Boolean | Alarm Activated | True when active, otherwise false. | true/false |
AreaName | String | Area Name | AnyAreaOnPreset | Max 60 characters |
Temperature information event
This event is uniquely assigned to an area. An update event is sent to each existing area every 30 seconds.
- Topic:
tns1:VideoSource/tns1:Thermometry/tnsaxis:TemperatureDetection
- Type: Stateless
- Nice name:
Temperature Detection
Field name | Type | Nice name | Description | Values |
---|---|---|---|---|
AreaID | Integer | Area ID | The temperature alarm area. | 0..maxAreas-1 |
AreaName | String | Area Name | Name of the area. | Max 60 characters |
PresetNbr | Integer | Preset Token | The preset number that the area belongs to. Only present for PTZ-enabled cameras. | 1..maxPresetNbr |
AverageTemp | Float | Average Temperature | The average area temperature. | -40..700 |
MaximumTemp | Float | Maximum Temperature | The maximum area temperature. | -40..700 |
MinimumTemp | Float | Minimum Temperature | The minimum area temperature. | -40..700 |
TemperatureUnit | String | Temperature Unit | The used temperature unit. | Celsius or Fahrenheit |
MaxTempPositionX | Float | Maximum Temperature X Position | The X coordinate for maximum temperature. | -1..1 |
MaxTempPositionY | Float | Maximum Temperature Y Position | The Y coordinate for maximum temperature. | -1..1 |
MinTempPositionX | Float | Minimum Temperature X Position | The X coordinate for minimum temperature. | -1..1 |
MinTempPositionY | Float | Minimum Temperature Y Position | The Y coordinate for minimum temperature. | -1..1 |
General error codes
The following table consist of errors that may occur for any method. Errors specific to a method are listed under their separate API description. The error codes exist in the following ranges.
-
1100–1199
Generic error codes common for many APIs and reserved for server errors such as "Maximum number of configurations reached". The actual cause can be seen in the server log and can sometimes be solved by restarting the device.
-
1200–1999
API-specific server errors that may collide between different APIs.
-
2100–2199
Generic error codes common to many APIs and reserved for client errors such as "Invalid parameter". These errors should be possible to solve by changing the input data to the API.
-
2200–2999
API-specific client errors that may collide between different APIs.
The 4–digit error codes are returned in the JSON body when the service is executed, which means that the client must be prepared to handle transport-level errors codes with non-JSON responses. Specifically, HTTP error 401/403 will be emitted if either authentication or authorization fails.
JSON code | HTTP code | Description |
---|---|---|
1100 | 500 | Internal error.([^1]) |
2100 | 400 | API version not supported. |
2101 | 400 | Invalid JSON format. |
2102 | 400 | Method not supported. |
2103 | 400 | Required parameter missing. |
2104 | 400 | Invalid parameter value specified. |
2105 | 400 | Invalid arguments |
2106 | 400 | Invalid request method |
2107 | 400 | Invalid content length |
2108 | 400 | Invalid content type |
2109 | 403 | Authorization failed |
2110 | 401 | Authentication failed |
[1]: Out-of-memory errors will also be reported as 1100 Internal error.