Skip to content

Latest commit

 

History

History
84 lines (62 loc) · 2.14 KB

sites-site-templates.md

File metadata and controls

84 lines (62 loc) · 2.14 KB

Sites Site Templates

sitesSiteTemplates := client.SitesSiteTemplates()

Class Name

SitesSiteTemplates

List Site Site Template Derived

Get derived Site Templates for Site

ListSiteSiteTemplateDerived(
    ctx context.Context,
    siteId uuid.UUID,
    resolve *bool) (
    models.ApiResponse[[]models.SiteTemplate],
    error)

Parameters

Parameter Type Tags Description
siteId uuid.UUID Template, Required -
resolve *bool Query, Optional whether resolve the site variables

Response Type

[]models.SiteTemplate

Example Usage

ctx := context.Background()

siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")



apiResponse, err := sitesSiteTemplates.ListSiteSiteTemplateDerived(ctx, siteId, nil)
if err != nil {
    log.Fatalln(err)
} else {
    // Printing the result and response
    fmt.Println(apiResponse.Data)
    fmt.Println(apiResponse.Response.StatusCode)
}

Example Response (as JSON)

[
  {
    "auto_upgrade": {
      "day_of_week": "mon",
      "enabled": true,
      "time_of_day": "string",
      "version": "string"
    },
    "name": "string",
    "vars": {
      "SSID_STR": "string",
      "VLAN_ID": "string"
    }
  }
]

Errors

HTTP Status Code Error Description Exception Class
400 Bad Syntax ResponseHttp400Exception
401 Unauthorized ResponseHttp401ErrorException
403 Permission Denied ResponseHttp403ErrorException
404 Not found. The API endpoint doesn’t exist or resource doesn’ t exist ResponseHttp404Exception
429 Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold ResponseHttp429ErrorException