创建资源服务器
POST
/api/v1/resource-servers请求参数
Body 参数application/json
No schema defined
示例
{
"name": "订单API",
"identifier": "https://order.mydomain/api/v1/",
"scopes": [
{
"value": "read:orders",
"description": "读取订单"
},
{
"value": "update:orders",
"description": "更新订单"
},
{
"value": "create:orders",
"description": "创建订单"
},
{
"value": "delete:orders",
"description": "删除订单"
}
],
"allow_offline_access": true,
"skip_consent_for_verifiable_first_party_clients": true,
"token_lifetime": 86400,
"token_lifetime_for_web": 86400,
"enforce_policies": true
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
No schema defined
示例成功示例
{
"id": "Z9t1bqKrBSuKAtKbtCcbWGXkb3NSb-Nl",
"name": "订单API",
"identifier": "https://order.mydomain/api/v1/",
"scopes": [
{
"value": "read:orders",
"description": "读取订单"
},
{
"value": "update:orders",
"description": "更新订单"
},
{
"value": "create:orders",
"description": "创建订单"
},
{
"value": "delete:orders",
"description": "删除订单"
}
],
"allow_offline_access": true,
"skip_consent_for_verifiable_first_party_clients": true,
"token_lifetime": 86400,
"token_lifetime_for_web": 86400,
"enforce_policies": true
}
修改于 2 年前