Creates new auditer consumer with last processed id which equals current auditer log max id.
Parameter name | Data type | Description |
---|---|---|
consumerName | String | New name for consumer |
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/auditMessagesManager/createAuditerConsumer
Example params
{ "consumerName" : "NewConsumer" }
Example response
null
Return list of names of all possible events
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 | of 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 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 |
---|---|
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 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 |
---|---|
Integer | Count 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 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 |
---|---|
Integer | ID 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 name | Data type | Description |
---|---|---|
count | int | Messages limit |
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<AuditMessage> | Audit messages |
Example URL
https://[hostname]/krb/rpc/json/auditMessagesManager/getMessages
Example params
{ "count" : 41 }
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 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<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 name | Data type | Description |
---|---|---|
count | int | Number of IDs to subtract from max_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<AuditMessage> | List of audit messages |
Example URL
https://[hostname]/krb/rpc/json/auditMessagesManager/getMessagesByCount
Example params
{ "count" : 75 }
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 name | Data type | Description |
---|---|---|
perunSession | perun | session |
id | starting | id from which the messages will be taken |
count | Number | of messages that will be returned |
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 | of 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 name | Data type | Description |
---|---|---|
query | MessagesPageQuery | Query with page information |
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 |
---|---|
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 name | Data type | Description |
---|---|---|
msg | String | Message to be logged |
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/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 name | Data type | Description |
---|---|---|
consumerName | String | Consumer to get messages for |
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<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 name | Data type | Description |
---|---|---|
consumerName | String | name of consumer |
lastProcessedId | int | id of message to what consumer will be 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. |
s | InternalErrorException |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/auditMessagesManager/setLastProcessedId
Example params
{ "consumerName" : "text" , "lastProcessedId" : 22 }
Example response
null