Previous Topic

Next Topic

Book Contents

Book Index

User Admin JSON-RPC API

A description of the Methods and Objects exported by the JSON-RPC User Admin Remote Handler.

Methods

Method

Return Value

Parameters

Parameter Description

UA/createUser

User. The newly created user or null if such a user already exists.

  • name: string
  • password: string
  • name: string – The name of the user to create.
  • password: string – The user password set as a credential to the User.

UA/createGroup

Group. The newly created group or null if such a group already exists.

  • name: string
  • name: string – The name of the group to create.

UA/removeRole

Boolean. True if the role (user or group) with the given name is removed, or false if such a role is not available.

  • name: string
  • name: string – The name of the role to remove.

UA/getRole

Role. The requested role or null if the User Admin does not have a role with the given name.

  • name: string
  • name: string – The name of the role.

UA/getRoles

Role[]. List of roles in the User Admin that have properties matching the specified LDAP filter. There will be an error if the filter is not well formed.

  • filter: string
  • filter: string – The LDAP filter criteria to match.

UA/getUsers

User[]. List of all current users in the User Admin

UA/getGroups

Group[]. List of all current groups in the User Admin.

UA/getUser

User. The user with the given property key-value pair. Null is returned if zero or more than one matching users are found.

  • key: string
  • value: string
  • key: string – The property key to look for.
  • value: string – The property value to compare with.

UA/addMember

Boolean. True if the given role could be added as a basic member, and false if the given group already contains a role with the given name. There will be an error if the target group or the role to add is not found.

  • group: string
  • role: string
  • group: string – The name of the group to which the target role will be added.
  • role: string – The name of the role to add as a basic member.

A/addRequiredMember

Boolean. True if the given role could be added as a required member, and false if the given group already contains a role with the specified name. There will be an error if the target group or the role to add is not found.

  • group: string
  • role: string
  • group: string – The name of the group to which the target role will be added.
  • role: string – The name of the role to add as a required member.

UA/removeMember

Boolean. True if the given role could be removed from the group, and false otherwise. There will be an error if the target group or the role to remove is not found.

  • group: string
  • role: string
  • group: string – The name of the group from which the target role will be removed.
  • role: string – The name of the role to be removed.

UA/setPassoword

There will be an error if the target user does not exist.

  • user: string
  • password: string
  • user: string – The name of the user whose password will be set.
  • password: string – The password of the user that will be set as his credential.

UA/setProperties

Any old properties will be removed and replaced with the new set. There will be an error if the target role is not found or the properties contain invalid keys or values.

  • name: string
  • properties: Property[]
  • name: string – The name of the role whose properties will be updated.
  • properties: Property[] – The new set of properties for the role.

UA/setDetails

Utility method to update multiple details in one request. Some of the parameters are used depending on the type of the target role. The will be an error if the target role does not exist, or the properties contain invalid keys or values.

  • name: string
  • properties: Property[]
  • membership: string[]
  • basicMembers: string[]
  • requiredMembers: string[]
  • name: string – The name of the role to be updated.
  • properties: Property[] – The new set of properties for the role.
  • membership: string[] – List of group names where the given role must be added as a member. Used only if the target role is a user, ignored if it is a group.
  • basicMembers: string[] – List of user names which must be added as basic members to the target group. Used only if the target role is a group, ignored if it is a user.
  • requiredMembers: string[] – List of user names which must be added as required members to the target group. Used only if the target role is a group, ignored if it is a user.

UA/getMembership

String[]. List of names of the groups where the given user is added as a member. Null is returned if the given name is not known to the User Admin. There sill be an error if the given name is of a group.

  • user: string
  • user: string – The name of the user whose membership will be returned.

Objects

Object

Field

Description

Supported JSON Types

No

  • string
  • object
  • array
  • true
  • false
  • null

Property

  • key: string
  • val: string or byte[]
  • key: string – Property key. Only objects of type String may be used as property keys.
  • val: string or byte[] – Property value. Only objects of type String or byte[] may be used as property values.

Role

  • Name: string
  • Type: int
  • Properties: object
  • Name: string – The name of the role.
  • Type: int – The type of the Role. 1 means User, 2 means Group.
  • Properties: object – Properties of the role. A set of key-value pairs. Only objects of type String may be used as property keys, and only objects of type String or byte[] may be used as property values.

User extends Role

  • Credentials: object
  • Credentials: object – Credentials for the user. A set of key-value pairs. Only objects of type String may be used as credential keys, and only objects of type String or of type byte[] may be used as credential values.

Group extends Role

  • Members: Member[]
  • RequiredMembers: Member[]
  • Members: Member[] – List of basic members added to the given group. Optional as the group may not have any basic members.
  • RequiredMembers: Member[] – List of required members added to the given group. Optional as the group may not have any required members.

Member

  • Name: string
  • Type: int
  • Name: string – The name of the member.
  • Type: int – The type of the member: 1 –User, 2–Group