دامنه های سفارشی
GET https://url20.ir/api/domains/
curl --request GET \
--url 'https://url20.ir/api/domains/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://url20.ir/api/domains/' \
--header 'Authorization: Bearer {api_key}' \
| پارامترها | Details | Description |
|---|---|---|
| page | اختیاری عدد صحیح | شماره صفحه ای که می خواهید از آن نتیجه بگیرید. پیشفرض 1. |
| results_per_page | اختیاری عدد صحیح | در هر صفحه چند نتیجه می خواهید. مقادیر مجاز عبارتند از: 10 , 25 , 50 , 100 , 250 , 500 , 1000. پیشفرض 25. |
{
"data": [
{
"id": 1,
"scheme": "https://",
"host": "example.com",
"custom_index_url": "",
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-11-19 09:03:45",
},
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://url20.ir/api/domains?page=1",
"last": "https://url20.ir/api/domains?page=1",
"next": null,
"prev": null,
"self": "https://url20.ir/api/domains?page=1"
}
}
GET https://url20.ir/api/domains/{domain_id}
curl --request GET \
--url 'https://url20.ir/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://url20.ir/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"scheme": "https://",
"host": "example.com",
"custom_index_url": "",
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-11-19 09:03:45",
}
}
POST https://url20.ir/api/domains
| پارامترها | Details | Description |
|---|---|---|
| host | ضروری رشته | - |
| custom_index_url | اختیاری رشته | - |
| custom_not_found_url | اختیاری رشته | - |
curl --request POST \
--url 'https://url20.ir/api/domains' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=example.com' \
--form 'custom_index_url=https://example.com/' \
--form 'custom_not_found_url=https://example.com/404-page'
--url 'https://url20.ir/api/domains' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=example.com' \
--form 'custom_index_url=https://example.com/' \
--form 'custom_not_found_url=https://example.com/404-page'
{
"data": {
"id": 1
}
}
POST https://url20.ir/api/domains/{domain_id}
| پارامترها | Details | Description |
|---|---|---|
| host | اختیاری رشته | - |
| custom_index_url | اختیاری رشته | - |
| custom_not_found_url | اختیاری رشته | - |
curl --request POST \
--url 'https://url20.ir/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=example.com' \
--url 'https://url20.ir/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=example.com' \
{
"data": {
"id": 1
}
}
DELETE https://url20.ir/api/domains/{domain_id}
curl --request DELETE \
--url 'https://url20.ir/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://url20.ir/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \