RPC API documentation v34.4.0

Back to Documentation Version:  General How to use RPC Managers AttributesManagerAuditMessagesManagerAuthzResolverCabinetManagerConfigManagerConsentsManagerDatabaseManagerExtSourcesManagerFacilitiesManagerGroupsManagerIntegrationManagerMembersManagerNotificationManagerOwnersManagerRTMessagesManagerRegistrarManagerResourcesManagerSearcherSecurityTeamsManagerServicesManagerTasksManagerUsersManagerVosManager

UsersManager

Add specific user owner (the user).

Parameter nameData typeDescription
userintUser id
specificUserintSpecific user id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/addSpecificUserOwner

Example params

{ "user" : 54 , "specificUser" : 94 }

Example response

null

Adds user's external sources.

Parameter nameData typeDescription
userintUser id
userExtSourceUserExtSourceJSON object
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserExtSourceNewly added UserExtSource

Example URL

https://[hostname]/krb/rpc/json/usersManager/addUserExtSource

Example params

{ "user" : 84 , "userExtSource" : { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } }

Example response

{ "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" }

Adds user's external source and its attributes.

Parameter nameData typeDescription
userintUser id
userExtSourceUserExtSourceJSON object
attributesList<Attribute>list of Attribute
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
RichUserExtSourceNewly added RichUserExtSource

Example URL

https://[hostname]/krb/rpc/json/usersManager/addUserExtSourceWithAttributes

Example params

{ "user" : 64 , "userExtSource" : { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] }

Example response

{ ... TODO ... }

Anonymizes user - according to configuration, each of user's attributes is either anonymized, kept untouched or deleted. Also deletes other user's related data, e.g. authorships of users publications, mail change and password reset requests, bans... the anonymization process or if the anonymization is not supported at this instance.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
AnonymizationNotSupportedExceptionWhen an attribute should be anonymized but its module doesn't specify
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RelationExistsExceptionWhen the User has some members assigned.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
UserNotExistsExceptionWhen the User specified by id doesn't exist.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/anonymizeUser

Example params

{ "user" : 32 }

Example response

null

Anonymizes user (force) - according to configuration, each of user's attributes is either anonymized, kept untouched or deleted. Also deletes other user's related data, e.g. authorships of users publications, mail change and password reset requests, bans... Also removes associated members. the anonymization process or if the anonymization is not supported at this instance.

Parameter nameData typeDescription
userintUser id
forcebooleanIf true, use force anonymization
Thrown exceptionDescription
AnonymizationNotSupportedExceptionWhen an attribute should be anonymized but its module doesn't specify
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RelationExistsExceptionWhen the User has some members assigned.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
UserNotExistsExceptionWhen the User specified by id doesn't exist.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/anonymizeUser

Example params

{ "user" : 56 , "force" : true }

Example response

null

Block logins for given namespace

Parameter nameData typeDescription
loginsList<String>list of logins
namespaceStringNamespace
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
LoginExistsExceptionWhen some login is already in use
LoginIsAlreadyBlockedExceptionWhen some login is already blocked for given namespace (or globally)
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/blockLogins

Example params

{ "logins" : [ "text" , "text" ] , "namespace" : "text" }

Example response

null

Block logins globally (for all namespaces)

Parameter nameData typeDescription
loginsList<String>list of logins
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
LoginExistsExceptionWhen some login is already in use
LoginIsAlreadyBlockedExceptionWhen some login is already blocked for given namespace (or globally)
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/blockLogins

Example params

{ "logins" : [ "text" , "text" ] }

Example response

null

Changes user password in defined login-namespace. checkOldPassword is set to true.

Parameter nameData typeDescription
loginStringUsers login
namespaceStringNamespace
newPasswordStringNew password
oldPasswordStringOld password which will be checked. This parameter is required only if
checkOldPasswordbooleanTrue if the oldPassword have to be checked. When omitted it defaults to false.
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
InvalidLoginExceptionWhen login of user has invalid syntax (is not allowed)
PasswordStrengthExceptionWhen password doesn't match expected strength by namespace configuration
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/changePassword

Example params

{ "login" : "text" , "namespace" : "text" , "newPassword" : "text" , "oldPassword" : "text" , "checkOldPassword" : true }

Example response

null

Changes user password in defined login-namespace. checkOldPassword is set to true.

Parameter nameData typeDescription
userintUser id
namespaceStringNamespace
newPasswordStringNew password
oldPasswordStringOld password which will be checked. This parameter is required only if
checkOldPasswordbooleanTrue if the oldPassword have to be checked. When omitted it defaults to false.
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
InvalidLoginExceptionWhen login of user has invalid syntax (is not allowed)
LoginNotExistsExceptionWhen user doesn't have login in specified namespace
PasswordStrengthExceptionWhen password doesn't match expected strength by namespace configuration
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/changePassword

