Add specific user owner (the user).
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
specificUser | int | Specific user id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/addSpecificUserOwner
Example params
{ "user" : 55 , "specificUser" : 70 }
Example response
null
Adds user's external sources.
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
userExtSource | UserExtSource | JSON object |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
UserExtSource | Newly added UserExtSource |
Example URL
https://[hostname]/krb/rpc/json/usersManager/addUserExtSource
Example params
{ "user" : 74 , "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 name | Data type | Description |
---|---|---|
user | int | User id |
userExtSource | UserExtSource | JSON object |
attributes | List<Attribute> | list of Attribute |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
RichUserExtSource | Newly added RichUserExtSource |
Example URL
https://[hostname]/krb/rpc/json/usersManager/addUserExtSourceWithAttributes
Example params
{ "user" : 43 , "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...
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
AnonymizationNotSupportedException | When an attribute should be anonymized but its module doesn't specify the anonymization process or if the anonymization is not supported at this instance. |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RelationExistsException | When the User has some members assigned. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
UserNotExistsException | When the User specified by id doesn't exist. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/anonymizeUser
Example params
{ "user" : 29 }
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.
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
force | boolean | If true, use force anonymization |
Thrown exception | Description |
---|---|
AnonymizationNotSupportedException | When an attribute should be anonymized but its module doesn't specify the anonymization process or if the anonymization is not supported at this instance. |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RelationExistsException | When the User has some members assigned. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
UserNotExistsException | When the User specified by id doesn't exist. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/anonymizeUser
Example params
{ "user" : 46 , "force" : true }
Example response
null
Block logins for given namespace
Parameter name | Data type | Description |
---|---|---|
logins | List<String> | list of logins |
namespace | String | Namespace |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
LoginExistsException | When some login is already in use |
LoginIsAlreadyBlockedException | When some login is already blocked for given namespace (or globally) |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
logins | List<String> | list of logins |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
LoginExistsException | When some login is already in use |
LoginIsAlreadyBlockedException | When some login is already blocked for given namespace (or globally) |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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.
Parameter name | Data type | Description |
---|---|---|
login | String | Users login |
namespace | String | Namespace |
newPassword | String | New password |
oldPassword | String | Old password which will be checked. This parameter is required only if checkOldPassword is set to true. |
checkOldPassword | boolean | True if the oldPassword have to be checked. When omitted it defaults to false. |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
InvalidLoginException | When login of user has invalid syntax (is not allowed) |
PasswordStrengthException | When password doesn't match expected strength by namespace configuration |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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.
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
namespace | String | Namespace |
newPassword | String | New password |
oldPassword | String | Old password which will be checked. This parameter is required only if checkOldPassword is set to true. |
checkOldPassword | boolean | True if the oldPassword have to be checked. When omitted it defaults to false. |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
InvalidLoginException | When login of user has invalid syntax (is not allowed) |
LoginNotExistsException | When user doesn't have login in specified namespace |
PasswordStrengthException | When password doesn't match expected strength by namespace configuration |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/changePassword
Example params
{ "user" : 37 , "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 name | Data type | Description |
---|---|---|
userId | Integer | ID of User to change password to random |
loginNamespace | String | namespace that will be used |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
PDF 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 name | Data type | Description |
---|---|---|
password | String | password, that will be checked |
namespace | String | namespace, that will be used to check the strength of the password |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PasswordStrengthException | When password doesn't match expected strength by namespace configuration |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
password | String | password, that will be checked |
namespace | String | namespace, that will be used to check the strength of the password |
login | String | login, which may be required for correct password strength check |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PasswordStrengthException | When password doesn't match expected strength by namespace configuration |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
user | int | Users id |
description | String | Description of a password (e.g. 'mobile phone', 'tablet', ...) |
loginNamespace | String | Login namespace |
password | String | String representation of password |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/createAlternativePassword
Example params
{ "user" : 86 , "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.
Parameter name | Data type | Description |
---|---|---|
candidate | Candidate | candidate |
specificUserOwners | List<User> | owners to be set for the new user |
Thrown exception | Description |
---|---|
AttributeNotExistsException | if some of the given attributes dont exist |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
PrivilegeException | insufficient permissions |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
UserExtSourceExistsException | if some of the given UES already exist |
UserNotExistsException | if some of the given owners does not exist |
WrongAttributeAssignmentException | if some of the given attributes have unsupported namespace |
WrongAttributeValueException | if some of the given attribute value is invalid |
WrongReferenceAttributeValueException | if some of the given attribute value cannot be set because of some other attribute constraint |
Return type | Description |
---|---|
User | created 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 name | Data type | Description |
---|---|---|
user | int | Users id |
loginNamespace | String | Login namespace |
passwordId | String | Password id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/deleteAlternativePassword
Example params
{ "user" : 73 , "loginNamespace" : "text" , "passwordId" : "text" }
Example response
null
Delete password for a user in specified login-namespace.
Parameter name | Data type | Description |
---|---|---|
login | String | Login |
namespace | String | Namespace |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
InvalidLoginException | When login of user has invalid syntax (is not allowed) |
PasswordDeletionFailedException | When deleting password failed |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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.
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
DeletionNotSupportedException | if the deletion of users is not supported at this instance |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
MemberAlreadyRemovedException | if there is at least 1 member deleted but not affected by deleting from DB |
PrivilegeException | When 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 |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
SpecificUserAlreadyRemovedException | if there are no rows affected by deleting specific user in DB |
UserAlreadyRemovedException | if there are no rows affected by deleting user in DB |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/deleteUser
Example params
{ "user" : 89 }
Example response
null
Deletes a user (force). Also removes associated members.
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
force | boolean | If true, use force deletion. |
Thrown exception | Description |
---|---|
DeletionNotSupportedException | if the deletion of users is not supported at this instance |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
MemberAlreadyRemovedException | if there is at least 1 member deleted but not affected by deleting from DB |
PrivilegeException | When 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 |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
SpecificUserAlreadyRemovedException | if there are no rows affected by deleting specific user in DBn |
UserAlreadyRemovedException | if there are no rows affected by deleting user in DB |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/deleteUser
Example params
{ "user" : 50 , "force" : true }
Example response
null
Returns list of RichUsers with attributes who matches the searchString, searching name, id, uuid, email, logins.
Parameter name | Data type | Description |
---|---|---|
searchString | String | searched string |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
searchString | String | searched string |
attrsNames | List<String> | list of attributes name |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
vo | VO | virtual organization |
searchString | String | searched string |
attrsName | List<String> | list of attributes name |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
searchString | String | String to search by |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
searchString | String | String to search by |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
titleBefore | String | Title before name |
firstName | String | First name |
middleName | String | Middle name |
lastName | String | Last name |
titleAfter | String | Title after |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
namespace | String | |
parameters | Map |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PasswordStrengthException | When password doesn't match expected strength by namespace configuration |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
namespace | String | |
name | String |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PasswordStrengthException | When password doesn't match expected strength by namespace configuration |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
includedSpecificUsers | boolean | if you want to or don't want to get specificUsers too |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
includedSpecificUsers | boolean | if you want to or don't want to get specificUsers too |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
user | int | User id |
facility | int | Facility id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | Allowed resources |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getAllowedResources
Example params
{ "user" : 4 , "facility" : 26 }
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 name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | Allowed resources |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getAllowedResources
Example params
{ "user" : 79 }
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 name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichResource> | Assigned rich resources |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getAssignedRichResources
Example params
{ "user" : 65 }
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 name | Data type | Description |
---|---|---|
facility | int | Facility id |
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichResource> | All resources with which user is associated |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getAssociatedResources
Example params
{ "facility" : 74 , "user" : 25 }
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 name | Data type | Description |
---|---|---|
query | BlockedLoginsPageQuery |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
page | of 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 name | Data type | Description |
---|---|---|
resource | Integer | ID of Resource |
user | Integer | ID of User |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
facility | Integer | ID of Facility |
user | Integer | ID of User |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Group> | Found Groups |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getGroupsWhereUserIsAdmin
Example params
{ "user" : 37 }
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 name | Data type | Description |
---|---|---|
user | int | User id |
vo | int | Vo id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Group> | Found Groups |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getGroupsWhereUserIsAdmin
Example params
{ "user" : 27 , "vo" : 68 }
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 name | Data type | Description |
---|---|---|
user | int | id of user to check |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<String> | user's email addresses pending validation |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getPendingPreferredEmailChanges
Example params
{ "user" : 38 }
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 name | Data type | Description |
---|---|---|
resource | Integer | ID of Resource |
user | Integer | ID of User |
attrNames | List<String> | Attribute names (list of their URNs) |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
facility | Integer | ID of Facility |
user | Integer | ID of User |
attrNames | List<String> | Attribute names (list of their URNs) |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
user | int | user id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
RichUser | found rich user |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getRichUser
Example params
{ "user" : 65 }
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 name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<UserExtSource> | list of user's external sources with attributes |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getRichUserExtSources
Example params
{ "user" : 11 }
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 name | Data type | Description |
---|---|---|
user | int | User id |
attrsNames | List<String> | Attribute names |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<UserExtSource> | list of user's external sources with specified attributes |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getRichUserExtSources
Example params
{ "user" : 78 , "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 name | Data type | Description |
---|---|---|
user | int | user id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
RichUser | found rich user with attributes |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getRichUserWithAttributes
Example params
{ "user" : 26 }
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 name | Data type | Description |
---|---|---|
ids | List<Integer> | list of users IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichUser> | rich users with specified IDs |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getRichUsersByIds
Example params
{ "ids" : [ 86 , 36 ] }
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 name | Data type | Description |
---|---|---|
attrsNames | List<String> | list of attributes name |
includedSpecificUsers | boolean | if you want to or don't want to get specificUsers too |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
includedSpecificUsers | boolean | if you want to or don't want to get specificUsers too |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
ids | List<Integer> | list of users IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichUser> | rich users with specified IDs |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getRichUsersWithAttributesByIds
Example params
{ "ids" : [ 80 , 10 ] }
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 exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
attrsNames | List<String> | list of attributes name |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<User> | Specific users for a user |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getSpecificUsersByUser
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" : "User" } , {...} , {...} ]
Gets users sponsoring a given user in a VO.
Parameter name | Data type | Description |
---|---|---|
member | int | member id |
attrNames | List<String> | names of attributes to return, empty to return all attributes |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Sponsor> | sponsors |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getSponsorsForMember
Example params
{ "member" : 79 , "attrNames" : [ "text" , "text" ] }
Example response
{ ... TODO ... }
Gets users sponsoring a given user in a VO.
Parameter name | Data type | Description |
---|---|---|
vo | int | VO ID |
extSourceName | String | external source name, usually SAML IdP entityID |
extLogin | String | external source login, usually eduPersonPrincipalName |
attrNames | List<String> | names of attributes to return, empty to return all attributes |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Sponsor> | sponsors |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getSponsorsForMember
Example params
{ "vo" : 63 , "extSourceName" : "text" , "extLogin" : "text" , "attrNames" : [ "text" , "text" ] }
Example response
{ ... TODO ... }
Returns user by his login in external source and external source.
Parameter name | Data type | Description |
---|---|---|
extSourceName | String | Ext source name |
extLogin | String | Ext source login |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
User | User 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 name | Data type | Description |
---|---|---|
id | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
User | User object |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUserById
Example params
{ "id" : 85 }
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 name | Data type | Description |
---|---|---|
member | int | Member id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
User | User object |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUserByMember
Example params
{ "member" : 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" : "User" }
Returns user based on one of the userExtSource.
Parameter name | Data type | Description |
---|---|---|
userExtSource | UserExtSource | JSON object UserExtSource |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
User | User 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 name | Data type | Description |
---|---|---|
extSource | ExtSource | JSON object |
extSourceLogin | String | Login |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
UserExtSource | UserExtSource 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 name | Data type | Description |
---|---|---|
extSourceName | String | Name of ext source (eg. entityID of IdP) |
extSourceLogin | String | Login |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
UserExtSource | UserExtSource 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 name | Data type | Description |
---|---|---|
userExtSource | int | UserExtSource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
UserExtSource | User external source for the id |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUserExtSourceById
Example params
{ "userExtSource" : 53 }
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
Parameter name | Data type | Description |
---|---|---|
attributeId | int | value used for founding attribute definition which has to exists, be unique and in userExtSource namespace |
attributeValue | String | value used for searching |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
UserExtSource | object found by attribute id and it's unique value |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUserExtSourceByUniqueAttributeValue
Example params
{ "attributeId" : 19 , "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
Parameter name | Data type | Description |
---|---|---|
attributeName | String | value used for founding attribute definition which has to exists, be unique and in userExtSource namespace |
attributeValue | String | value used for searching |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
UserExtSource | object 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 name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<UserExtSource> | list of user's external sources |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUserExtSources
Example params
{ "user" : 55 }
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 name | Data type | Description |
---|---|---|
ids | List<Integer> | list of user ext sources IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<UserExtSource> | user ext sources with specified IDs |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUserExtSourcesByIds
Example params
{ "ids" : [ 60 , 55 ] }
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 exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
attribute | Attribute | JSON object |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
attributeName | String | URN of attribute to search by |
attributeValue | Object | Value to search by (type of value must match attribute value type) |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
attributeName | String | URN of attribute to search by |
attributeValue | String | Value to search by |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
ids | List<Integer> | list of users IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<User> | users with specified IDs |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUsersByIds
Example params
{ "ids" : [ 84 , 86 ] }
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 name | Data type | Description |
---|---|---|
specificUser | int | Specific User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<User> | Users for a service user |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUsersBySpecificUser
Example params
{ "specificUser" : 43 }
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 exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
int | Users count |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUsersCount
Example response
58
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 name | Data type | Description |
---|---|---|
query | UsersPageQuery | Query with page information |
attrNames | List<String> | List of attribute names |
Thrown exception | Description |
---|---|
FacilityNotExistsException | When the Facility specified by id in query does not exist. |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
ResourceNotExistsException | When the Resource specified by id in query does not exist. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
ServiceNotExistsException | When the Service specified by id in query does not exist. |
VoNotExistsException | When the Vo specified by id in query does not exist. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
vo | int | VO id |
searchString | String | String to search by |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<User> | Found users |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getUsersWithoutSpecificVo
Example params
{ "vo" : 23 , "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 exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Vo> | Found VOs |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getVosWhereUserIsAdmin
Example params
{ "user" : 34 }
Example response
[ { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" } , {...} , {...} ]
Returns list of VOs, where the user is a Member.
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Vo> | Found VOs |
Example URL
https://[hostname]/krb/rpc/json/usersManager/getVosWhereUserIsMember
Example params
{ "user" : 46 }
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 name | Data type | Description |
---|---|---|
loginNamespace | String | Namespace |
login | String | Login |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
InvalidLoginException | When login to check has invalid syntax or is not allowed |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
int | 1: 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 name | Data type | Description |
---|---|---|
sourceUser | int | User id |
targetUser | int | User id |
userExtSource | int | UserExtSource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/moveUserExtSource
Example params
{ "sourceUser" : 92 , "targetUser" : 99 , "userExtSource" : 7 }
Example response
null
Remove specific user owner (the user).
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
specificUser | int | Specific user id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/removeSpecificUserOwner
Example params
{ "user" : 56 , "specificUser" : 73 }
Example response
null
Remove user's external source. Persistent UserExtSources are not removed unless force
param is present and set to true
.
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
userExtSource | int | UserExtSource id |
force | boolean | If true, use force deletion. |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/removeUserExtSource
Example params
{ "user" : 28 , "userExtSource" : 95 , "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 name | Data type | Description |
---|---|---|
user | int | User id |
userExtSources | List<Integer> | UserExtSource id |
force | boolean | If true, use force deletion. |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/removeUserExtSources
Example params
{ "user" : 84 , "userExtSources" : [ 39 , 83 ] , "force" : true }
Example response
null
Reserves password for a user in specified login-namespace.
Parameter name | Data type | Description |
---|---|---|
login | String | Login |
namespace | String | Namespace |
password | String | password |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
InvalidLoginException | When login has invalid syntax (is not allowed) |
PasswordStrengthException | When password doesn't match expected strength by namespace configuration |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
specificUser | int | User id |
specificUserType | String | specific user type |
owner | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
User | user with specific type set |
Example URL
https://[hostname]/krb/rpc/json/usersManager/setSpecificUser
Example params
{ "specificUser" : 87 , "specificUserType" : "text" , "owner" : 8 }
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 name | Data type | Description |
---|---|---|
logins | List<String> | list of logins |
namespace | String | Namespace |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
LoginIsNotBlockedException | When some login is not blocked |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
logins | List<String> | list of logins |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
LoginIsNotBlockedException | When some login is not blocked |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/unblockLogins
Example params
{ "logins" : [ "text" , "text" ] }
Example response
null
Unblock logins by id
Parameter name | Data type | Description |
---|---|---|
logins | List<Integer> | logins id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
LoginIsNotBlockedException | When some login is not blocked |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/unblockLoginsById
Example params
{ "logins" : [ 41 , 27 ] }
Example response
null
Remove all ownerships of this specific user and unset this specific user type from this specific user.
Parameter name | Data type | Description |
---|---|---|
specificUser | int | User id |
specificUserType | String | specific user type |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
User | user without specific user type set |
Example URL
https://[hostname]/krb/rpc/json/usersManager/unsetSpecificUser
Example params
{ "specificUser" : 6 , "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 name | Data type | Description |
---|---|---|
user | User | JSON object with titles to set |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
User | Updated 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 name | Data type | Description |
---|---|---|
user | User | JSON object |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
User | Updated 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 name | Data type | Description |
---|---|---|
userExtSource | UserExtSource | JSON object |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
UserExtSource | Updated 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 name | Data type | Description |
---|---|---|
userExtSource | int | UserExtSource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
login | String | Login |
namespace | String | Namespace |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
InvalidLoginException | When login of user has invalid syntax (is not allowed) |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
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 name | Data type | Description |
---|---|---|
token | UUID | token for the email change request to validate |
u | int | id of user you want to validate preferred email request |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
String | new validated email address |
Example URL
https://[hostname]/krb/rpc/json/usersManager/validatePreferredEmailChange
Example params
{ "token" : {...} , "u" : 20 }
Example response
"text"
Validate ssh public key, throws exception if validation fails
Parameter name | Data type | Description |
---|---|---|
sshKey | String | public ssh key to validate |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
SSHKeyNotValidException | when validation fails |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/usersManager/validateSSHKey
Example params
{ "sshKey" : "text" }
Example response
null