Overview
API là viết tắt của Application Programming Interface, là phần mềm trung gian cho phép 2 ứng dụng giao tiếp với nhau
Hướng dẫn cấu hình
- Đăng nhập vào thiết bị Sophos XG bằng tài khoản Admin
- Authentication -> User -> Nhấn Add user để tạo 1 user mới cho API (nó yêu cầu quyền Administrator và yêu cầu quyền read/write)
![](https://static.techbast.com/2019/10/image-44-1024x565.png)
![](https://static.techbast.com/2019/10/image-45-1024x568.png)
- Kiểm tra user có quyền read/write
- Nhấn Profile
![](https://static.techbast.com/2019/10/image-46-1024x328.png)
![](https://static.techbast.com/2019/10/image-47-1024x568.png)
- Backup & Firmware -> API -> Chọn Enabled -> Nhập địa chỉ IP mà bạn muốn thực hiện lệnh ở phần Allowed IP Address -> Nhấn Apply
![](https://static.techbast.com/2019/10/image-48-1024x568.png)
- Đây là địa chỉ IP được thêm vào zone mà được phép truy cập HTTPS Admin Services
![](https://static.techbast.com/2019/10/image-49-1024x566.png)
- Download API Help từ Sophos
![](https://sophserv.sophos.com/repo_kb/132560/image/API_doc_2.png)
- Mở file index.html
![](https://sophserv.sophos.com/repo_kb/132560/image/API_doc_3.png)
- Viết file script GET USER
![](https://static.techbast.com/2019/10/image-50.png)
- Trên index.html -> Chọn Authentication -> Nhấn User -> Nhấn Add User
- Copy hết nội dung để tạo file script ADD USER
![](https://static.techbast.com/2019/10/image-51-1024x501.png)
![](https://static.techbast.com/2019/10/image-52.png)
- Copy hết đoạn script và copy vào search box ở trình duyệt web -> Nhấn Enter
![](https://static.techbast.com/2019/10/image-53-1024x24.png)
- Thêm thành công
![](https://static.techbast.com/2019/10/image-55-1024x289.png)
** Bảng kiểm tra lỗi
![](https://static.techbast.com/2019/10/image-54-1024x394.png)