Example params

{ "user" : 50 , "namespace" : "text" , "newPassword" : "text" , "oldPassword" : "text" , "checkOldPassword" : true }

Example response

null

Generates new random password for given user and returns PDF file with information about the new password.

The HTML template is taken from entityless attribute randomPwdResetTemplate and the loginNamespace is used as a key.

Warning: No matter which serializer you specify, this method always returns .pdf file as an attachment.

Parameter nameData typeDescription
userIdIntegerID of User to change password to random
loginNamespaceStringnamespace that will be used
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
PDFPDF document with password

Example URL

https://[hostname]/krb/rpc/json/usersManager/changePasswordRandom

Example params

{ "userId" : {...} , "loginNamespace" : "text" }

Example response

{ ... TODO ... }

Check password strength for the given namespace. If the password is too weak, the PasswordStrengthException is thrown

Parameter nameData typeDescription
passwordStringpassword, that will be checked
namespaceStringnamespace, that will be used to check the strength of the password
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PasswordStrengthExceptionWhen password doesn't match expected strength by namespace configuration
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/checkPasswordStrength

Example params

{ "password" : "text" , "namespace" : "text" }

Example response

null

Check password strength for the given namespace. If the password is too weak, the PasswordStrengthException is thrown

Parameter nameData typeDescription
passwordStringpassword, that will be checked
namespaceStringnamespace, that will be used to check the strength of the password
loginStringlogin, which may be required for correct password strength check
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PasswordStrengthExceptionWhen password doesn't match expected strength by namespace configuration
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/checkPasswordStrength

Example params

{ "password" : "text" , "namespace" : "text" , "login" : "text" }

Example response

null

Creates alternative password in external system.

Parameter nameData typeDescription
userintUsers id
descriptionStringDescription of a password (e.g. 'mobile phone', 'tablet', ...)
loginNamespaceStringLogin namespace
passwordStringString representation of password
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/createAlternativePassword

Example params

{ "user" : 83 , "description" : "text" , "loginNamespace" : "text" , "password" : "text" }

Example response

null

From given candidate, creates a service user and assign given owners to him. This method also checks if some of given userExtSources do exist. If so, this method throws a UserExtSourceExistsException. This method can also set only user-def and user-opt attributes for the given candidate. some other attribute constraint

Parameter nameData typeDescription
candidateCandidatecandidate
specificUserOwnersList<User>owners to be set for the new user
Thrown exceptionDescription
AttributeNotExistsExceptionif some of the given attributes dont exist
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
PrivilegeExceptioninsufficient permissions
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
UserExtSourceExistsExceptionif some of the given UES already exist
UserNotExistsExceptionif some of the given owners does not exist
WrongAttributeAssignmentExceptionif some of the given attributes have unsupported namespace
WrongAttributeValueExceptionif some of the given attribute value is invalid
WrongReferenceAttributeValueExceptionif some of the given attribute value cannot be set because of
Return typeDescription
Usercreated service user

Example URL

https://[hostname]/krb/rpc/json/usersManager/createServiceUser

Example params

