Hello all,
I am trying to use "CX as Code" for administering and managing the customer's environment.
Sometimes it's very difficult to find some "help" information.
For example, I want to use the GC for adding and removing users to the group.
In the "help" I found the command:
gc.exe groups members add '
groupID' -f '
filename.JSON'
PS D:\TMP> gc.exe groups members add -h
Add members
Usage:
gc groups members add [groupId] [flags]
Flags:
-f, --file string File name containing the JSON body
-h, --help help for add
Global Flags:
--clientid string clientId override
--clientsecret string clientSecret override
--environment string environment override. E.g. mypurecloud.com.au or ap-southeast-2
-i, --indicateprogress Trace progress indicators to stderr
-p, --profile string Name of the profile to use for configuring the cli (default "DEFAULT")
Operation:
POST /api/v2/groups/{groupId}/members
Note: The 'version' value from the command input will be ignored and the latest version value will be retrieved from the API instead
Operation:
POST /api/v2/groups/{groupId}/members
Documentation:
https://developer.genesys.cloud/api/rest/v2/groups/#post-api-v2-groups--groupId--members
PS D:\TMP>
But I can't find the format of the "JSON body" file.
Maybe somebody knows where it's possible to find such information?
I tried to get the "members list" from the other group:
Something like this:
{
"entities": [
{
"id": "773cfee8-33e6-4e05-be9a-0f0d2774b38b",
"name": "Roei Yona",
"department": "אפליקציות",
"email": "roei.yona@strauss-water.com",
"state": "active",
"title": "מנהל/ת מערכות טלפוניה",
"username": "roei.yona@strauss-water.com",
"version": 49,
"acdAutoAnswer": false,
"selfUri": "/api/v2/users/773cfee8-33e6-4e05-be9a-0f0d2774b38b"
}
]
}
But I am getting the error:
{
"message": "Validation error(s): [API Exception 400:\"Bad Request\" : Illegal value for field: individuals, Reason: Missing data for required field.]",
"code": "bad.request",
"status": 400,
"contextId": "9169549b-faba-4098-82f9-a860f7424753",
"details": [],
"errors": []
}
Where do I need to add this field and what are the possible values?
#PlatformAdministration#Unsure/Other------------------------------
Best regards,
Yvgeni Liberman
ITNAV-Pro Ltd.
------------------------------