Modify user
Description
Modify existing user.This function is only available to administrators.
Request
POST /v1/users/:userid
{
name?: string|null,
isAdmin?: boolean,
isEnterprise?: boolean,
actions?: string[],
tags?: {
[key: string]: string
},
organizationsQuota?: {
name: string,
value: number
}
}
Response
Successful response contains the following JSON formated body:
{
userId: string,
name: string,
email: string,
isAdmin: boolean,
isEnterprise: boolean,
actions: string[],
tags: {
[key: string]: string
},
organizationsQuota: {
name: string,
value: number
},
termsRevision: string,
dateOfConsent: string
}
Response Status codes:
-
200 on success
-
403 if not administrator
Request headers
This request must have the following headers:
Authorization: bearer <ApiKey>
Content-Type: application/json
Example
Request
curl -XPOST "https://api.cloud.nabto.com/v1/users/:userid" \
-H "Authorization: Bearer <ApiKey>" \
-H "Content-Type: application/json" \
-d '{ name: "friendly name", isAdmin: true, isEnterprise: true, actions:[ "nabto5:write",...], tags: {"foo": "bar" }, organizationsQuota: { name: "friendly name", value: 42 }}'
Response
{
userId: "us-abcdefgh",
name: "friendly name",
email: "foo@bar.baz",
isAdmin: true,
isEnterprise: true,
actions:[ "nabto5:write",
...],
tags: {
"foo": "bar"
},
organizationsQuota: {
name: "friendly name",
value: 42
},
termsRevision: "<termsRevision>",
dateOfConsent: "<dateOfConsent>"
}