Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
    "method": "axxonsoft.bl.config.ConfigurationService.ChangeConfig",
    "data": {
        "added": [
            {
                "uid": "hosts/Server1",
                "units": [
                    {
                        "type": "MultimediaStorage",
                        "properties": [
                            {
                                "id": "color",
                                "value_string": "Pinkdisplay_name",
                                "properties": []
                            },
                            {
                                "id": "display_name",
                                "value_string": "Pink",
                                "properties": []
                            }
                        ],
                        "units": [],
                        "opaque_params": []
                    }
                ],
                "opaque_params": []
Object storage"
                }
        ]
    }
}

where

  • uid - Server on which the archive is created;
  • units - properties.

Adding an archive file

Code Block
{
    "method": "axxonsoft.bl.config.ConfigurationService.ChangeConfig",
    "data": {
        "added": [
            {
                "uid": "hosts/Server1/MultimediaStorage.Red",
                "units": [
                    {
                        "type": "ArchiveVolume",
                        "properties": [
                            {
                                "id": "volume_typecolor",
                                "properties": [
                                    {
                                        "id": "file_name",
                                        "value_string": "D:/archiveRed.afs"
                                    }
                                ],
                                "value_string": "localAliceBlue"
                            },
                            {
                                "id": "filestorage_sizetype",
                                "value_int32": 21
                            },
                            {]
                                "id": "format",}
                                "value_bool": true
               ]
             }
                        ]],
                    }
                ]"changed": [],
            }
        "removed": []
    }
}

Linking a camera to archive

Creating an ArchiveContext with constant recording:

where

  • uid - Server on which the archive is created;
  • units - properties;
  • storage_type - archive type: 0 - standard archive; 1 - cloud archive. If the parameter is not explicitly specified, then a standard archive is created.

Creating an archive volume

Possible ArchiveVolume parameters in the properties section:

ParameterDescription
formattrue if it is necessary to format the created volume. The default is false.
volume_size_gbVolume size in GB. Applicable if format = true.
auto_mounttrue - if it is necessary to mount the created volume. The default is false.
labelVolume label
max_block_size_mbMaximum block size in MB. The default is 64, the range of valid values is [16; 512].
optimal_read_size_mbOptimal size of blocks reading in MB. The default is 4, the range of valid values is [1; max_block_size_mb / 2].
incoming_buffer_size_mbThe incoming buffer size in MB. The default is 3 * max_block_size_mb. The minimum value should be greater than 2 * max_block_size_mb.
block_flush_period_secondsBlock recording period in seconds. The default is 60, the range of valid values is [30; 300].
index_snapshot_max_block_distanceThe maximum number of blocks between indexing operations. The default is 256, the minimum is 16.
sequence_flush_period_secondsSequences recording period in seconds. The default is 60, the minimum is 32.

At the ArchiveVolume level, the connection_params property is also added, with the following parameters:

ParameterIs requiredDescription
schema Yes

Volume type. Possible values:

file - local archive on the Server;

smb - network archive with an SMB protocol connection;

azure - archive in Microsoft Azure cloud storage.

Parameters for the file type:
pathYesThe path to the file/disk with the archive.
Parameters for the smb type:
hostYesName of the server with network repository.
smb_shareYesNetwork repository.
pathYesFolder in network repository, where the archive will be stored.
smb_domainNoNetwork repository domain.
userNoUser name.
passwordNoPassword.
Parameters for the azure type:
protocol YesConnection protocol: HTTP or HTTPS.
hostYesAzure server address.
access_keyYesAccess key in base64.
containerYesAzure container.
userYesUser name.
pathNoLocation of the volume folder in Azure.
portNoAzure server port.


Code Block
{
	
Code Block
{
    "method": "axxonsoft.bl.config.ConfigurationService.ChangeConfig",
    	"data": {
        		"added": [
            {
                			{
				"uid": "hosts/Server1/MultimediaStorage.YellowAliceBlue",
                				"units": [
                    {
                        					{
						"type": "ArchiveContextArchiveVolume",
                        						"properties": [
                            {
                                							{
								"id": "cameraconnection_refparams",
								"properties":                                [
									{
										"id": "schema",
										"value_string": "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0"
                            },
                            {
                                file"
									},
									{
										"id": "constant_recording",
                                "value_bool": true
                            },
                            {
                                path",
										"value_string": "D:/archiveCrimson1"
									}
								]
							},
							{
								"id": "prerecord_sec",
                                "value_int32": 0
                            },
                            {
                                label",
								"value_string": "Test archive"
							},
							{
								"id": "specificvolume_size_fpsgb",
                                								"value_doubleuint64": 0
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

The response will contain uid of the added ArchiveContext:

Code Block
{
    "failed4
							}
						]
					}
				]
			}
		],
		"changed": [],
    "added		"removed": [
        "hosts/Server1/MultimediaStorage.Yellow/ArchiveContext/b73f4b6c-2962-5d51-e9ee-ceb5420b4cd2"
    ]
}

...

]
	}
}

Changing an archive volume

To change the archive volume, the same parameters are used as when creating it.

Code Block
{
    	"method": "axxonsoft.bl.config.ConfigurationService.ChangeConfig",
    	"data": {
        		"added": [],
		"changed": [{
              
			{
				"uid": "hosts/Server1Node1/MultimediaStorage.Aqua/ArchiveContext/b73f4b6c-2962-5d51-e9ee-ceb5420b4cd2",
              "type": "ArchiveContext",
              AliceBlue/ArchiveVolume.d0305f4a-1a20-4b10-a132-605eff3269d7",
				"properties": [
					{
						"id": "connection_params",
						"properties": [
							{
								"id":                {
                  "schema",
								"value_string": "file"
							},
							{
								"id": "streaming_idpath",
                  								"value_string": "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0"
                }]
            }
        ]
    D:/archiveCrimson11"
							}
						]
					}
				]
			}
		],
		"removed": []
	}
}