<div dir="ltr"><div><div>Hi all,<br><br></div>please, could somebody clarify issue (see bottom of the mail) discovered in version 1.6.1.Final?<br>The same behavior is detected in version 1.7.0.Final.<br><br></div><div>This behavior differs from a Create a New User where the JSON body parameter "id" is skipped.<br></div><div><br>Thanks a lot.<br><br></div><div>Best regards,<br></div><div>Juraj<br></div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-12 10:32 GMT+01:00 Juraj Janosik <span dir="ltr"><<a href="mailto:juraj.janosik77@gmail.com" target="_blank">juraj.janosik77@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br></div>I want to clarify the "Create a new client" via REST API <br>especially for body parameter "id" from "ClientRepresentation".<br></div></div>If I set the parameter "id" in the request body (see example below), <br>the value is set to the client. No new id value is generated for the client, which is the typically behavior of "<a href="http://keycloak.github.io/docs/rest-api/index.html#_create_a_new_role_for_the_realm_or_client" target="_blank">Create a new role for the realm or client</a>" and "<a href="http://keycloak.github.io/docs/rest-api/index.html#_create_a_new_user" target="_blank">Create a new user</a>".<br></div><div>Is this a correct behavior?<br></div><div><br>Tested data example:<br>"Create Client":<br>"method":"POST","url":"<URL>:<PORT>/auth/admin/realms/<REALM>/clients"<br></div><div>"body":<br>"{<br>"id":"3",<br>"clientId":"testclient-3",<br>"name": "testclient-3",<br>"description": "TESTCLIENT-3",<br>"enabled": true,<br>"redirectUris":[ "\\" ],<br>"publicClient": true<br>}"<br></div><div>"headers":<br>[["Content-Type","application/json"],<br>["Authorization","Bearer <ACCESS_TOKEN>]]<br><br>Output for GET clients looks like:<br> {<br> "<b>id": "3"</b>,<br> "clientId": "testclient-3",<br> "name": "testclient-3",<br> "description": "TESTCLIENT-3",<br> "surrogateAuthRequired": false,<br> "enabled": true,<br> "clientAuthenticatorType": "client-secret",<br> "redirectUris":<br> [<br> "\"<br> ],<br> "webOrigins":<br> [<br> ],<br> "notBefore": 0,<br> "bearerOnly": false,<br> "consentRequired": false,<br> "serviceAccountsEnabled": false,<br> "directGrantsOnly": false,<br> "publicClient": true,<br> "frontchannelLogout": false,<br> "attributes":<br> {<br> },<br>...<br><br>Thanks a lot.<br><br></div><div>Best Regards,<br></div><div>Juraj<br></div><div><br></div><div><div><div><br></div></div></div></div>
</blockquote></div><br></div></div></div></div></div>