# Concept for role request REST endpoint This endpoint allows you to create and manage role concepts in your request to change permissions. Request for change permissions is created using endpoint [[7.3:api.md:role-requests.md|/role-requests]]. A change of permission request may include N changes, some assign new roles, some modify existing ones, or remove them. Each of these changes is defined as a **role concept** managed in this endpoint. The basic procedure for change identity permissions is therefore: - [[7.3:api.md:role-requests.md|Create a request]] to change the permissions. - **Create role concepts** (**this** endpoint). - [[7.3:api.md:role-requests.md|Run the request]] as a whole. * REST endpoint **/api/v1/concept-role-requests** # Supports * Basic **CRUD** operations (Creating, Reading, Updating, Deleting) and searching. If you want to use the REST API, you must be logged in. The easiest way is to use **Basic authentication** directly in request "- u admin: admin". # API ** TODO: Swagger** # Examples ## Create concept role in request We will created new role concept for created role request. In example request you have to fill correct: * Id of created **roleRequest**. * Id of required role. * Id of **identityContract** on **jonh doe**. You can use ID of contract get from identity REST endpoint [[7.3:api.md:identities.md|/work-position]] ### Request: ``` curl -i -X POST -H "Content-Type:application/json" -u admin:admin http://localhost:8080/idm-backend/api/v1/concept-role-requests/ -d '{"roleRequest":"[FILL ID OF ROLE REQUEST]","identityContract":"[FILL ID OF IDENTITY CONTRACT]","role":"[FILL ID OF ROLE]","identityRole":null,"roleTreeNode":null, "validFrom":null, "validTill":"2018-12-31", "operation":"ADD"}' ``` ### Response: { "id" : "9ea10cbb-b27b-44a0-852a-4c045960ecd1", "created" : "2017-06-14T11:40:27.074Z", "modified" : null, "creator" : "admin", "creatorId" : "d0c47adb-4cbd-4551-bb20-87567ff7892d", "modifier" : null, "modifierId" : null, "originalCreator" : "admin", "originalCreatorId" : "d0c47adb-4cbd-4551-bb20-87567ff7892d", "originalModifier" : null, "originalModifierId" : null, "roleRequest" : "d2f3a456-8803-46b0-808f-9be84d84d94f", "identityContract" : "b34e015f-0a27-45f2-b333-c01478d22f37", "role" : "2e8d493a-8368-4417-af88-08ad682a2ca1", "identityRole" : null, "roleTreeNode" : null, "validFrom" : null, "validTill" : "2018-12-31", "operation" : "ADD", "state" : "CONCEPT", "wfProcessId" : null, "log" : null, "_trimmed" : false, "_embedded" : {[!SHORTENED_FOR_CLEARITY!]} }, "_links" : { "self" : { "href" : "http://localhost:8080/idm-backend/api/v1/concept-role-requests/9ea10cbb-b27b-44a0-852a-4c045960ecd1" } } }