How to Create and Delete License Keys
Authorization
The Superadmin API is using a certificate for authorization. First, you will need to generate the private key and the CSR key (Certificate Issue Request). If necessary, we can generate it ourselves.
openssl req -new -newkey rsa:4096 -nodes -keyout company.key -out company.csr
Then you need to send VXG team the CSR to issue the certificate. In response, we will send the certificate (company.crt
). If the key was generated on our side, we will also send the private key.
How to create a license key (user)
Example:
curl -X POST \
--key ./company.key\
--cert ./company.crt\
-k\
https://ip:9000/api/v2/admin/users/\
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "{ \"suid\": \"user_id\", \"usrc\": \"Company_name\", \"license_key\": {\"value\": \"LICENSEKEY\"}, \" limits\": {\"hosted_cameras\": 100} }"
where:
usrc
- unique ID of the company, bound to the certificate (company.crt
). Each usrc
requires its own certificate + key pair. Can consist of alphabetic letters and numbers;suid
- unique user ID, can consist of alphabetic letters and numbers;license_key/value
- user license key (LKey
) for controlling cameras, is used in Admin API authorization;license_key/expire
- date when the license key expires (for example: 2021-07-09T10:11:10);limits/total_cameras
- how many cameras of all types the user can create (unlimited if not specified);limits/hosted_cameras
- how many hosted cameras (via Onvif or RTSP links) a user can create;email
- user's email;first_name
- username;last_name
- last name of the user;name
- full username;preferred_name
- preferred name.
Response example:
{
"date_joined": "2021-07-08T05:42:48.634454",
"email": "",
"first_name": "",
"id": 10,
"last_name": "",
"license_key": {
"expire": "2021-07-09T10:11:10",
"value": "COMPANY222"
},
"limits": {
"hosted_cameras": 100,
"total_cameras": null
},
"name": "",
"preferred_name": "",
"suid": "test_suid2",
"use": {
"hosted_cameras": 0,
"total_cameras": 0
},
"usrc": "amazon"
}
How to delete a license key (user)
Example:
where {USERID}
is the "id"
from the response above
Other methods of the Superadmin API
Other functions of the Superadmin API are published in the Swagger format - https://web.skyvr.videoexpertsgroup.com/docs/v2_admin.html
Please note that the functions will not work on this page.