POST Roles
Creates a new role.
{
"name": "User",
"description": "Can use Interactive Analytics and Dashboards",
"capabilities": [
"VIEW_SHARED_DASHBOARDS",
"VIEW_INTERACTIVE_ANALYTICS",
"VIEW_CONTENT_PACKS",
"VIEW_SHARED_DASHBOARD_URLS",
"VIEW_CONTENT_PACK_DASHBOARDS",
"EDIT_USER_DASHBOARDS",
"EDIT_EXPORT",
"VIEW_ALERTS",
"VIEW_USER_DASHBOARDS",
"EDIT_INTERACTIVE_ANALYTICS",
"EDIT_SHARED_DASHBOARD_URLS",
"EDIT_CONTENT_PACKS",
"VIEW_EXTRACTED_FIELDS",
"VIEW_EXPORT",
"EDIT_SHARED_DASHBOARDS",
"EDIT_EXTRACTED_FIELDS"
],
"dataSets": [
"00000000-0000-0000-0000-000000000005",
"00000000-0000-0000-0000-000000000006"
]
}
Successfully created a new role.
{
"id": "f970dcba-fe3b-4ae2-b867-7164644db34e",
"name": "User1",
"description": "Can use Interactive Analytics and Dashboards",
"capabilities": [
{
"id": "VIEW_SHARED_DASHBOARDS"
},
{
"id": "VIEW_INTERACTIVE_ANALYTICS"
},
{
"id": "VIEW_CONTENT_PACKS"
},
{
"id": "VIEW_SHARED_DASHBOARD_URLS"
},
{
"id": "VIEW_CONTENT_PACK_DASHBOARDS"
},
{
"id": "EDIT_USER_DASHBOARDS"
},
{
"id": "EDIT_EXPORT"
},
{
"id": "VIEW_ALERTS"
},
{
"id": "VIEW_USER_DASHBOARDS"
},
{
"id": "EDIT_INTERACTIVE_ANALYTICS"
},
{
"id": "EDIT_SHARED_DASHBOARD_URLS"
},
{
"id": "EDIT_CONTENT_PACKS"
},
{
"id": "VIEW_EXTRACTED_FIELDS"
},
{
"id": "VIEW_EXPORT"
},
{
"id": "EDIT_SHARED_DASHBOARDS"
},
{
"id": "EDIT_EXTRACTED_FIELDS"
}
],
"dataSets": [
{
"id": "356f4d33-4e93-47f0-9dc5-1e97f0398db0",
"name": "identity constraints",
"type": "OR",
"constraints": [
{
"name": "id",
"operator": "CONTAINS",
"value": "00000000-0000-0000-0000-000000000001"
}
]
}
],
"required": false,
"editable": true
}
Invalid request body
{
"errorMessage": "Some fields have incorrect values",
"errorCode": "FIELD_ERROR",
"errorDetails": {
"name": [
{
"errorCode": "com.vmware.loginsight.api.errors.field_required",
"errorMessage": "Value cannot be empty."
}
]
}
}
A message describing the error.
A code representing the type of error.
Dynamic error details, where the field name can vary depending on the request field and error code.
Role name already exists.
{
"errorMessage": "Another role with specified name already exists.",
"errorCode": "RBAC_GROUPS_ERROR",
"errorDetails": {
"errorCode": "com.vmware.loginsight.api.errors.rbac.group_with_specified_name_already_exists"
}
}
A message describing the error.
A code representing the type of error.
Dynamic error details, where the field name can vary depending on the request field and error code.
Internal error while processing the client request
{
"errorMessage": "The operation failed due to an internal error."
}
A message describing the error.
A code representing the type of error.
Dynamic error details, where the field name can vary depending on the request field and error code.
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/api/v2/roles