Skip to content

deactivate multiple virtualports at once #310

Closed Answered by vivekatoffice
DerAffenkoenig asked this question in VAPIX
Discussion options

You must be logged in to vote

Hi @DerAffenkoenig ,
I don't think there is any API available currently to merge all port activation and deactivation from single API.

VAPIX documentation for Virtual input API

You can try to this using script or batch file like below:

Activate_20_virtual_inputs.sh

#!/bin/bash


for ((i=1; i <= 20; i++))
do 
    echo "$i"
    curl -s --anyauth -u "root:pass" "http://169.254.212.55/axis-cgi/virtualinput/activate.cgi?schemaversion=1&port=$i"
done

Deactivate_20_virtual_inputs.sh

#!/bin/bash


for ((i=1; i <= 20; i++))
do 
    echo "$i"
    curl -s --anyauth -u "root:pass" "http://169.254.212.55/axis-cgi/virtualinput/deactivate.cgi?schemaversion=1&port=$i"
done

Output:

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by vivekatoffice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
VAPIX
Labels
None yet
2 participants