自定义域名

查询自定义域名列表

GET /api/shops/custom_domain/

所需 scope: shops:readread

Query 参数

page: 1
page_size: 10

发送请求

GET /api/shops/custom_domain/?page=1

返回结果

{
    "count": 4,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 79,
            "domain": "ssl.taoxx123.cn",
            "beian_number": "沪ICP备17013301号",
            "is_default": false,
            "is_active": true,        //是否可用
            "ssl": true,
            "ssl_cert": "-----BEGIN CERTIFICATE-----\ntest\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\ntest=\n-----END CERTIFICATE-----\n",
            "ssl_cert_key": "-----BEGIN PRIVATE KEY-----\ntest\n-----END PRIVATE KEY-----\n"
        },
       ...
         }
    ]
}

查询指定自定义域名

GET /api/shops/custom_domain/[id]/

所需 scope: shops:readread

发送请求

GET /api/shops/custom_domain/79/

返回结果

{
    "id": 79,
    "domain": "ssl.taoxx123.cn",
    "beian_number": "沪ICP备17013301号",
    "is_default": false,
    "is_active": true,        //是否可用
    "ssl": true,
    "ssl_cert": "-----BEGIN CERTIFICATE-----\ntest\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\ntest=\n-----END CERTIFICATE-----\n",
    "ssl_cert_key": "-----BEGIN PRIVATE KEY-----\ntest\n-----END PRIVATE KEY-----\n"
}

创建自定义域名

POST /api/shops/custom_domain/

所需 scope: shops:writewrite

数据格式

{
    "domain": "test123.cn"
}

发送请求

POST /api/shops/custom_domain/

返回结果

同查询指定自定义域名接口 返回完整的域名信息

更新自定义域名

PATCH /api/shops/custom_domain/[id]/

所需 scope: shops:writewrite

数据格式

{
    "domain": "test321.cn"
}

发送请求

PATCH /api/shops/custom_domain/79/

返回结果

同查询指定自定义域名 返回完整的域名信息

删除自定义域名

DELETE /api/shops/custom_domain/[id]/

所需 scope: shops:writewrite

发送请求

DELETE /api/shops/custom_domain/79/

返回结果

http 204

results matching ""

    No results matching ""