07-16-2021 09:34 AM
Hello everybody
I'd like to create users to the Extreme Cloud by REST API (via cURL, for example).
Create a new users with password and add to certain group.
Is it possible? I didn’t found any endpoint to do it.
Could please anybody provide the endpoint if it’s possible?
Thanks in advance.
07-29-2021 12:36 AM
Each group inside an XIQ has an internal ID associated with it. You first need to do a GET request to fetch all the existing user groups. The output will include the group ID.
curl -X GET "https://api.extremecloudiq.com/ssids/usergroups?page=1&limit=10&password_db_location=PASSWORD_DB_LOCATION_UNSPECIFIED&password_type=PASSWORD_TYPE_UNSPECIFIED" -H "accept: application/json"
Regarding JWT error: How are you generating the string?
07-28-2021 09:47 AM
What’s USER_GROUP_ID ? an ID or the name of the group?
Also appears the following after put my JWT_TOKEN
{"error_code":"AuthInvalidToken","error_id":"5daf5eb852344dcf9ee382732c475081","error_message":"JWT strings must contain exactly 2 period characters. Found: 0"}
07-28-2021 12:59 AM
curl -X POST "https://api.extremecloudiq.com/ssids/users" -H "accept: application/json" -H "Authorization: Bearer <JWT_TOKEN>" -H "Content-Type: application/json" -d "{\"user_group_id\":\"<USER_GROUP_ID>\",\"name\":\"MyName1\",\"user_name\":\"EnterNewOrUseSameAsEmailPhoneOrName\",\"description\":\"AShortDescription\",\"organization\":\"TheOrganizationName\",\"visit_purpose\":\"PurposeForTheVisit\",\"password\":\"XzwtxpmWsDuxSmSqrX\",\"email_address\":\"email@mailserver.com\",\"phone_number\":\"14082147380\",\"email_password_delivery\":\"user1@mailserver.com\",\"sms_password_delivery\":\"14082147380\"}"
Here is the sample.
Modify JWT and user_group_id as per your environment
07-27-2021 09:27 AM
Not exactly endpoint found because I don’t need to create a local user. Need to create a user inside this:
Configure > Users > Users Groups