Danh sách API hệ thống hỗ trợ
- Xem danh sách API:
https://[domain]/gp247_admin/api_connection.
Lấy access_token
- Core:
POST api/core/loginvớiusername,password; tham số bổ sung:remember_me(boolean:true/false). - Front:
POST api/front/loginvớiemail,password; tham số bổ sung:remember_me(boolean:true/false).
Tăng bảo mật với API Connection
- Truy cập
https://[domain]/gp247_admin/api_connectionđể kích hoạt tính năng và tạo cặpapiconnection | apikey. - Khi bật, API Connection sẽ áp dụng cho tất cả endpoint API (core và front).
Lưu ý
- Đối với API core: dùng
access_tokentạo bởiapi/core/login. - Đối với API front: dùng
access_tokentạo bởiapi/front/logincho các endpoint bảo mật. - Nếu sử dụng API Connection, header này áp dụng cho mọi endpoint (core và front).
Ví dụ gọi API
curl -X GET "https://your-domain.local/api/your_resource" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-bearer-token" \
-H "apiconnection: your-connection" \
-H "apikey: your-api-key"
Ghi chú: thay your-domain.local, your-bearer-token, your-connection, your-api-key bằng giá trị thực tế của bạn.
English