{ "candidate" : { "id" : 0 , "serviceUser" : false , "firstName" : "Random" , "lastName" : "Name" , "middleName" : null , "titleBefore" : "Dr." , "titleAfter" : null , userExtSource : { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , additionalUserExtSources : null , attributes : { "urn:perun:member:attribute-def:def:organization" : "Masarykova univerzita" , "urn:perun:member:attribute-def:def:mail" : "random@name.cz" } } , "specificUserOwners" : [ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ] }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Deletes alternative password in external system.

Parameter nameData typeDescription
userintUsers id
loginNamespaceStringLogin namespace
passwordIdStringPassword id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/deleteAlternativePassword

Example params

{ "user" : 5 , "loginNamespace" : "text" , "passwordId" : "text" }

Example response

null

Delete password for a user in specified login-namespace.

Parameter nameData typeDescription
loginStringLogin
namespaceStringNamespace
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
InvalidLoginExceptionWhen login of user has invalid syntax (is not allowed)
PasswordDeletionFailedExceptionWhen deleting password failed
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/deletePassword

Example params

{ "login" : "text" , "namespace" : "text" }

Example response

null

Deletes a user. User is not deleted, if is member of any VO or is associated with any service identity. from DB

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
DeletionNotSupportedException if the deletion of users is not supported at this instance
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
MemberAlreadyRemovedException if there is at least 1 member deleted but not affected by deleting
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RelationExistsException if user has some members assigned
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
SpecificUserAlreadyRemovedExceptionif there are no rows affected by deleting specific user in DB
UserAlreadyRemovedException if there are no rows affected by deleting user in DB
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/deleteUser

Example params

{ "user" : 97 }

Example response

null

Deletes a user (force). Also removes associated members. from DB

Parameter nameData typeDescription
userintUser id
forcebooleanIf true, use force deletion.
Thrown exceptionDescription
DeletionNotSupportedException if the deletion of users is not supported at this instance
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
MemberAlreadyRemovedException if there is at least 1 member deleted but not affected by deleting
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RelationExistsException if forceDelete is false and the user has some members assigned
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
SpecificUserAlreadyRemovedExceptionif there are no rows affected by deleting specific user in DBn
UserAlreadyRemovedException if there are no rows affected by deleting user in DB
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/deleteUser

Example params

{ "user" : 25 , "force" : true }

Example response

null

Returns list of RichUsers with attributes who matches the searchString, searching name, id, uuid, email, logins.

Parameter nameData typeDescription
searchStringStringsearched string
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>list of RichUsers

Example URL

https://[hostname]/krb/rpc/json/usersManager/findRichUsers

Example params

{ "searchString" : "text" }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Returns list of RichUsers with attributes who matches the searchString

Parameter nameData typeDescription
searchStringStringsearched string
attrsNamesList<String>list of attributes name
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>list of RichUsers

Example URL

https://[hostname]/krb/rpc/json/usersManager/findRichUsersWithAttributes

Example params

{ "searchString" : "text" , "attrsNames" : [ "text" , "text" ] }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Return list of RichUsers who matches the searchString and are not member in specific VO and with selected attributes.

Parameter nameData typeDescription
voVOvirtual organization
searchStringStringsearched string
attrsNameList<String>list of attributes name
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>list of RichUsers

Example URL

https://[hostname]/krb/rpc/json/usersManager/findRichUsersWithoutSpecificVoWithAttributes

Example params

{ "vo" : {...} , "searchString" : "text" , "attrsName" : [ "text" , "text" ] }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Returns list of users who matches the searchString, searching name, id, uuid, email, logins.

Parameter nameData typeDescription
searchStringStringString to search by
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Found users

Example URL

https://[hostname]/krb/rpc/json/usersManager/findUsers

Example params

{ "searchString" : "text" }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Returns list of users who matches the searchString.

Parameter nameData typeDescription
searchStringStringString to search by
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Found users

Example URL

https://[hostname]/krb/rpc/json/usersManager/findUsersByName

Example params

{ "searchString" : "text" }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Returns list of users who matches the parameters. All parameters must be present, even if empty.

Parameter nameData typeDescription
titleBeforeStringTitle before name
firstNameStringFirst name
middleNameStringMiddle name
lastNameStringLast name
titleAfterStringTitle after
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Found users

Example URL

https://[hostname]/krb/rpc/json/usersManager/findUsersByName

Example params

{ "titleBefore" : "text" , "firstName" : "text" , "middleName" : "text" , "lastName" : "text" , "titleAfter" : "text" }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Generate user account in a backend system associated with login-namespace in Perun. This method consumes optional parameters map. Requirements are implementation-dependant for each login-namespace. Returns map with 1: key=login-namespace attribute urn, value=generated login 2: rest of opt response attributes...

Parameter nameData typeDescription
namespaceString
parametersMap
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PasswordStrengthExceptionWhen password doesn't match expected strength by namespace configuration
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
Map<String,String> Map of data from backed response

Example URL

https://[hostname]/krb/rpc/json/usersManager/generateAccount

Example params

{ "namespace" : "text" , "parameters" : {...} }

Example response

{ ... TODO ... }

Generate user account in a backend system associated with login-namespace in Perun. Login-namespace might require more parameters, call this method with map of all parameters in a map then. Returns map with 1: key=login-namespace attribute urn, value=generated login 2: rest of opt response attributes...

Parameter nameData typeDescription
namespaceString
nameString
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PasswordStrengthExceptionWhen password doesn't match expected strength by namespace configuration
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
Map<String,String> Map of data from backed response

Example URL

https://[hostname]/krb/rpc/json/usersManager/generateAccount

Example params

{ "namespace" : "text" , "name" : "text" }

Example response

{ ... TODO ... }

Returns all blocked logins in namespaces (if namespace is null, then this login is blocked globally)

Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<BlockedLogin>list of all blocked logins in namespaces

Example URL

https://[hostname]/krb/rpc/json/usersManager/getAllBlockedLoginsInNamespaces

Example response

{ ... TODO ... }

Get All richUsers with or without specificUsers.

Parameter nameData typeDescription
includedSpecificUsersbooleanif you want to or don't want to get specificUsers too
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>all rich users without attributes

Example URL

https://[hostname]/krb/rpc/json/usersManager/getAllRichUsers

Example params

{ "includedSpecificUsers" : true }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Get All richUsers with or without specificUsers.

Parameter nameData typeDescription
includedSpecificUsersbooleanif you want to or don't want to get specificUsers too
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>all rich users with attributes

Example URL

https://[hostname]/krb/rpc/json/usersManager/getAllRichUsersWithAttributes

Example params

{ "includedSpecificUsers" : true }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Get all resources from the facility which have the user access on.

Parameter nameData typeDescription
userintUser id
facilityintFacility id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>Allowed resources

Example URL

https://[hostname]/krb/rpc/json/usersManager/getAllowedResources

Example params

{ "user" : 20 , "facility" : 45 }

Example response

[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]

Get all resources which have the user access on.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>Allowed resources

Example URL

https://[hostname]/krb/rpc/json/usersManager/getAllowedResources

Example params

{ "user" : 90 }

Example response

[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]

Get all rich resources which have the user assigned.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichResource>Assigned rich resources

Example URL

https://[hostname]/krb/rpc/json/usersManager/getAssignedRichResources

Example params

{ "user" : 96 }

Example response

[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] } , {...} , {...} ]

