Users Web Service

You can manage users account using the users endpoint for the
NetOps Portal
REST web service. You can perform the following tasks:
Local Administrator users can manage user accounts using the
users
endpoint for the
NetOps Portal
REST web service. You can perform the following tasks:
  • Retrieve a current list of user accounts.
  • Create user accounts.
  • Modify user accounts.
  • Change user account passwords.
  • Delete user accounts.
The following topics provide information about related parameters:
Basic User Account Parameters
The following is a list of the parameters for the
users
endpoint for the
NetOps Portal
REST web service:
You can get the parameters and available operations for this endpoint by issuing the following call:
http://
<PC_host>
:8181/pc/center/rest/users/documentation
  • userID
    The internally-assigned value for the user account.
  • name
    The login name for the user account. The name is limited to 50 characters.
  • description
    (Optional) The description of the user account to help you identify it.
  • enabled
    Defines whether the user account is enabled for use (activated).
  • removable
    Defines whether you can remove, or delete, the user account from the database.
    Values:
    true or false.
    You can delete all user accounts except the
    admin
    and
    user
    predefined user accounts.
  • timezone (tz)
    Corresponds to the time zone in which the user views report data.
    Default:
    UTC (Coordinated Universal Time)
  • userLevel
    Identifies the product privilege assigned to the user account.
  • role
    Specifies the role assigned to the user account.
  • permissionId
    Specifies the ID for the
    My Assigned Groups
    for the user account.
  • tenantId
    The internal (database) identifier for the tenant with which the user account is associated.
  • culture
    Specifies the language (locale) code for the user.
    Options:
    • en-US (English, United States)
    • fr-FR (French, France)
    • ja-JP (Japanese)
    For more information about the languages that
    DX NetOps Performance Management
    supports, see Language Support.
    You can view the current values for the
    culture
    parameter for users that are associated with the same tenant as the account that is used to run this command by issuing the following GET call:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/<
    cultureId>
    • cultureId
      The language code for the language in which you would like to view the output, such as
      en-US
      .
Users Web Service Example Syntax
The following HTTP methods are available with the
users
endpoint:
Available GET Methods
  • get groups owned by user
    Retrieves a list of groups for the specified user. The groups that are returned are groups that are owned by the specified user, meaning that this user can modify or delete these groups:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/<
    idName>
    /<
    idValue>
    /groupsOwnedByUser
  • get groups
    Retrieves a list of groups to which the specified user has view access:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/<
    idName>
    /<
    idValue>
    /groups
    The groups that are returned are groups that are within the permission set of the specified user. The user cannot modify or delete these groups.
  • get administered groups
    Retrieves a list of all administered groups associated with a specified user account:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /administeredGroups
  • get id names
    Retrieves a list of identifiers that can be used to identify users in other web service methods.
  • idValue
    The value for the identifying category. For example, if
    idName
    is
    userID
    , provide the user ID. If
    idName
    is
    userName
    , provide the login name for the user acount.
  • get authentication types
    Returns a list of identifiers that can be used to assign authentication types to users:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/authenticationTypes
Available PUT Methods
  • update password
    Changes the password of a specified user account:
    Passwords are sent in cleartext to avoid publicizing the encryption key that the web service uses. As a result, to protect the password privacy, change the password using the
    users
    endpoint for the
    NetOps Portal
    REST web service
    only
    on the
    NetOps Portal
    host.
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /password/
    <newPassword>
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    • newPassword
      The new URL-encoded password for the user. For example, if the password contains a question mark (?), URL-encode that character as "%3f".
  • update role
    Updates the role assignment of a specified user account:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /role/
    <roleIdName>
    /
    <roleIdValue>
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    • roleIdName
      The name for the role ID.
    • roleIdValue
      The value for the property denoted by roleIdName.
  • update time zone
    Updates the time zone of a specified user account:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /timeZone/
    <newTimeZone>
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    • newTimeZone
      The new time zone for the user.
  • set groups
    Updates the permission groups that have been granted to a specified user account:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /groups
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    XML Format:
    <group> <group ID="5245"/> <group ID="5246"/> <group ID="5247"/> ... </group>
  • add groups
    Adds the specified groups:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /addGroups
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    XML Format:
    <group> <group ID="5245"/> <group ID="5246"/> <group ID="5247"/> ... </group>
  • remove groups
    Removes the specified groups:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /removeGroups
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    XML Format:
    <group> <group ID="5245"/> <group ID="5246"/> <group ID="5247"/> ... </group>
  • set administered groups
    Updates the branches of the groups tree to which the specified user has administrative access:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /administeredGroups
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    XML Format:
    <group> <group ID="5245"/> <group ID="5246"/> <group ID="5247"/> ... </group>
  • set default group
    Updates the default group for the specified user:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /defaultGroup/
    <groupId>
    Example:
    http://PC.mycompany.net:8181/pc/center/webservice/users/userId/7/defaultGroup/11
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    • groupId
      The ID for the default group that you want to set for the user.
  • add administered groups
    Adds the specified groups to a user account:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /addAdministeredGroups
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    XML Format:
    <group> <group ID="5245"/> <group ID="5246"/> <group ID="5247"/> ... </group>
  • remove administered groups
    Removes the specified groups from a user account:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /removeAdministeredGroups
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    XML Format:
    <group> <group ID="5245"/> <group ID="5246"/> <group ID="5247"/> ... </group>
  • update product privilege per datasource
    Updates the product privilege of a specified user account to enable access to the user interface of a specific data source:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /ds/
    dsId
    /productPrivilege/
    newProductPrivilege
    • idName
      A property name value that the
      get id names
      method of this web service returns.
    • idValue
      A value for the property denoted by idName.
    • dsId
      The ID for the data source that you want to grant access to for the user.
