Using
Sets or overwrites a user's access permission on a domain. `access` must be `"read"`, `"write"`, or `"ddl"` — each level includes the lower ones. Domain existence is checked when the target engine is active; `?allow_missing=true` skips the check for all store types.
applies to v0.5.1POST
/store-api/auth/users/{name}/permissions
const url = 'https://example.com/store-api/auth/users/example/permissions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"access":"example","domain":"example","store_type":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/store-api/auth/users/example/permissions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "access": "example", "domain": "example", "store_type": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
string
Username
Query Parameters
Section titled “Query Parameters”allow_missing
boolean
Skip the domain existence check (pre-provisioning). Default false.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
access
required
Access level: "read", "write" or "ddl".
string
domain
required
Domain name.
string
store_type
Store type of the domain: "kv" (default), "json" or "rel".
string | null
Example generated
{ "access": "example", "domain": "example", "store_type": "example"}Responses
Section titled “Responses”Permission set
Invalid access or domain value
Media typetext/plain
string
User or domain not found
Media typetext/plain
string