getPermissionsByUser

Purpose

Returns information about all of the entities of the given type, including permissions granted to the specified role. Throws an exception in the following cases:

  • entityType is menu or action, and the specified user's role is Portal Guest, or Portal User
  • The specified user's role is Administrator, Server API or No Access
  • entityType is field, as user-based access control is not supported for fields.

HTTP Method

GET

URL

https://app.infiniteblue.com/rest/api/getPermissionsByUser

URL Parameters

sessionId

The session ID obtained from the body of the response when calling login.

userId

The ID of the user.

entityType

The type of entity for which permissions should be listed. Can be one of the following: object, application, menu, view, action, report, chart.

objId

The original ID of the object definition.This is required only when entityType is view, action, report, or chart.

appId

The original ID of the Application. This is required only when entityType is menu.

output

Optional parameter specifying the output format, one of: xml (default) or json.

Permissions Required

Full administrative privileges.

Response

The name, ID, original ID, and permissions granted for that user in XML or JSON format. See setPermissionsByUser for the possible permissions for each entity type.

Example

Output example in JSON format for entityType=object:

[
  {
    "name": "Product",
    "id": "46220471",
    "originalId": "151807756",
    "View": "false",
    "Create": "false",
    "Edit": "false",
    "Delete": "false"
  },
  {
    "name": "Reservation",
    "id": "46219904",
    "originalId": "791755",
    "View": "true",
    "Create": "false",
    "Edit": "false",
    "Delete": "false"
  },
  {
    "name": "Room",
    "id": "46219927",
    "originalId": "7550",
    "View": "true",
    "Create": "true",
    "Edit": "true",
    "Delete": "true"
  }
]