cancel
Showing results for 
Search instead for 
Did you mean: 

Create users via REST API

Create users via REST API

extreme
New Contributor

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.

6 REPLIES 6

Dilraj_Singh_Kh
Extreme Employee

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?

extreme
New Contributor

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"}

Dilraj_Singh_Kh
Extreme Employee
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

extreme
New Contributor

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

 

GTM-P2G8KFN