Update role membership

POST /v1/security/roles/{role}/members

Path parameters

  • role string Required

Query parameters

  • create boolean

    Creates a role with name {role} if not found

application/json

Body

  • add array[object]
    Hide add attributes Show add attributes object
    • name string
    • principal_type string

      Value is User.

  • remove array[object]
    Hide remove attributes Show remove attributes object
    • name string
    • principal_type string

      Value is User.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • added array[object]
      Hide added attributes Show added attributes object
      • name string
      • principal_type string

        Value is User.

    • created boolean
    • removed array[object]
      Hide removed attributes Show removed attributes object
      • name string
      • principal_type string

        Value is User.

    • role string
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer
    • message string
  • 404 application/json

    Not found

    Hide response attributes Show response attributes object
    • code integer
    • message string
POST /v1/security/roles/{role}/members
curl \
 --request POST 'http://localhost:9644/v1/security/roles/{role}/members' \
 --header "Content-Type: application/json" \
 --data '{"add":[{"name":"string","principal_type":"User"}],"remove":[{"name":"string","principal_type":"User"}]}'
Request examples
{
  "add": [
    {
      "name": "string",
      "principal_type": "User"
    }
  ],
  "remove": [
    {
      "name": "string",
      "principal_type": "User"
    }
  ]
}
Response examples (200)
{
  "added": [
    {
      "name": "string",
      "principal_type": "User"
    }
  ],
  "created": true,
  "removed": [
    {
      "name": "string",
      "principal_type": "User"
    }
  ],
  "role": "string"
}
Response examples (400)
{
  "code": 42,
  "message": "string"
}
Response examples (404)
{
  "code": 42,
  "message": "string"
}