Get Report Templates
Gets the list of report templates.
HTTP Request
GET /api/sonar/report-templates
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/report-templates
Request Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| offset | O | 32-bit Integer | Number of records to skip | Default: 0 |
| limit | O | 32-bit Integer | Maximum number of records | Default: 20 |
| keywords | X | String | Search keywords | Search string for name, description |
| group_guid | X | String | Report group GUID | GUID format, 36 characters |
Success Response
{
"total_count": 2,
"templates": [
{
"guid": "e2fad16d-8076-4c91-9d69-9419c5e6d300",
"name": "Report Template",
"description": null,
"group_guid": "eaf5e265-a186-4029-9264-dade868559ba",
"group_name": "Report Group",
"owner_guid": "ce23adf2-13e4-40f9-ad0c-74d090b1f10c",
"owner_name": "DEMO",
"created": "2024-08-08 10:27:42+0900",
"updated": "2024-08-13 09:53:39+0900"
}
]
}
- total_count (32-bit integer): Total number of records matching the search keyword
- templates (object array): Paged list of report templates that match the search keyword
- guid (string): Report template GUID
- name (string): Report template name
- description (string): Report template description
- group_guid (string): Report group GUID
- group_name (string): Report group name
- owner_guid (string): Owner GUID
- owner_name (string): Owner name
- created (string): Creation date and time (
yyyy-MM-dd HH:mm:ssZformat) - updated (string): Last modification date and time (
yyyy-MM-dd HH:mm:ssZformat)
Error Responses
Missing Required Parameters
HTTP status code 400
{
"error_code": "null-argument",
"error_msg": "offset should be not null"
}
offset, limit value is not an integer
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'offset' parameter should be int type"
}
offset, limit value is negative
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'offset' must be greater than or equal to 0."
}
group_guid is not in GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "group_guid should be guid type."
}
No permission to retrieve report template list
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}