Templates Usage Statistics API
Get Templates by Usage
Retrieve templates sorted by usage count in descending order, filtered to show only templates that have been used at least once.
Endpoint
GET
/rest/smartissuetemplates/1.0/template/by-usage
Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
| int | No | 50 | Maximum number of templates to return |
| int | No | 0 | Starting position for pagination |
Request Example
curl -X GET \
"https://your-jira-instance.com/rest/smartissuetemplates/1.0/template/by-usage?limit=20&offset=0" \
-H "Authorization: Basic <base64-credentials>" \
-H "Accept: application/json"
Response
Returns an array of templates sorted by usage count (highest first), containing only templates with usage count > 0.
[
{
"id": 123,
"name": "Bug Report Template",
"description": "Standard template for bug reports",
"usages": 156,
"owner": {
"userKey": "admin",
"displayName": "Administrator"
},
"projectId": 10001,
"issueTypeId": "1",
"createdDate": "2024-01-15T10:30:00.000Z",
"updatedDate": "2024-01-16T14:20:00.000Z"
},
{
"id": 124,
"name": "Feature Request Template",
"description": "Template for new feature requests",
"usages": 89,
"owner": {
"userKey": "product.manager",
"displayName": "Product Manager"
},
"projectId": 10001,
"issueTypeId": "2",
"createdDate": "2024-01-10T09:15:00.000Z",
"updatedDate": "2024-01-10T09:15:00.000Z"
}
]
Response Codes
Code | Description |
---|---|
200 | Success - returns array of templates |
401 | Unauthorized - authentication required |
403 | Forbidden - insufficient permissions |
500 | Internal Server Error |
Notes
Only returns templates with
usages > 0
(filters out unused templates)Results are automatically sorted by usage count in descending order
Uses current user context for permission filtering
Supports pagination for large result sets
Usage Examples
Get top 10 most used templates:
GET /rest/smartissuetemplates/1.0/template/by-usage?limit=
Get next page of results:
GET /rest/smartissuetemplates/1.0/template/by-usage?limit=20&offset=20
Get all used templates (large limit):
GET /rest/smartissuetemplates/1.0/template/by-usage?limit=1000