Develop > API calls > Custom roles APIs > Create a custom role

Create a custom role

Creates a role other than the out-of-box roles that exist in Codar.

URI Method Parameters Returns

http://[host]:[port]/csa/api/codar/role

POST

 

201 - Created
400 - bad request,
500 - Server Exception

Example

The following URL was sent:

https://localhost:8444/csa/api/codar/role

The following JSON was sent:

{ "name": "System Integration QA", "description": "Responsible to test the sub-system integration", "icon": "test icon", "permissions" : ["APPLICATION_PACKAGE_DEPLOY", "APPLICATION_PACKAGE_PROMOTE", "APPLICATION_PACKAGE_REJECT"] }

The following is the response JSON:

{ "@self": "/csa/api/codar/role/8a81848d4febf322014feec17886001a", "@type": "urn:x-hp:2012:software:cloud:data_model:role", "name": "SYSTEM_INTEGRATION_QA", "displayName": "System Integration QA", "description": "Responsible to test the sub-system integration", "icon": "test icon", "readOnly": false, "permissions": [ { "name": "APPLICATION_PACKAGE_DEPLOY", "displayName": "Package deploy", "description": "Allows to view and deploy and undeploy application packages" }, { "name": "APPLICATION_PACKAGE_PROMOTE", "displayName": "Package promote", "description": "Allows to view and promote application packages" }, { "name": "APPLICATION_PACKAGE_REJECT", "displayName": "Package reject", "description": "Allows to view and reject application packages" } ] }