Searching:
0 results foundRoles/Post
POST odata/roles
Description
Creates a new Role.
See the following for request and response details ‒
See Also
Request ‒ Roles/Post
Property | Type | Description |
name | String | The name of the Role. |
taskIds | String | The list of task IDs associated with the Role. |
displayName | String | The name of the Role to be displayed in the Axonize Portal. |
isShared | Boolean | Indicates whether or not the Role is shared with all the Applications that relate to the role application. Values are 0/1 (True/False). |
description | String | A description of the Role. |
Example JSON Roles/Post Request
curl -X POST \
https://api.dev.axonize.com/odata/Roles \
-H ‘Accept: application/json, text/plain, */*’ \
-H ‘Accept-Language: en-US,en;q=0.9’ \
-H ‘AppId: 289a76sd-c550-324c-b15a-7801d8902ce9’ \
-H ‘Content-Type: application/json’ \
-H ‘cache-control: no-cache’ \
-d ‘{
“name”:”NewRole”,
“taskIds”: [“06ecc4ec-115d-4e28-ba87-40b6bcb2bfbb”],
“displayName”: “Role”,
“isShared”: 1
}’
Response ‒ Roles/Post
All the same properties in the request are returned in the response. The response that is returned also contains the following properties –
Property | Type | Description |
id | String | This is the unique identifier automatically assigned by Axonize when a Role is created. This id is returned in the response of the Roles/Post. |
appId | String | The appId of the Master Application that created the Role. |
createDate | See Common Response Properties. |
Example JSON Dashboards/Post Response
Status 201 – Created
{
“@odata.context”: “https://dev-axonizeapi-axonize.dev-ase-axonize.p.azurewebsites.net/odata/$metadata#Roles/$entity”,
“name”: “NewRole”,
“displayName”: “Role”,
“isShared”: 1,
“taskIds”: [
“06ecc4ec-115d-4e28-ba87-40b6bcb2bfbb”,
“15b8bc56-81ed-402e-95ca-3842bba386bd”
],
“id”: “9939D515-852A-4CAB-A676-6C214CB09A47”,
“appId”: “289a7624-c590-4b4c-b15a-7801d8902ce9”,
“creationDate”: “2018-10-25T12:48:03.5673557Z”
}