Return all resources of specified facility with which user is associated through all his members. Does not require ACTIVE group-resource assignment.

Parameter nameData typeDescription
facilityintFacility id
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichResource>All resources with which user is associated

Example URL

https://[hostname]/krb/rpc/json/usersManager/getAssociatedResources

Example params

{ "facility" : 62 , "user" : 52 }

Example response

[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] } , {...} , {...} ]

Get a page of blocked logins

Parameter nameData typeDescription
queryBlockedLoginsPageQuery
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
pageof blocked logins based on the query

Example URL

https://[hostname]/krb/rpc/json/usersManager/getBlockedLoginsPage

Example params

{ "query" : {...} }

Example response

{ ... TODO ... }

Get list of groups of user on specified resource where use is active, that means User is a VALID in the VO and the Group and groups are assigned to the resource.

Parameter nameData typeDescription
resourceIntegerID of Resource
userIntegerID of User
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Group>Groups where User is active

Example URL

https://[hostname]/krb/rpc/json/usersManager/getGroupsWhereUserIsActive

Example params

{ "resource" : {...} , "user" : {...} }

Example response

[ { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , {...} , {...} ]

Get list of groups of user on specified resource where use is active, that means User is a VALID in the VO and the Group and groups are assigned to the facility.

Parameter nameData typeDescription
facilityIntegerID of Facility
userIntegerID of User
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Group>Groups where User is active

Example URL

https://[hostname]/krb/rpc/json/usersManager/getGroupsWhereUserIsActive

Example params

{ "facility" : {...} , "user" : {...} }

Example response

[ { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , {...} , {...} ]

Returns list of Groups in Perun, where the User is a direct Administrator or he is a VALID member of any group which is Administrator of some of these Groups.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Group>Found Groups

Example URL

https://[hostname]/krb/rpc/json/usersManager/getGroupsWhereUserIsAdmin

Example params

{ "user" : 98 }

Example response

[ { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , {...} , {...} ]

Returns list of Groups in selected Vo, where the User is a direct Administrator or he is a VALID member of any group which is Administrator of some of these Groups.

Parameter nameData typeDescription
userintUser id
vointVo id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Group>Found Groups

Example URL

https://[hostname]/krb/rpc/json/usersManager/getGroupsWhereUserIsAdmin

Example params

{ "user" : 11 , "vo" : 42 }

Example response

[ { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , {...} , {...} ]

Return list of email addresses of user, which are awaiting validation and are inside time window for validation. If there is no preferred email change request pending or requests are outside time window for validation, returns empty list.

Parameter nameData typeDescription
userintid of user to check
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<String>user's email addresses pending validation

Example URL

https://[hostname]/krb/rpc/json/usersManager/getPendingPreferredEmailChanges

Example params

{ "user" : 76 }

Example response

{ ... TODO ... }

Get list of rich groups of user on specified resource with group attributes specified by the list of their names. Groups where user is active are returned, that means groups, where User is a VALID in the VO and the Group and groups are assigned to the resource.

Parameter nameData typeDescription
resourceIntegerID of Resource
userIntegerID of User
attrNamesList<String>Attribute names (list of their URNs)
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichGroup>Groups where User is active

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichGroupsWhereUserIsActive

Example params

{ "resource" : {...} , "user" : {...} , "attrNames" : [ "text" , "text" ] }

Example response

[ { "id" : 1061 , "name" : "My Group" , "shortName" : "My Group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "RichGroup" , "attributes" : [ { "value" : null , "type" : "java.lang.String" , "entity" : "group" , "namespace" : "urn:perun:group:attribute-def:def" , "friendlyName" : "synchronizationEnabled" , "writable" : true , "baseFriendlyName" : "synchronizationEnabled" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "Synchronization enabled" , "description" : "Enables group synchronization from external source." , "id" : 103 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Get list of rich groups of user on specified resource with group attributes specified by the list of their names. Groups where user is active are returned, that means groups, where User is a VALID in the VO and the Group and groups are assigned to the facility.

Parameter nameData typeDescription
facilityIntegerID of Facility
userIntegerID of User
attrNamesList<String>Attribute names (list of their URNs)
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichGroup>Groups where User is active

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichGroupsWhereUserIsActive

Example params

{ "facility" : {...} , "user" : {...} , "attrNames" : [ "text" , "text" ] }

Example response

[ { "id" : 1061 , "name" : "My Group" , "shortName" : "My Group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "RichGroup" , "attributes" : [ { "value" : null , "type" : "java.lang.String" , "entity" : "group" , "namespace" : "urn:perun:group:attribute-def:def" , "friendlyName" : "synchronizationEnabled" , "writable" : true , "baseFriendlyName" : "synchronizationEnabled" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "Synchronization enabled" , "description" : "Enables group synchronization from external source." , "id" : 103 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Get User to RichUser without attributes.

Parameter nameData typeDescription
userintuser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
RichUserfound rich user

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUser

Example params

{ "user" : 78 }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] }

Gets list of all user's external sources with attributes.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<UserExtSource>list of user's external sources with attributes

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUserExtSources

Example params

{ "user" : 17 }

Example response

[ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ]

Gets list of all user's external sources with specified attributes. If attrsNames is empty return no attributes. If attrsNames is null, this methods returns all attributes.

Parameter nameData typeDescription
userintUser id
attrsNamesList<String>Attribute names
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<UserExtSource>list of user's external sources with specified attributes

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUserExtSources

Example params

{ "user" : 2 , "attrsNames" : [ "text" , "text" ] }

Example response

[ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ]

Get User to RichUser with attributes.

Parameter nameData typeDescription
userintuser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
RichUserfound rich user with attributes

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUserWithAttributes

Example params

{ "user" : 2 }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] }

Returns rich users without attributes by their IDs.

Parameter nameData typeDescription
idsList<Integer>list of users IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>rich users with specified IDs

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUsersByIds

Example params

{ "ids" : [ 52 , 75 ] }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Get All richUsers with or without specificUsers with selected attributes.

Parameter nameData typeDescription
attrsNamesList<String>list of attributes name
includedSpecificUsersbooleanif you want to or don't want to get specificUsers too
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>list of RichUsers

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUsersWithAttributes

Example params

{ "attrsNames" : [ "text" , "text" ] , "includedSpecificUsers" : true }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Get All richUsers with or without specificUsers with all included attributes.

Parameter nameData typeDescription
includedSpecificUsersbooleanif you want to or don't want to get specificUsers too
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>list of RichUsers

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUsersWithAttributes

Example params

{ "includedSpecificUsers" : true }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Returns rich users with attributes by their IDs.

Parameter nameData typeDescription
idsList<Integer>list of users IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>rich users with specified IDs

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUsersWithAttributesByIds

Example params

{ "ids" : [ 13 , 35 ] }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Returns all RichUsers with attributes who are not member of any VO.

Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>list of richUsers who are not member of any VO

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUsersWithoutVoAssigned

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Returns list of RichUsers which are not members of any VO and with selected attributes

Parameter nameData typeDescription
attrsNamesList<String>list of attributes name
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichUser>list of RichUsers

Example URL

https://[hostname]/krb/rpc/json/usersManager/getRichUsersWithoutVoWithAttributes

Example params

{ "attrsNames" : [ "text" , "text" ] }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]

Returns all specific users in Perun.

Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>All Perun service users

Example URL

https://[hostname]/krb/rpc/json/usersManager/getSpecificUsers

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Return all specific users who are owned by the user.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Specific users for a user

Example URL

https://[hostname]/krb/rpc/json/usersManager/getSpecificUsersByUser

Example params

{ "user" : 88 }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Gets users sponsoring a given user in a VO.

Parameter nameData typeDescription
memberintmember id
attrNamesList<String>names of attributes to return, empty to return all attributes
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Sponsor>sponsors

Example URL

https://[hostname]/krb/rpc/json/usersManager/getSponsorsForMember

Example params

{ "member" : 85 , "attrNames" : [ "text" , "text" ] }

Example response

{ ... TODO ... }

Gets users sponsoring a given user in a VO.

Parameter nameData typeDescription
vointVO ID
extSourceNameStringexternal source name, usually SAML IdP entityID
extLoginStringexternal source login, usually eduPersonPrincipalName
attrNamesList<String>names of attributes to return, empty to return all attributes
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Sponsor>sponsors

Example URL

https://[hostname]/krb/rpc/json/usersManager/getSponsorsForMember

Example params

{ "vo" : 24 , "extSourceName" : "text" , "extLogin" : "text" , "attrNames" : [ "text" , "text" ] }

Example response

{ ... TODO ... }

Returns user by his login in external source and external source.

Parameter nameData typeDescription
extSourceNameStringExt source name
extLoginStringExt source login
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserUser object

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserByExtSourceNameAndExtLogin

Example params

{ "extSourceName" : "text" , "extLogin" : "text" }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Returns user by its id.

Parameter nameData typeDescription
idintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserUser object

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserById

Example params

{ "id" : 73 }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Returns user by VO member.

Parameter nameData typeDescription
memberintMember id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserUser object

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserByMember

Example params

{ "member" : 20 }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Returns user based on one of the userExtSource.

Parameter nameData typeDescription
userExtSourceUserExtSourceJSON object UserExtSource
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserUser object

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserByUserExtSource

Example params

{ "userExtSource" : { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Gets user's external source by the user's external login and external source.

Parameter nameData typeDescription
extSourceExtSourceJSON object
extSourceLoginStringLogin
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserExtSourceUserExtSource found user's external source

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserExtSourceByExtLogin

Example params

{ "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "extSourceLogin" : "text" }

Example response

{ "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" }

Gets user's external source by the user's external login and external source name

Parameter nameData typeDescription
extSourceNameStringName of ext source (eg. entityID of IdP)
extSourceLoginStringLogin
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserExtSourceUserExtSource found user's external source

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserExtSourceByExtLoginAndExtSourceName

Example params

{ "extSourceName" : "text" , "extSourceLogin" : "text" }

Example response

{ "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" }

Get the user ext source by its id.

Parameter nameData typeDescription
userExtSourceintUserExtSource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserExtSourceUser external source for the id

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserExtSourceById

Example params

{ "userExtSource" : 87 }

Example response

{ "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" }

Return userExtSource for specific attribute definition (specified by id) and unique value. If not found, throw and exception. It looks for exactly one value of the specific attribute type: - Integer -> exactly match - String -> exactly match - Map -> exactly match of "key=value" - ArrayList -> exactly match of one of the value userExtSource namespace

Parameter nameData typeDescription
attributeIdintvalue used for founding attribute definition which has to exists, be unique and in
attributeValueStringvalue used for searching
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserExtSourceobject found by attribute id and it's unique value

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserExtSourceByUniqueAttributeValue

Example params

{ "attributeId" : 31 , "attributeValue" : "text" }

Example response

{ "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" }

Return userExtSource for specific attribute definition (specified by name) and unique value. If not found, throw and exception. It looks for exactly one value of the specific attribute type: - Integer -> exactly match - String -> exactly match - Map -> exactly match of "key=value" - ArrayList -> exactly match of one of the value userExtSource namespace

Parameter nameData typeDescription
attributeNameStringvalue used for founding attribute definition which has to exists, be unique and in
attributeValueStringvalue used for searching
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserExtSourceobject found by attribute name and it's unique value

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserExtSourceByUniqueAttributeValue

Example params

{ "attributeName" : "text" , "attributeValue" : "text" }

Example response

{ "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" }

Gets list of all user's external sources of the user.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<UserExtSource>list of user's external sources

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserExtSources

Example params

{ "user" : 33 }

Example response

[ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ]

Returns user ext sources by their IDs.

Parameter nameData typeDescription
idsList<Integer>list of user ext sources IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<UserExtSource>user ext sources with specified IDs

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUserExtSourcesByIds

Example params

{ "ids" : [ 3 , 25 ] }

Example response

[ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ]

Returns all users in Perun.

Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>All Perun users

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsers

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Returns all users who have set the attribute with the value. Searching only def and opt attributes.

Parameter nameData typeDescription
attributeAttributeJSON object
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Found users

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersByAttribute

Example params

{ "attribute" : { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Returns all users who have set the attribute with the value. Searching only def and opt attributes.

Parameter nameData typeDescription
attributeNameStringURN of attribute to search by
attributeValueObjectValue to search by (type of value must match attribute value type)
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Found users

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersByAttribute

Example params

{ "attributeName" : "text" , "attributeValue" : {...} }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Returns all users who have attribute which have value which contains searchString.

Parameter nameData typeDescription
attributeNameStringURN of attribute to search by
attributeValueStringValue to search by
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Found users

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersByAttributeValue

Example params

{ "attributeName" : "text" , "attributeValue" : "text" }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Returns users by their IDs.

Parameter nameData typeDescription
idsList<Integer>list of users IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>users with specified IDs

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersByIds

Example params

{ "ids" : [ 87 , 4 ] }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Return all users who owns the specific user.

Parameter nameData typeDescription
specificUserintSpecific User id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Users for a service user

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersBySpecificUser

Example params

{ "specificUser" : 63 }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Gets count of all users.

Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
intUsers count

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersCount

Example response

90

Get page of users with the given attributes. Query parameter specifies offset, page size, sorting order, and sorting column, by default it finds all users, but the search can be customized by optional parameters: whether to return only users without vo, string to search users by (by default it searches in names, user and member ids, user uuids, emails, logins of member or other attributes based on perun configuration), facility id, vo id, service id and resource id to filter users to search only for those assigned to these entities, and option whether to return only allowed users.

Parameter nameData typeDescription
queryUsersPageQueryQuery with page information
attrNamesList<String>List of attribute names
Thrown exceptionDescription
FacilityNotExistsExceptionWhen the Facility specified by id in query does not exist.
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
ResourceNotExistsExceptionWhen the Resource specified by id in query does not exist.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
ServiceNotExistsExceptionWhen the Service specified by id in query does not exist.
VoNotExistsExceptionWhen the Vo specified by id in query does not exist.
Return typeDescription
Paginated<RichUser>page of requested rich users

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersPage

Example params

{ "query" : { "pageSize" : 3 , "offset" : 0 , "order" : "ASCENDING" , "sortColumn" : "ID" , "searchString" : "Doe" , "withoutVo" : false } , "attrNames" : [ "text" , "text" ] }

Example response

{ "offset" : 0 , "pageSize" : 3 , "totalCount" : 1 , "data" : [ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]  }

Return list of users who matches the searchString, searching name, email and logins and are not member of specific VO.

Parameter nameData typeDescription
vointVO id
searchStringStringString to search by
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Found users

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersWithoutSpecificVo

Example params

{ "vo" : 27 , "searchString" : "text" }

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Returns all users who are not member of any VO.

Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Found users

Example URL

https://[hostname]/krb/rpc/json/usersManager/getUsersWithoutVoAssigned

Example response

[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]

Returns list of VOs, where the user is an Administrator. Including VOs, where the user is a VALID member of authorized group.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Vo>Found VOs

Example URL

https://[hostname]/krb/rpc/json/usersManager/getVosWhereUserIsAdmin

Example params

{ "user" : 54 }

Example response

[ { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" } , {...} , {...} ]

Returns list of VOs, where the user is a Member.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Vo>Found VOs

Example URL

https://[hostname]/krb/rpc/json/usersManager/getVosWhereUserIsMember

Example params

{ "user" : 67 }

Example response

[ { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" } , {...} , {...} ]

Checks if the login is available in the namespace. Return 1 if yes, 0 if no.

Parameter nameData typeDescription
loginNamespaceStringNamespace
loginStringLogin
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
InvalidLoginExceptionWhen login to check has invalid syntax or is not allowed
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
int1: login available, 0: login not available

Example URL

https://[hostname]/krb/rpc/json/usersManager/isLoginAvailable

Example params

{ "loginNamespace" : "text" , "login" : "text" }

Example response

1

Move user's external source from sourceUser to targetUser.

Parameter nameData typeDescription
sourceUserintUser id
targetUserintUser id
userExtSourceintUserExtSource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/moveUserExtSource

Example params

{ "sourceUser" : 51 , "targetUser" : 77 , "userExtSource" : 75 }

Example response

null

Remove specific user owner (the user).

Parameter nameData typeDescription
userintUser id
specificUserintSpecific user id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/removeSpecificUserOwner

Example params

{ "user" : 51 , "specificUser" : 32 }

Example response

null

Remove user's external source. Persistent UserExtSources are not removed unless force param is present and set to true.

Parameter nameData typeDescription
userintUser id
userExtSourceintUserExtSource id
forcebooleanIf true, use force deletion.
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/removeUserExtSource

Example params

{ "user" : 91 , "userExtSource" : 12 , "force" : true }

Example response

null

Remove user's external sources. Persistent UserExtSources are not removed unless force param is present and set to true.

Parameter nameData typeDescription
userintUser id
userExtSourcesList<Integer>UserExtSource id
forcebooleanIf true, use force deletion.
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/removeUserExtSources

Example params

{ "user" : 65 , "userExtSources" : [ 65 , 70 ] , "force" : true }

Example response

null

Reserves password for a user in specified login-namespace.

Parameter nameData typeDescription
loginStringLogin
namespaceStringNamespace
passwordStringpassword
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
InvalidLoginExceptionWhen login has invalid syntax (is not allowed)
PasswordStrengthExceptionWhen password doesn't match expected strength by namespace configuration
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/reservePassword

Example params

{ "login" : "text" , "namespace" : "text" , "password" : "text" }

Example response

null

Set specific user type for specific user and set ownership of this user for the owner.

Parameter nameData typeDescription
specificUserintUser id
specificUserTypeStringspecific user type
ownerintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
Useruser with specific type set

Example URL

https://[hostname]/krb/rpc/json/usersManager/setSpecificUser

Example params

{ "specificUser" : 31 , "specificUserType" : "text" , "owner" : 5 }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Unblock logins for given namespace

Parameter nameData typeDescription
loginsList<String>list of logins
namespaceStringNamespace
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
LoginIsNotBlockedExceptionWhen some login is not blocked
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/unblockLogins

Example params

{ "logins" : [ "text" , "text" ] , "namespace" : "text" }

Example response

null

Unblock logins globally (for all namespaces)

Parameter nameData typeDescription
loginsList<String>list of logins
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
LoginIsNotBlockedExceptionWhen some login is not blocked
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/unblockLogins

Example params

{ "logins" : [ "text" , "text" ] }

Example response

null

Unblock logins by id

Parameter nameData typeDescription
loginsList<Integer>logins id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
LoginIsNotBlockedExceptionWhen some login is not blocked
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/unblockLoginsById

Example params

{ "logins" : [ 62 , 68 ] }

Example response

null

Remove all ownerships of this specific user and unset this specific user type from this specific user.

Parameter nameData typeDescription
specificUserintUser id
specificUserTypeStringspecific user type
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
Useruser without specific user type set

Example URL

https://[hostname]/krb/rpc/json/usersManager/unsetSpecificUser

Example params

{ "specificUser" : 63 , "specificUserType" : "text" }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Updates titles before/after users name Titles must be set in User object. Setting any title to null will remove title from name. Other user's properties are ignored.

Parameter nameData typeDescription
userUserJSON object with titles to set
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserUpdated user

Example URL

https://[hostname]/krb/rpc/json/usersManager/updateNameTitles

Example params

{ "user" : { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Updates users data in DB.

Parameter nameData typeDescription
userUserJSON object
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserUpdated user

Example URL

https://[hostname]/krb/rpc/json/usersManager/updateUser

Example params

{ "user" : { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } }

Example response

{ "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" }

Updates user's userExtSource in DB.

Parameter nameData typeDescription
userExtSourceUserExtSourceJSON object
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
UserExtSourceUpdated userExtSource

Example URL

https://[hostname]/krb/rpc/json/usersManager/updateUserExtSource

Example params

{ "userExtSource" : { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } }

Example response

{ "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" }

Updates user's userExtSource last access time in DB. We can get information which userExtSource has been used as a last one.

Parameter nameData typeDescription
userExtSourceintUserExtSource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/updateUserExtSourceLastAccess

Example params

{ "userExtSource" : 43 }

Example response

null

Validates password for a user in specified login-namespace. After that, user should be able to log-in in external authz system using his credentials. It also creates UserExtSources and sets some required attributes.

Parameter nameData typeDescription
loginStringLogin
namespaceStringNamespace
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
InvalidLoginExceptionWhen login of user has invalid syntax (is not allowed)
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/validatePassword

Example params

{ "login" : "text" , "namespace" : "text" }

Example response

null

Validate new preferred email address. Request to validate is determined based on token parameter sent in email notice by requestPreferredEmailChange() method.

Parameter nameData typeDescription
tokenStringtoken for the email change request to validate
uintid of user you want to validate preferred email request
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
Stringnew validated email address

Example URL

https://[hostname]/krb/rpc/json/usersManager/validatePreferredEmailChange

Example params

{ "token" : "text" , "u" : 61 }

Example response

"text"

Validate ssh public key, throws exception if validation fails

Parameter nameData typeDescription
sshKeyStringpublic ssh key to validate
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
SSHKeyNotValidExceptionwhen validation fails
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/usersManager/validateSSHKey

Example params

{ "sshKey" : "text" }

Example response

null