Available POST Methods
  • create
    Creates and configure a user account. This user is associated with the tenant for the logged-in user. If you are deploying multi-tenancy, this user is assigned to the tenant of the authenticated user account making the REST service call. If you are not deploying multi-tenancy, this association is transparent to you; new user accounts are associated with the default tenant. The parameters include a role assignment:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/role/
    <roleIdName>
    /
    <roleIdValue>
    • roleIdName
      If you do not know the
      roleIdName
      , issue a GET call to the following URL:
      http://
      PC_host
      :8181/pc/center/webservice/roles/idNames
      Examples:
      • roleName
      • roleId
    • roleIdValue
      This value depends on the
      roleIdName
      that you selected. For example, if
      roleName
      is used, substitute a valid role name for
      roleIdValue
      .
      This role must be available within the tenant.
    Provide a valid
    Username
    and
    Password
    for a user account that has host or tenant administrator access to
    NetOps Portal
    .
    The password is automatically set to be the same as the user name.
    XML Format:
    <user> <name>{UserName}</name> <description>{UserDescription}</description> <enabled>{UserEnabled}</enabled> <removable>{UserRemovable}</removable> <timezone>{UserTimeZone}</timezone> <culture>{UserCulture}</culture> <administeredGroups> <group ID="{groupID}"/> <group ID="{groupID}"/> </administeredGroups> </user>
    Replace values with the values that you want to use for this user account.
    For example, supply the following parameters:
    <user> <name>Jane Doe</name> <description>User associated with the John Doe Corporation tenant.</description> <enabled>true</enabled> <removable>true</removable> <timezone>CST6CDT</timezone> <culture>en-US</culture> <administeredGroups> <group ID="105"/> <group ID="367"/> </administeredGroups> </user>
    The
    administeredGroups
    tag is optional. To create a user without administered groups, exclude the tag.
  • create in tenant
    Creates a user account in the specified tenant, with the specified role assignment:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/tenant/
    <tenantIdName>
    /
    <tenantIdValue>
    /role/
    <roleIdName>
    /
    <roleIdValue>
    • tenantIdName
      The tenant ID name.
    • tenantIdValue
      The tenant ID value for the tenant in which to create the new user account.
    • roleIdName
      The role ID name for the role to assign to the new user account.
  • clear administered groups
    Clears administered groups with a special ID that indicates no groups are selected:
    http://
    <PC_host>
    :8181/pc/center/webservice/users/
    <idName>
    /
    <idValue>
    /administeredGroups
    XML Format:
    <group> <group ID="2"/> </group>
User Account Product Privilege Settings
Use
NetOps Portal
to determine the product privilege of a specified user account. The
product privilege
is a type of permission set associated with a user account. The product privilege grants user access to features in selected data sources and does not apply to
NetOps Portal
functionality.
User accounts have one of the following product privilege assignments:
  • NONE
    Indicates that this user does note have access to a specified data source.
  • ADMINISTRATOR
    Indicates that this user has the administrator product privilege for the indicated data source and can perform administrative tasks.
  • POWER_USER
    Indicates that this user has the power user product privilege for the indicated data source and can perform some administrative tasks associated with user accounts and dashboards.
  • USER
    Indicates that this user has the user product privilege for the indicated data source and has no access to administrative features.