RPC API documentation v17.2.0

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

NotificationManager

Saves PerunNotifReceiver to db and creates id. PerunNotifReceiver must contain: templateId. Parameters target, locale, type are optional.

Parameter nameData typeDescription
receiverPerunNotifReceiverPerunNotifReceiver object without 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
PerunNotifReceiverPerunNotifReceiver with new id set

Example URL

https://[hostname]/krb/rpc/json/notificationManager/createPerunNotifReceiver

Example params

{ "receiver" : { "templateId" : 7 } }

Example response

{ ... TODO ... }

Saves PerunNotifReceiver to db and creates id.

Parameter nameData typeDescription
targetStringDefines target of receiver, usually contains function to get email
localeStringLocale of receiver - determines a language, which is used for sending messages
templateIdintTemplate Id to which receiver is connected
typeStringType of the receiver - 'EMAIL_USER' or 'EMAIL_GROUP'
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
PerunNotifReceiverPerunNotifReceiver with new id set

Example URL

https://[hostname]/krb/rpc/json/notificationManager/createPerunNotifReceiver

Example params

{ "target" : "text" , "locale" : "text" , "templateId" : 35 , "type" : "text" }

Example response

{ ... TODO ... }

Saves perunNotifRegex to db and creates id, also saves relation between regex and object.

Parameter nameData typeDescription
regexPerunNotifRegexPerunNotifRegex object without 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
PerunNotifRegexPerunNotifRegex with new id set

Example URL

https://[hostname]/krb/rpc/json/notificationManager/createPerunNotifRegex

Example params

{ "regex" : {...} }

Example response

{ ... TODO ... }

Saves PerunNotifTemplate to db and saves all relations to db.

Parameter nameData typeDescription
templatePerunNotifTemplatePerunNotifTemplate object without 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
PerunNotifTemplatePerunNotifTemplate with new id set

Example URL

https://[hostname]/krb/rpc/json/notificationManager/createPerunNotifTemplate

Example params

{ "template" : {...} }

Example response

{ ... TODO ... }

Saves perunNotifTemplateMessage to db and creates id.

Parameter nameData typeDescription
messagePerunNotifTemplateMessagePerunNotifTemplateMessage object without 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
PerunNotifTemplateMessagePerunNotifTemplateMessage with new id set

Example URL

https://[hostname]/krb/rpc/json/notificationManager/createPerunNotifTemplateMessage

Example params

{ "message" : {...} }

Example response

{ ... TODO ... }

Returns all PerunNotifReceivers from db.

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<PerunNotifReceiver>List of all PerunNotifReceivers

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getAllPerunNotifReceivers

Example response

{ ... TODO ... }

Returns all PerunNotifRegexes.

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<PerunNotifRegex>List of all PerunNotifRegexes

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getAllPerunNotifRegexes

Example response

{ ... TODO ... }

Returns all PerunNotifTemplateMessages.

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<PerunNotifTemplateMessage>List of all PerunNotifTemplateMessages

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getAllPerunNotifTemplateMessages

Example response

{ ... TODO ... }

Returns all PerunNotifTemplates.

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<PerunNotifTemplate>List of all PerunNotifTemplates

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getAllPerunNotifTemplates

Example response

{ ... TODO ... }

Return PerunNotifReceiver with given id from db. Object for PerunNotifReceiver.

Parameter nameData typeDescription
idintReceiver 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
PerunNotifReceiverPerunNotifReceiver

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getPerunNotifReceiverById

Example params

{ "id" : 44 }

Example response

{ ... TODO ... }

Returns PerunNotifRegex by id, returns also object related to regex. Methods for PerunNotifRegexp.

Parameter nameData typeDescription
idintPerunNotifRegex 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
PerunNotifRegexPerunNotifRegex

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getPerunNotifRegexById

Example params

{ "id" : 85 }

Example response

{ ... TODO ... }

Return perunNotifTemplate from db, return also all filled collections. Methods for perunNotifTemplate.

Parameter nameData typeDescription
idintperunNotifTemplate 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
PerunNotifTemplatePerunNotifTemplate

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getPerunNotifTemplateById

Example params

{ "id" : 49 }

Example response

{ ... TODO ... }

Gets PerunNotifTemplateMessage from db. Methods for perunNotifTemplateMessage.

