RPC API documentation v17.2.0

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

SecurityTeamsManager

Add User as a manager to SecurityTeam

Parameter nameData typeDescription
securityTeamintid of SecurityTeam to add manager (member) to
userintid of User to be added as a manager (member) of SecurityTeam
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/addAdmin

Example params

{ "securityTeam" : 94 , "user" : 28 }

Example response

null

Add group as a manager to SecurityTeam

Parameter nameData typeDescription
securityTeamintid of SecurityTeam to add manager (member) to
groupintid of Group to be added as a manager (member) of SecurityTeam
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/addAdmin

Example params

{ "securityTeam" : 50 , "group" : 15 }

Example response

null

Add user to blacklist of given SecurityTeam

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/addUserToBlacklist

Example params

{ "securityTeam" : 46 , "user" : 81 }

Example response

null

Create SecurityTeam. SecurityTeam object must contain name which must match [-_a-zA-z0-9.]+ and not be longer than 128 characters. Parameter description is optional. Other parameters are ignored.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/createSecurityTeam

Example params

{ "securityTeam" : { "name" : "My_new_security-team2" } }

Example response

{ "id" : 924 , "name" : "CSIRT" , "description" : "My CSIRT" }

Create SecurityTeam.

Parameter nameData typeDescription
nameStringname which must match [-_a-zA-z0-9.]+ and not be longer than 128 characters.
descriptionStringdescription
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
SecurityTeamExistsExceptionWhen name of SecurityTeam is not unique.
Return typeDescription
SecurityTeamNewly create SecurityTeam with id set.

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/createSecurityTeam

Example params

{ "name" : "My_new_security-team2" , "description" : "text" }

Example response

{ "id" : 924 , "name" : "CSIRT" , "description" : "My CSIRT" }

Delete SecurityTeam by its id. If force is true team is deleted even if it has some users on blacklist or is assigned to some facility.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/deleteSecurityTeam

Example params

{ "securityTeam" : 22 , "force" : true }

Example response

null

Delete SecurityTeam by its id. If team has any users on blacklist or is assigned some facility, it is not deleted.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/deleteSecurityTeam

Example params

{ "securityTeam" : 54 }

Example response

null

Get all SecurityTeam groups of admins.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getAdminGroups

Example params

{ "securityTeam" : 66 }

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 all managers (members) of SecurityTeam by its id.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getAdmins

Example params

{ "securityTeam" : 5 }

Example response

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

Get managers of SecurityTeam by its id.

Parameter nameData typeDescription
securityTeamintSecurity team id
onlyDirectAdminsbooleanif true, get only direct SecurityTeam administrators (if false, get both direct and indirect)
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>List of Users who are managers (members) of specified SecurityTeam.

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getAdmins

Example params

{ "securityTeam" : 21 , "onlyDirectAdmins" : 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" : "User" } , {...} , {...} ]

List all SecurityTeams in Perun.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getAllSecurityTeams

Example response

[ { "id" : 924 , "name" : "CSIRT" , "description" : "My CSIRT" } , {...} , {...} ]

Get blacklisted users on selected Facility. List is a union of all blacklists of SecurityTeams assigned to selected Facility.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getBlacklist

Example params

{ "facility" : 70 }

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" } , {...} , {...} ]

Get users blacklisted by selected SecurityTeam.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getBlacklist

Example params

{ "securityTeam" : 61 }

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" } , {...} , {...} ]

Get blacklisted users on selected Facility. List consists of Pairs. Left is a item from union of all blacklists of SecurityTeams assigned to selected Facility and right item is a description why the user is on the blacklist.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getBlacklistWithDescription

Example params

{ "facility" : 97 }

Example response

[ { "left" : { "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" } , "right" : "Some reason" } , {...} , {...} ]

Get users blacklisted by selected SecurityTeam with a description why the users are on the blacklist.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getBlacklistWithDescription

Example params

{ "securityTeam" : 76 }

Example response

[ { "left" : { "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" } , "right" : "Some reason" } , {...} , {...} ]

Get existing SecurityTeam by id.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getSecurityTeamById

Example params

{ "id" : 92 }

Example response

{ "id" : 924 , "name" : "CSIRT" , "description" : "My CSIRT" }

List SecurityTeams your are member of or all for PerunAdmin.

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/getSecurityTeams

Example response

[ { "id" : 924 , "name" : "CSIRT" , "description" : "My CSIRT" } , {...} , {...} ]

Remove User as a manager from SecurityTeam.

Parameter nameData typeDescription
securityTeamintid of SecurityTeam to remove manager (member) from
userintid of User to be removed as a manager (member) of SecurityTeam
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/removeAdmin

Example params

{ "securityTeam" : 0 , "user" : 20 }

Example response

null

Remove group as a manager from SecurityTeam.

Parameter nameData typeDescription
securityTeamintid of SecurityTeam to remove manager (member) from
groupintid of Group to be removed as a manager (member) of SecurityTeam
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/removeAdmin

Example params

{ "securityTeam" : 84 , "group" : 78 }

Example response

null

Remove user from blacklist of given SecurityTeam

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

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/removeUserFromBlacklist

Example params

{ "securityTeam" : 21 , "user" : 77 }

Example response

null

Update existing SecurityTeam name and description by teams id. Name must be <= 128 and must be unique.

Parameter nameData typeDescription
securityTeamSecurityTeamSecurity team id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
SecurityTeamExistsExceptionWhen new name of security team is not unique.
SecurityTeamNotExistsExceptionWhen id of a team doesn't exists in Perun.
Return typeDescription
SecurityTeamTeam with updated values

Example URL

https://[hostname]/krb/rpc/json/securityTeamsManager/updateSecurityTeam

Example params

{ "securityTeam" : { "id" : 924 , "name" : "CSIRT" , "description" : "My CSIRT" } }

Example response

{ "id" : 924 , "name" : "CSIRT" , "description" : "My CSIRT" }