Modify batch of user groups

POST /api-v1/user-group/batch

Headers

  • TARGET-ORGANIZATION-ID integer(int32)

    ID of organization, for which the operation must be performed

  • WEAL-TOKEN string Required

    API token (can be retrieved from account settings)

application/json

Body Required

userGroups

  • description string
  • globalRoles array[object]
    Hide globalRoles attributes Show globalRoles attributes object
    • id integer
    • name string
    • roleType string

      Values are ORGANIZATION or GLOBAL.

  • groupIds array[integer]
  • id integer
  • isAdvanced boolean
  • name string
  • roles array[object]
    Hide roles attributes Show roles attributes object
    • id integer
    • name string
    • roleType string

      Values are ORGANIZATION or GLOBAL.

  • rule string
  • type string

    Values are GROUP or SUPER_GROUP.

  • userIds array[integer]

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • items array[object]
      Hide items attributes Show items attributes object
      • error boolean
      • errorCode object
        Hide errorCode attributes Show errorCode attributes object
        • errorCode string

          Values are NO_ERROR, NOT_IMPLEMENTED_YET, CONTACT_NOT_FOUND, FIELD_REQUIRED, VALIDATION_ERROR, DUPLICATION_ERROR, UNIQUE_CONSTRAINT_VIOLATION, WRONG_PASSWORD_FORMAT, WRONG_PASSWORD, ACTION_DENIED, NOT_FOUND, EXPECTED_ONE_FILE, UNIQUE_VIOLATION, CONTENT_EMPTY, INVALID_TYPE, CONVERSION_ERROR, FILE_PARSE_EXCEPTION, or IN_USE.

        • errorDetailValues array[object]
          Hide errorDetailValues attributes Show errorDetailValues attributes object
          • data string
          • errorCode string
          • fieldName string
          • isSevere boolean
      • freshData object
      • freshRow object
      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer
        • name string
      • severeError boolean
  • 400

    Error

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

POST /api-v1/user-group/batch
curl \
 --request POST 'https://wyzio.app/api-v1/user-group/batch' \
 --header "Content-Type: application/json" \
 --header "TARGET-ORGANIZATION-ID: 42" \
 --header "WEAL-TOKEN: string" \
 --data '[{"description":"string","globalRoles":[{"id":42,"name":"string","roleType":"ORGANIZATION"}],"groupIds":[42],"id":42,"isAdvanced":true,"name":"string","roles":[{"id":42,"name":"string","roleType":"ORGANIZATION"}],"rule":"string","type":"GROUP","userIds":[42]}]'
Request examples
# Headers
TARGET-ORGANIZATION-ID: 42
WEAL-TOKEN: string

# Payload
[
  {
    "description": "string",
    "globalRoles": [
      {
        "id": 42,
        "name": "string",
        "roleType": "ORGANIZATION"
      }
    ],
    "groupIds": [
      42
    ],
    "id": 42,
    "isAdvanced": true,
    "name": "string",
    "roles": [
      {
        "id": 42,
        "name": "string",
        "roleType": "ORGANIZATION"
      }
    ],
    "rule": "string",
    "type": "GROUP",
    "userIds": [
      42
    ]
  }
]
Response examples (200)
{
  "items": [
    {
      "error": true,
      "errorCode": {
        "errorCode": "NO_ERROR",
        "errorDetailValues": [
          {
            "data": "string",
            "errorCode": "string",
            "fieldName": "string",
            "isSevere": true
          }
        ]
      },
      "freshData": {},
      "freshRow": {},
      "possibleWorkflows": [
        {
          "id": 42,
          "name": "string"
        }
      ],
      "severeError": true
    }
  ]
}