跳转到内容

委托写面(owner):能力词表闭集(ceiling.manage/approval.decide/license.manage/budget.manage/policy.manage);恒带 expiresAt(无永久委托);expiresAt=null 撤销(幂等);恒审计

PUT
/v1/org-delegations
curl --request PUT \
--url https://api.tansr.com/v1/org-delegations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "granteeUserId": "example", "capability": "ceiling.manage", "expiresAt": "example" }'
x-tansr-org
string

Org 作用域声明(org 公开 id);服务端校验成员资格与角色,非成员恒 404、角色不够 403

Media typeapplication/json
object
granteeUserId
required
string
>= 1 characters <= 64 characters
capability
required
Any of:
string
Allowed value: ceiling.manage
expiresAt
required
Any of:
string
>= 1 characters <= 64 characters

委托档(写后)

Media typeapplication/json
object
delegation
required

撤销后 null

object | null
Examplegenerated
{
"delegation": "example"
}