Get Report Templates

Gets the list of report templates.

Required Permissions

Requires the MEMBER role or higher.

HTTP Request

GET /api/sonar/report-templates
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     https://HOSTNAME/api/sonar/report-templates
Request Parameters
KeyRequiredTypeDescriptionNote
offsetYes32-bit IntegerNumber of records to skipDefault: 0
limitYes32-bit IntegerMaximum number of recordsDefault: 20
keywordsNoStringSearch keywordsSearch string for name, description
group_guidNoStringReport group GUIDGUID 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:ssZ format)
    • updated (string): Last modification date and time (yyyy-MM-dd HH:mm:ssZ format)

Error Responses

offset, limit value is not an integer

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'offset' parameter should be int type"
}
Permission denied

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}