Skip to main content
Skip table of contents

Template Audit Logs API

Get Template Audit Logs

Retrieve audit logs for template-related activities including creation, updates, deletions, and applications.

Endpoint

GET /rest/smartissuetemplates/1.0/template/audit

Parameters

Parameter

Type

Required

Default

Description

templateId

int

No

-

Filter by specific template ID

userKey

string

No

-

Filter by user who performed action

actionType

string

No

-

Filter by action type (CREATED, UPDATED, DELETED, APPLIED)

fromDate

string

No

-

Start date (ISO 8601 format)

toDate

string

No

-

End date (ISO 8601 format)

limit

int

No

50

Maximum number of records to return

offset

int

No

0

Starting position for pagination

Request Example

CODE
curl -X GET \
  "https://your-jira-instance.com/rest/smartissuetemplates/1.0/template/audit?templateId=123&actionType=APPLIED&limit=20" \
  -H "Authorization: Basic <base64-credentials>" \
  -H "Accept: application/json"

Response

CODE
{
  "auditLogs": [
    {
      "id": 10001,
      "timestamp": "2024-01-20T14:30:00.000Z",
      "actionType": "TEMPLATE_APPLIED",
      "templateId": 123,
      "templateName": "Bug Report Template",
      "user": {
        "userKey": "john.doe",
        "displayName": "John Doe",
        "emailAddress": "john.doe@company.com"
      },
      "details": {
        "targetProject": {
          "projectId": 10001,
          "projectKey": "DEV",
          "projectName": "Development Project"
        },
        "createdIssue": {
          "issueKey": "DEV-1234",
          "issueId": 10001,
          "summary": "Login page validation error"
        }
      },
      "ipAddress": "192.168.1.100"
    }
  ],
  "totalCount": 156,
  "startAt": 0,
  "maxResults": 20
}

Action Types

  • TEMPLATE_CREATED - Template creation

  • TEMPLATE_UPDATED - Template modification

  • TEMPLATE_DELETED - Template deletion

  • TEMPLATE_APPLIED - Template applied to create issue

  • TEMPLATE_DUPLICATED - Template duplicated

  • TEMPLATE_SCOPE_CHANGED - Template scope assignment changed

Usage Examples

Get all audit logs for a specific template:

CODE
GET /rest/smartissuetemplates/1.0/template/audit?templateId=123

Get template applications in the last 30 days:

CODE
GET /rest/smartissuetemplates/1.0/template/audit?actionType=TEMPLATE_APPLIED&fromDate=2024-01-01T00:00:00.000Z

Get audit logs for a specific user:

CODE
GET /rest/smartissuetemplates/1.0/template/audit?userKey=john.doe&limit=100
JavaScript errors detected

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

If this problem persists, please contact our support.