Skip to main content
Skip table of contents

REST API

Last Log for Jira 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 Jira to streamline your operations as a Jira administrator.

The following features can be used through the API:

  • View 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 Jira system administrator, you can quickly access the current thread dump by invoking the API.

  • Kill a thread: With great power comes great responsibility - Jira 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 Jira administrators and system administrators!

List all available log files:

CODE
<base>/rest/lastlog/1.0/log

View a specific log file

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

Parameters

Parameter  name

Input

maxEntries

Number of lines (integer)

reverse

Invert order of output (boolean)

query

Search string (string)

regex

Search by regex (boolean)

exclude

Exclude search string (string)

casesensitive

Search case sensitive (boolean)

Use this example to configure your API call.

Example
CODE
<base>/rest/lastlog/1.0/log/atlassian-jira.log?query=&maxEntries=500&exclude=&reverse=false&regex=false&casesensitive=false

View thread dump

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

This feature is only available for Jira system administrators!

CODE
<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 Jira 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 Jira system administrators!

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

CODE
<base>/rest/lastlog/1.0/threads/kill/{id}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.