Tên miền

Ghi chú
Cấp độ chuyên gia
Khóa API nên được gửi dưới dạng mã thông báo Bearer trong tiêu đề Ủy quyền của yêu cầu. Lấy khóa API của bạn.
Danh sách

Điểm cuối API:

GET
https://www.url.spa/api/v1/domains

Ví dụ yêu cầu:

curl --location --request GET 'https://www.url.spa/api/v1/domains' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Tham số
Loại
Mô tả
search
tùy chọn string
Truy vấn tìm kiếm.
search_by
tùy chọn string
Tìm kiếm theo. Các giá trị có thể là: name cho Tên. Mặc định là: name.
sort_by
tùy chọn string
Sắp xếp theo. Các giá trị có thể là: id cho Ngày tạo, name cho Tên. Mặc định là: id.
sort
tùy chọn string
Sắp xếp. Các giá trị có thể là: desc cho Giảm dần, asc cho Tăng dần. Mặc định là: desc.
per_page
tùy chọn integer
Kết quả mỗi trang. Các giá trị có thể là: 10, 25, 50, 100. Mặc định là: 100.
Hiển thị

Điểm cuối API:

GET
https://www.url.spa/api/v1/domains/{id}

Ví dụ yêu cầu:

curl --location --request GET 'https://www.url.spa/api/v1/domains/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Lưu trữ

Điểm cuối API:

POST
https://www.url.spa/api/v1/domains

Ví dụ yêu cầu:

curl --location --request POST 'https://www.url.spa/api/v1/domains' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}'
Tham số
Loại
Mô tả
name
bắt buộc string
Tên miền.
index_page
tùy chọn string
Trang chỉ mục để chuyển hướng.
not_found_page
tùy chọn string
Trang 404 để chuyển hướng.
Cập nhật

Điểm cuối API:

PUT PATCH
https://www.url.spa/api/v1/domains/{id}

Ví dụ yêu cầu:

curl --location --request PUT 'https://www.url.spa/api/v1/domains/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
Tham số
Loại
Mô tả
index_page
tùy chọn string
Trang chỉ mục để chuyển hướng.
not_found_page
tùy chọn string
Trang 404 để chuyển hướng.
Xóa

Điểm cuối API:

DELETE
https://www.url.spa/api/v1/domains/{id}

Ví dụ yêu cầu:

curl --location --request DELETE 'https://www.url.spa/api/v1/domains/{id}' \
--header 'Authorization: Bearer {api_key}'