Basic device info
This API is based on the Device Configuration API framework. For guidance on how to use these APIs, please refer to Device Configuration APIs.
The VAPIX® Basic device info API makes it possible to turn on/off anonymous access to a set of Basic Device Info properties on the device.
The access to these properties is currently only possible via the /axis-cgi/basicdeviceinfo.cgi.
Authentication
For detailed information on how to authenticate requests to this API, please refer to Authentication.
Use cases
Get root entity
Here is an example on how to get the root entity.
Example
- curl
- HTTP
curl --request GET \
--anyauth \
--user "<username>:<password>" \
"http://<servername>/config/rest/basic-device-info/v2"
GET /config/rest/basic-device-info/v2
Host: <servername>
Response:
200 OK
Content-Type: application/json
{
"status": "success",
"data": {
"allowAnonymous": false
}
}
Enable anonymous users to access Basic Device Info
Set the property basic-device-info.v2.allowAnonymous to true. This will enable anonymous access. Set it to false to turn off anonymous access. This setting is enabled by default.
Example
- curl
- HTTP
curl --request PATCH \
--anyauth \
--user "<username>:<password>" \
--header "Content-Type: application/json" \
"http://<servername>/config/rest/basic-device-info/v2/allowAnonymous" \
--data '{
"data": {
"allowAnonymous": true
}
}'
PATCH /config/rest/basic-device-info/v2/allowAnonymous
Host: <servername>
Content-Type: application/json
{
"data": {
"allowAnonymous": true
}
}
200 OK
Content-Type: application/json
{
"status": "success"
}
Get the state of anonymous user access
Retrieve the property basic-device-info.v2.allowAnonymous. When true, then anonymous access is activated. When false, anonymous access has been deactivated.
Example
- curl
- HTTP
curl --request GET \
--anyauth \
--user "<username>:<password>" \
--header "Content-Type: application/json" \
"http://<servername>/config/rest/basic-device-info/v2/allowAnonymous"
GET /config/rest/basic-device-info/v2/allowAnonymous
Host: <servername>
Content-Type: application/json
200 OK
Content-Type: application/json
{
"status": "success",
"data": true
}
Structure
basic-device-info.v2 (Root Entity)
├── allowAnonymous (Property)
Entities
basic-device-info.v2 (Entity)
- Description: Basic Device Info Root Entity
- Type: Singleton
- Operations
Get
- Attributes
- Dynamic Support: No
Properties
allowAnonymous
- Description: Allow anonymous users to access the get properties functions
- Datatype: boolean
- Operations
Get(Permissions: admin, operator, viewer)Set(Permissions: admin)
- Attributes
- Nullable: No
- Dynamic Support: No / Dynamic Enum: No / Dynamic Range: No
Actions
This entity has no actions.