RPC API documentation v44.0.0

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

AuditMessagesManager

Creates new auditer consumer with last processed id which equals current auditer log max id.

Parameter nameData typeDescription
consumerNameStringNew name for consumer
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/auditMessagesManager/createAuditerConsumer

Example params

{ "consumerName" : "NewConsumer" }

Example response

null

Return list of names of all possible events

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
listof all possible events

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/findAllPossibleEvents

Example response

{ ... TODO ... }

Get all auditer consumers as a map with key=value pairs like String(name)=Integer(lastProcessedId).

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
Map<String,Integer> Mapping of all auditer consumers to their last processed message ID.

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/getAllAuditerConsumers

Example response

{ ... TODO ... }

Get count of all messages stored in auditer logs.

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
IntegerCount of all messages.

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/getAuditerMessagesCount

Example response

{ ... TODO ... }

Get ID of last (newest) message in auditer logs.

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
IntegerID of last (newest) message.

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/getLastMessageId

Example response

{ ... TODO ... }

Returns exact number of newest audit messages defined by 'count' param (disregarding message IDs). If there is less messages present, then all of them are returned.

Parameter nameData typeDescription
countintMessages limit
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<AuditMessage>Audit messages

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/getMessages

Example params

{ "count" : 32 }

Example response

[ { "id" : 249053 , "msg" : "Something happened." , "actor" : "actor@hostname.cz" , "createdAt" : "2015-03-16 16:00:40.449221" , "createdByUid" : "34" , "fullMessage" : "249053 \"2015-03-16 16:00:40.449221\" \"actor@hostname.cz\" Something happened." } , {...} , {...} ]

Returns 100 newest audit messages from auditLOG. If there is a less messages than 100, then all of them are returned.

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<AuditMessage>Audit messages

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/getMessages

Example response

[ { "id" : 249053 , "msg" : "Something happened." , "actor" : "actor@hostname.cz" , "createdAt" : "2015-03-16 16:00:40.449221" , "createdByUid" : "34" , "fullMessage" : "249053 \"2015-03-16 16:00:40.449221\" \"actor@hostname.cz\" Something happened." } , {...} , {...} ]

Returns all messages with IDs within the range from max(ID) to (max(ID)-count), where number of returned messages is equal or less than 'count' param, because some IDs could be skipped in the sequence.

Parameter nameData typeDescription
countintNumber of IDs to subtract from max_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<AuditMessage>List of audit messages

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/getMessagesByCount

Example params

{ "count" : 82 }

Example response

[ { "id" : 249053 , "msg" : "Something happened." , "actor" : "actor@hostname.cz" , "createdAt" : "2015-03-16 16:00:40.449221" , "createdByUid" : "34" , "fullMessage" : "249053 \"2015-03-16 16:00:40.449221\" \"actor@hostname.cz\" Something happened." } , {...} , {...} ]

Returns "count" number of messages that are more or equal than the given ID (ascending order), i.e. the method returns newer messages by provided ID.

Parameter nameData typeDescription
perunSessionperunsession
idstartingid from which the messages will be taken
countNumberof messages that will be returned
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
Listof audit messages

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/getMessagesByIdAndCount

Example params

{ "perunSession" : {...} , "id" : {...} , "count" : {...} }

Example response

{ ... TODO ... }

Get page of audit messages. Query parameter specifies offset, page size and allows filtering by name of event. Total count is only estimated.

Parameter nameData typeDescription
queryMessagesPageQueryQuery with page information
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
Paginated<AuditMessage>page of requested audit messages

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/getMessagesPage

Example params

{ "query" : { "pageSize" : 3 , "offset" : 0 , "order" : "ASCENDING" } }

Example response

{ "offset" : 0 , "pageSize" : 3 , "totalCount" : 1 , "data" : [ { "id" : 249053 , "msg" : "Something happened." , "actor" : "actor@hostname.cz" , "createdAt" : "2015-03-16 16:00:40.449221" , "createdByUid" : "34" , "fullMessage" : "249053 \"2015-03-16 16:00:40.449221\" \"actor@hostname.cz\" Something happened." } , {...} , {...} ]  }

Log arbitrary auditer message/event to the auditLOG.

Parameter nameData typeDescription
msgStringMessage to be logged
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/auditMessagesManager/log

Example params

{ "msg" : "text" }

Example response

null

Returns list of AuditMessages from audit log with IDs > lastProcessedId for registered auditer consumer specified by consumerName param. Number of returned messages for one call is limited (by default 10 000). You might need to fetch additional messages by repeating this call.

Parameter nameData typeDescription
consumerNameStringConsumer to get messages 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<AuditMessage>List of Audit Messages

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/pollConsumerMessages

Example params

{ "consumerName" : "text" }

Example response

[ { "id" : 249053 , "msg" : "Something happened." , "actor" : "actor@hostname.cz" , "createdAt" : "2015-03-16 16:00:40.449221" , "createdByUid" : "34" , "fullMessage" : "249053 \"2015-03-16 16:00:40.449221\" \"actor@hostname.cz\" Something happened." } , {...} , {...} ]

Set ID of last processed message for specified consumer.

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

Example URL

https://[hostname]/krb/rpc/json/auditMessagesManager/setLastProcessedId

Example params

{ "consumerName" : "text" , "lastProcessedId" : 77 }

Example response

null