Ok I assigned the role I needed for Open Registration through API Docs.
First I went to get the ID of the User Service - get/system/service
The response showed me all my services, I scrolled down to the user service to get the info in bold:
{
**"id": 6,**
"name": "user",
"label": "Platform Users",
"description": "Local User Service",
"is_active": true,
"type": "user",
"mutable": true,
"deletable": false,
"created_date": "2016-02-12 11:16:24",
"last_modified_date": "2016-02-25 18:17:00",
"created_by_id": null,
"last_modified_by_id": 1,
**"config": {**
"service_id": 6,
**"allow_open_registration": true,**
**"open_reg_role_id": null,**
"open_reg_email_service_id": 5,
"open_reg_email_template_id": 2,
"invite_email_service_id": 5,
"invite_email_template_id": 1,
"password_email_service_id": 5,
"password_email_template_id": 3
}
},
I noted my user service ID of ‘6’, say that the open registration was ‘true’ but the ‘open_reg_role_id = null’
Next I had to get the ID of the Role I wanted to assign to ‘open_reg_role_id’ by going to GET /system/role. I found the Role I wanted to assign and saw it is “id”: 5
Next I went to PATCH /system/service{id} and entered my user service in the id field ‘6’, then in the body entered the param I wanted to change with to assign my role:
{
"config": {
"open_reg_role_id": 5
}
}
Response = 200.
I verified by GET /system/service{id} and entered 6 (my user service Id) as the ID.
{
"id": 6,
"name": "user",
"label": "Platform Users",
"description": "Local User Service",
"is_active": true,
"type": "user",
"mutable": true,
"deletable": false,
"created_date": "2016-02-12 11:16:24",
"last_modified_date": "2016-02-25 18:17:00",
"created_by_id": null,
"last_modified_by_id": 1,
"config": {
"service_id": 6,
"allow_open_registration": true,
** "open_reg_role_id": 5,**
"open_reg_email_service_id": 5,
"open_reg_email_template_id": 2,
"invite_email_service_id": 5,
"invite_email_template_id": 1,
"password_email_service_id": 5,
"password_email_template_id": 3
}
}