---
title: "REST API và phân quyền"
description: "Nextvision Status — REST API và phân quyền"
---

> Documentation Index
> Fetch the complete documentation index at: https://status.nextvisions.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API và phân quyền

## Xác thực

Đăng nhập tạo cookie HttpOnly, SameSite=Lax; bật Secure khi chạy HTTPS. API chặn request thay đổi dữ liệu từ origin khác. Truyền `X-Organization-ID` để chọn tổ chức; backend kiểm tra membership/role trước transaction có RLS.

Tải OpenAPI tại `/api/v1/openapi.json` trên hệ thống của bạn. Lỗi JSON có trường `error`; lệnh tạo trả ID mới. Danh sách tối đa 200 phần tử; monitors/incidents/maintenances/pages/components/audit/deliveries hỗ trợ query `offset`.

## Vai trò

Viewer đọc dữ liệu workspace. Operator quản lý monitor và công bố incident/bảo trì. Admin quản lý thành viên, probe, trang status, webhook. Owner kích hoạt domain. Platform admin là cờ riêng, chỉ cấp rõ ràng qua CLI.

## Probe API

Probe dùng Bearer token riêng, không dùng browser session. `POST /api/v1/probe/lease` nhận tối đa 50 job với lease 45 giây. `POST /api/v1/probe/results` gửi tối đa 50 kết quả kèm job ID và lease token. Lease hết hạn có thể được cấp lại; gửi kết quả thành công trùng không tạo mẫu trùng.

Source: https://status.nextvisions.ai/docs/vi/api/index.mdx
