Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layout Macro

UI Text Box
sizemedium
typeinfo

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

UI Text Box
typenote
Available

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

List all available log files:

Code Block
<base>/rest/lastlog/1.0/log

View a specific log

file {filename}

file

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

Parameters

Parameter
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)
UI Text Box
typetip

An example link can be found after executing a custom search.

Image Removed

Use this example to configure your API call.

Code Block
titleExample
<base>/rest/lastlog/1.0/log/atlassian-confluence.log?query=
INFO
&maxEntries=500&exclude=&reverse=
true
false&regex=
true
false&casesensitive=
true
Show thread dump
false
UI Expand
titleShow 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.

UI Text Box
typenote
Only

This feature is only available for

Confluence system

Confluence system administrators!

Code Block
<base>/rest/lastlog/1.0/threads
UI Expand
titleKill 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.

UI Text Box
type
warning
note

This feature is only

Only

available for Confluence

system administrators.

administrators!

UI Text Box
typewarning

Be careful when killing threads. Killing

.

the wrong thread can seriously harm your Confluence instance!

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

Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue