Skip to content

Latest commit

 

History

History
526 lines (417 loc) · 14.8 KB

orgs-wlan-templates.md

File metadata and controls

526 lines (417 loc) · 14.8 KB

Orgs WLAN Templates

orgsWLANTemplates := client.OrgsWLANTemplates()

Class Name

OrgsWLANTemplates

Methods

Clone Org Template

Clone Org Template

CloneOrgTemplate(
    ctx context.Context,
    orgId uuid.UUID,
    templateId uuid.UUID,
    body *models.NameString) (
    models.ApiResponse[models.Template],
    error)

Parameters

Parameter Type Tags Description
orgId uuid.UUID Template, Required -
templateId uuid.UUID Template, Required -
body *models.NameString Body, Optional Request Body

Response Type

models.Template

Example Usage

ctx := context.Background()

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

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

body := models.NameString{
    Name:                 models.ToPointer("Cloned"),
}

apiResponse, err := orgsWLANTemplates.CloneOrgTemplate(ctx, orgId, templateId, &body)
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)

{
  "applies": {
    "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
    "site_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "sitegroup_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ]
  },
  "created_time": 0,
  "deviceprofile_ids": [
    "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
  ],
  "exceptions": {
    "site_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "sitegroup_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ]
  },
  "filter_by_deviceprofile": true,
  "id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
  "modified_time": 0,
  "name": "string",
  "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
}

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

Create Org Template

Create Org Template

CreateOrgTemplate(
    ctx context.Context,
    orgId uuid.UUID,
    body *models.Template) (
    models.ApiResponse[models.Template],
    error)

Parameters

Parameter Type Tags Description
orgId uuid.UUID Template, Required -
body *models.Template Body, Optional Request Body

Response Type

models.Template

Example Usage

ctx := context.Background()

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

body := models.Template{
    Name:                  "name6",
}

apiResponse, err := orgsWLANTemplates.CreateOrgTemplate(ctx, orgId, &body)
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)

{
  "applies": {
    "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
    "site_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "sitegroup_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ]
  },
  "created_time": 0,
  "deviceprofile_ids": [
    "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
  ],
  "exceptions": {
    "site_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "sitegroup_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ]
  },
  "filter_by_deviceprofile": true,
  "id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
  "modified_time": 0,
  "name": "string",
  "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
}

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

Delete Org Template

Delete Org Template

DeleteOrgTemplate(
    ctx context.Context,
    orgId uuid.UUID,
    templateId uuid.UUID) (
    http.Response,
    error)

Parameters

Parameter Type Tags Description
orgId uuid.UUID Template, Required -
templateId uuid.UUID Template, Required -

Response Type

``

Example Usage

ctx := context.Background()

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

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

resp, err := orgsWLANTemplates.DeleteOrgTemplate(ctx, orgId, templateId)
if err != nil {
    log.Fatalln(err)
} else {
    fmt.Println(resp.StatusCode)
}

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

Get Org Template

Get Org Template Details

GetOrgTemplate(
    ctx context.Context,
    orgId uuid.UUID,
    templateId uuid.UUID) (
    models.ApiResponse[models.Template],
    error)

Parameters

Parameter Type Tags Description
orgId uuid.UUID Template, Required -
templateId uuid.UUID Template, Required -

Response Type

models.Template

Example Usage

ctx := context.Background()

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

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

apiResponse, err := orgsWLANTemplates.GetOrgTemplate(ctx, orgId, templateId)
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)

{
  "applies": {
    "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
    "site_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "sitegroup_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ]
  },
  "created_time": 0,
  "deviceprofile_ids": [
    "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
  ],
  "exceptions": {
    "site_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "sitegroup_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ]
  },
  "filter_by_deviceprofile": true,
  "id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
  "modified_time": 0,
  "name": "string",
  "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
}

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

List Org Templates

Get List of Org WLAN Templates

ListOrgTemplates(
    ctx context.Context,
    orgId uuid.UUID,
    limit *int,
    page *int) (
    models.ApiResponse[[]models.Template],
    error)

Parameters

Parameter Type Tags Description
orgId uuid.UUID Template, Required -
limit *int Query, Optional Default: 100
Constraints: >= 0
page *int Query, Optional Default: 1
Constraints: >= 1

Response Type

[]models.Template

Example Usage

ctx := context.Background()

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

limit := 100

page := 1

apiResponse, err := orgsWLANTemplates.ListOrgTemplates(ctx, orgId, &limit, &page)
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)

[
  {
    "applies": {
      "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
      "site_ids": [
        "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
      ],
      "sitegroup_ids": [
        "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
      ]
    },
    "created_time": 0,
    "deviceprofile_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "exceptions": {
      "site_ids": [
        "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
      ],
      "sitegroup_ids": [
        "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
      ]
    },
    "filter_by_deviceprofile": true,
    "id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
    "modified_time": 0,
    "name": "string",
    "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
  }
]

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

Update Org Template

Update Org Template

UpdateOrgTemplate(
    ctx context.Context,
    orgId uuid.UUID,
    templateId uuid.UUID,
    body *models.Template) (
    models.ApiResponse[models.Template],
    error)

Parameters

Parameter Type Tags Description
orgId uuid.UUID Template, Required -
templateId uuid.UUID Template, Required -
body *models.Template Body, Optional Request Body

Response Type

models.Template

Example Usage

ctx := context.Background()

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

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

body := models.Template{
    Name:                  "name6",
}

apiResponse, err := orgsWLANTemplates.UpdateOrgTemplate(ctx, orgId, templateId, &body)
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)

{
  "applies": {
    "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
    "site_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "sitegroup_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ]
  },
  "created_time": 0,
  "deviceprofile_ids": [
    "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
  ],
  "exceptions": {
    "site_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ],
    "sitegroup_ids": [
      "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
    ]
  },
  "filter_by_deviceprofile": true,
  "id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",
  "modified_time": 0,
  "name": "string",
  "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
}

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