API Server
The APIs here are designed for API server configuration.
Upload HTTPS Certificate
This API allows you to update the HTTPS certificate for the Access API, applicable only to port 12445. Please note that restarting the Access application is necessary to apply these changes. If the Private Key and Certificate do not match, it will result in a "parameter error" message.
Request URL: /api/v1/developer/api_server/certificates
Permission Key: edit:api_server
Method: POST
UniFi Access Requirement: Version 2.2.10 or later
Request Header
| Parameter | Required | Type | Description |
| Authorization | T | String | Token required for authentication and access control. |
Request Body
| Parameter | Required | Type | Description | Example |
| key | T | File | Private Key | server.key |
| cert | T | File | Certificate | server.crt |
Response Sample
{
"code": "SUCCESS",
"data": "success",
"msg": "success"
}Request Sample
curl -XPOST '{{host}}/api/v1/developer/api_server/certificates'
-H 'Authorization: Bearer wHFmHR******kD6wHg/yg'
--form 'key=@"/server.key"'
--form 'cert=@"/server.crt"'Delete HTTPS Certificate
This API allows you to delete the HTTPS certificate for the Access API, applicable only to port 12445. Please note that restarting the Access application is necessary to apply these changes.
Request URL: /api/v1/developer/api_server/certificates
Permission Key: edit:api_server
Method: DELETE
UniFi Access Requirement: Version 2.2.10 or later
Request Header
| Parameter | Required | Type | Description |
| Authorization | T | String | Token required for authentication and access control. |
Response Sample
{
"code": "SUCCESS",
"data": "success",
"msg": "success"
}Request Sample
curl -XDELETE '{{host}}/api/v1/developer/api_server/certificates'
-H 'Authorization: Bearer wHFmHR******kD6wHg/yg'