Last Log for Confluence comes with a dedicated REST API.

A REST API is an API (Application Programming Interface) that conforms to the Representational State Transfer architecture. With a REST API programmers can easily and quickly use the functionality of the app through external scripts or programs. The API serves as an intermediate connector, allowing external programs to interface with the app and to pull data from it.

There are no limits to your creativity as a programmer! Write whichever scripts you need and let them interact directly with Last Log for Confluence to streamline your operations as a Confluence administrator.

The following features can be used through the API:

  • View all log files: Find the log files you want to view faster than in the graphical interface - specify various parameters and get exactly the output you need.
  • View thread dump: If you are a Confluence system administrator, you can quickly access the current thread dump by invoking the API.
  • Kill a thread: With great power comes great responsibility - Confluence system administrators can even kill a thread through the API.
View log files

The REST API enables you to quickly view specific log files by inserting parameters in the URL. The output is similar to executing an advanced search in the graphical interface.

For example, you can include or exclude a certain search query string, search for regex expressions, reverse the output, limit the output to a certain amount of maximum entries or make your query case insensitive.

This feature is only available for Confluence administrators and system administrators!

List all available log files:

<base>/rest/lastlog/1.0/log

View a specific log file

<base>/rest/lastlog/1.0/log/{filename}

Parameters

Parameter  nameInput
maxEntriesNumber of lines (integer)
reverseInvert order of output (boolean)
querySearch string (string)
regexSearch by regex (boolean)
excludeExclude search string (string)
casesensitiveSearch case sensitive (boolean)

Use this example to configure your API call.

Example
<base>/rest/lastlog/1.0/log/atlassian-confluence.log?query=&maxEntries=500&exclude=&reverse=false&regex=false&casesensitive=false
Show thread dump

With the REST API you can easily view the current thread dump without having to use the graphical interface of your Confluence instance.

This feature is only available for Confluence system administrators!

<base>/rest/lastlog/1.0/threads
Kill a thread

By using the REST API, you can directly kill a specific thread that is currently running in your Confluence instance.

This feature can be useful if you're seeking to finish a process which is taking up too many resources in order to improve performance. Sometimes it is also necessary to kill a thread that is stuck or causes problems in your instance.

This feature is only available for Confluence administrators!

Be careful when killing threads. Killing the wrong thread can seriously harm your Confluence instance!

<base>/rest/lastlog/1.0/threads/kill/{id}

If you still have questions, feel free to refer to our support team.