Update user group users

PUT /user-groups/{id}/users

This API call is used to replace all users for the specified user group.

Path parameters

  • id integer Required

    User group ID.

application/json

Body Required

  • users array[string]

    Comma separated List of usernames.

Responses

  • 200 application/json

    Success Response

    Hide response attributes Show response attributes object
  • 400 application/json

    Failed Response

    Hide response attributes Show response attributes object
  • 401 application/json

    Authentication Error. Invalid credentials.

    Hide response attributes Show response attributes object
  • Authorization Error. Invalid role for request.

  • 404 application/json

    Failed Response

PUT /user-groups/{id}/users
curl \
 --request PUT 'https://localhost:8080/user-groups/1/users' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"users":["javarro","bribbon","tsanchez"]}'
Request example
{
  "users": [
    "javarro",
    "bribbon",
    "tsanchez"
  ]
}
Response examples (200)
{
  "id": 12,
  "status": "Success",
  "messages": [
    "User group users updated successfully."
  ]
}
Response examples (400)
{
  "status": "Failure",
  "messages": [
    "The following users are not found or are not allowed to be added in the specified user group: jricone."
  ]
}
Response examples (401)
{
  "code": "900901",
  "message": "Invalid Credentials",
  "description": "Access failure for API: /api/admin/v1.1.0, version: v1.1.0 status: (900901) - Invalid Credentials. Make sure you have provided the correct security credentials"
}
Response examples (404)
{
  "error": "User group not found",
  "status": 404
}