List report templates
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.wpengineapi.com/v1/site_reports/templates?account_id=example"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <credentials>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.wpengineapi.com/v1/site_reports/templates?account_id=example';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.wpengineapi.com/v1/site_reports/templates?account_id=example' \ --header 'Authorization: Basic <credentials>'Description
Returns a list of report templates available for Site Reports.
Templates define the structure, branding, and sections included in generated reports.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Account ID to filter templates. This parameter is required.
Responses
Section titled “ Responses ”List of report templates
object
Report template defining structure and branding for generated reports
object
Unique identifier for the template
Display name of the template
Company name displayed on the report
Hex value of the color used on the report coversheet
URL to the company logo
URL to template preview image
List of sections included in this template
object
Example
{ "templates": [ { "template_uuid": "9fe01285-87cc-405b-9f2f-02cc1316bb63", "template_name": "Site Report", "company_name": "WP Engine", "brand_color": "#FF0000", "logo_url": "https://storage.googleapis.com/crs-assets/logos/wpengine-logo.png", "preview_image_url": "https://storage.googleapis.com/crs-assets/previews/site-report-preview.png", "sections": [ { "name": "cover" }, { "name": "overview" }, { "name": "usage" }, { "name": "themes" } ] } ]}Bad Request
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
An array of error objects describing specific errors that arose when servicing the request
object
The name of the resource that was being processed when the error occurred
(Optional) The specific field associated with the error
(Optional) A type associated with the error. invalid_value, access_error, value_unavailable
(Optional) A machine code relating to the error that occurred with the field and resource
(Optional) A human-readable message relating to the error that occurred with the field and resource
Example
{ "message": "Invalid Site: Name cannot be empty.", "errors": [ { "resource": "Site", "field": "name", "type": "invalid_value", "code": "too_long", "message": "Name is too long (maximum is 40 characters)" } ]}Authentication Error
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "Bad Credentials"}Not authorized
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "You don't have permission to perform that action"}Not found
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "Not Found"}Too many requests
Internal Server Error
object
A message regarding the error that occurred on the server
Example
{ "message": "An unexpected error occurred, please try again in a few minutes"}An invalid response was received from an upstream server
Service unavailable