Parameter nameData typeDescription
idintPerunNotifTemplateMessage 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
PerunNotifTemplateMessagePerunNotifTemplateMessage

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getPerunNotifTemplateMessageById

Example params

{ "id" : 71 }

Example response

{ ... TODO ... }

Returns all regexes related to given template.

Parameter nameData typeDescription
templateIdintTemplate 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<PerunNotifRegex>List of regexes

Example URL

https://[hostname]/krb/rpc/json/notificationManager/getRelatedRegexesForTemplate

Example params

{ "templateId" : 75 }

Example response

{ ... TODO ... }

Method checks if the notifications module is running at the time.

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
trueif running

Example URL

https://[hostname]/krb/rpc/json/notificationManager/isNotificationsRunning

Example response

{ ... TODO ... }

Removes PerunNotifReceiver from db.

Parameter nameData typeDescription
idintPerunNotifReceiver 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/notificationManager/removePerunNotifReceiverById

Example params

{ "id" : 11 }

Example response

null

Removes PerunNotifRegex from db, if regex is referenced from template exception is thrown. Also removes relation between regex and objects.

Parameter nameData typeDescription
idintPerunNotifRegex 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/notificationManager/removePerunNotifRegexById

Example params

{ "id" : 1 }

Example response

null

Removes perunNotifTemplate from db.

Parameter nameData typeDescription
idintPerunNotifTemplate 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/notificationManager/removePerunNotifTemplateById

Example params

{ "id" : 39 }

Example response

null

Removes PerunNotifTemplateMessage from db.

Parameter nameData typeDescription
idintPerunNotifTemplateMessage 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/notificationManager/removePerunNotifTemplateMessage

Example params

{ "id" : 82 }

Example response

null

Removes relation between PerunNotifRegex and PerunNotifTemplate.

Parameter nameData typeDescription
templateIdintTemplate id
regexIdintRegex 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/notificationManager/removePerunNotifTemplateRegexRelation

Example params

{ "templateId" : 75 , "regexId" : 89 }

Example response

null

Save relation between template and regex if not exists yet.

Parameter nameData typeDescription
templateIdintTemplate id
regexIdintRegex 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/notificationManager/saveTemplateRegexRelation

Example params

{ "templateId" : 51 , "regexId" : 63 }

Example response

null

Start notifications processing.

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/notificationManager/startNotifications

Example response

null

Stop notifications processing.

Parameter nameData typeDescription
idintPerunNotifTemplate 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/notificationManager/stopNotifications

Example params

{ "id" : 82 }

Example response

null

Updates receiver in db.

Parameter nameData typeDescription
receiverPerunNotifReceiverPerunNotifReceiver to be updated with new properties
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
PerunNotifReceiverUpdated perunNotifReceiver

Example URL

https://[hostname]/krb/rpc/json/notificationManager/updatePerunNotifReceiver

Example params

{ "receiver" : {...} }

Example response

{ ... TODO ... }

Updates PerunNotifRegex in db, also updates relation between regex and objects.

Parameter nameData typeDescription
regexPerunNotifRegexPerunNotifRegex to be updated with new properties
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
PerunNotifRegexUpdated PerunNotifRegex

Example URL

https://[hostname]/krb/rpc/json/notificationManager/updatePerunNotifRegex

Example params

{ "regex" : {...} }

Example response

{ ... TODO ... }

Method will update perunNotifTemplate, also update relations, but not deletes them

Parameter nameData typeDescription
templatePerunNotifTemplatePerunNotifTemplate object to be updated with new properties
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
PerunNotifTemplateUpdated perunNotifTemplate

Example URL

https://[hostname]/krb/rpc/json/notificationManager/updatePerunNotifTemplate

Example params

{ "template" : {...} }

Example response

{ ... TODO ... }

Update perunNotifTemplateMessage in db.

Parameter nameData typeDescription
messagePerunNotifTemplateMessagePerunNotifTemplateMessage to be updated with new properties
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
PerunNotifTemplateMessageUpdated PerunNotifTemplateMessage

Example URL

https://[hostname]/krb/rpc/json/notificationManager/updatePerunNotifTemplateMessage

Example params

{ "message" : {...} }

Example response

{ ... TODO ... }