跳转到主要内容
POST
POST /admin/api/permissions

授权

gproxy_session
string
cookie
必填

请求头

x-gproxy-admin-scope
string

Administrative scope selected by the caller.

请求体

application/json
action
string
必填
apiKeyId
string | null
id
string | null
modelPattern
string | null

Absent means *.

operation
string | null
priority
integer<int32> | null
providerId
string | null
userId
string | null

响应

Success

action
string
必填

allow or deny.

apiKeyId
string | null
必填
id
string
必填
modelPattern
string
必填

A glob: * and ?, anchored, case-sensitive. * matches a request that names no model at all.

operation
string | null
必填

None means every operation.

priority
integer<int32>
必填

Higher wins; ties fall back to id order.

providerId
string | null
必填

None means every provider.

userId
string | null
必填

Exactly one of these two is set. A rule with neither is a grant to nobody; a rule with both is an intersection the snapshot still honours but this family refuses to write, because nobody who wrote one meant "the key and the user".