diff --git a/README.md b/README.md index 542f8e06..1e619e26 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ ## Introduction -> Version: **2408.1.7** +> Version: **2408.1.8** > -> Date: **August 30, 2024** +> Date: **September 5, 2024** --- diff --git a/doc/controllers/ms-ps-logs.md b/doc/controllers/ms-ps-logs.md index 6a7d5c6b..f6861d5c 100644 --- a/doc/controllers/ms-ps-logs.md +++ b/doc/controllers/ms-ps-logs.md @@ -100,9 +100,9 @@ ListMspAuditLogs( sort *models.ListMspLogsSortEnum, start *int, end *int, + duration *string, limit *int, - page *int, - duration *string) ( + page *int) ( models.ApiResponse[models.ResponseLogSearch], error) ``` @@ -118,9 +118,9 @@ ListMspAuditLogs( | `sort` | [`*models.ListMspLogsSortEnum`](../../doc/models/list-msp-logs-sort-enum.md) | Query, Optional | sort order | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | +| `duration` | `*string` | Query, Optional | duration like 7d, 2w | | `limit` | `*int` | Query, Optional | - | | `page` | `*int` | Query, Optional | - | -| `duration` | `*string` | Query, Optional | duration like 7d, 2w | ## Response Type @@ -145,13 +145,13 @@ mspId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") +duration := "10m" + limit := 100 page := 1 -duration := "10m" - -apiResponse, err := mSPsLogs.ListMspAuditLogs(ctx, mspId, nil, nil, nil, nil, nil, nil, &limit, &page, &duration) +apiResponse, err := mSPsLogs.ListMspAuditLogs(ctx, mspId, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/ms-ps-orgs.md b/doc/controllers/ms-ps-orgs.md index 2b30bef6..6c779433 100644 --- a/doc/controllers/ms-ps-orgs.md +++ b/doc/controllers/ms-ps-orgs.md @@ -232,8 +232,8 @@ Get List of MSP Orgs Stats ListMspOrgStats( ctx context.Context, mspId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.StatsOrg], error) ``` @@ -243,8 +243,8 @@ ListMspOrgStats( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `mspId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -257,11 +257,11 @@ ctx := context.Background() mspId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := mSPsOrgs.ListMspOrgStats(ctx, mspId, &page, &limit) +page := 1 + +apiResponse, err := mSPsOrgs.ListMspOrgStats(ctx, mspId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-alarm-templates.md b/doc/controllers/orgs-alarm-templates.md index c5dc512f..dbd06f92 100644 --- a/doc/controllers/orgs-alarm-templates.md +++ b/doc/controllers/orgs-alarm-templates.md @@ -225,8 +225,8 @@ Get List of Org Alarm Templates ListOrgAlarmTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.AlarmTemplate], error) ``` @@ -236,8 +236,8 @@ ListOrgAlarmTemplates( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -250,11 +250,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsAlarmTemplates.ListOrgAlarmTemplates(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsAlarmTemplates.ListOrgAlarmTemplates(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-alarms.md b/doc/controllers/orgs-alarms.md index db54e130..fb6dd470 100644 --- a/doc/controllers/orgs-alarms.md +++ b/doc/controllers/orgs-alarms.md @@ -200,11 +200,11 @@ CountOrgAlarms( ctx context.Context, orgId uuid.UUID, distinct *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -215,11 +215,11 @@ CountOrgAlarms( | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | | `distinct` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -234,17 +234,17 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsAlarms.CountOrgAlarms(ctx, orgId, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsAlarms.CountOrgAlarms(ctx, orgId, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-antivirus-profiles.md b/doc/controllers/orgs-antivirus-profiles.md index 8a357dc8..66bb3ac3 100644 --- a/doc/controllers/orgs-antivirus-profiles.md +++ b/doc/controllers/orgs-antivirus-profiles.md @@ -220,8 +220,8 @@ Get List of Antivirus Profiles ListOrgAntivirusProfiles( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Avprofile], error) ``` @@ -231,8 +231,8 @@ ListOrgAntivirusProfiles( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -245,11 +245,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsAntivirusProfiles.ListOrgAntivirusProfiles(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsAntivirusProfiles.ListOrgAntivirusProfiles(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-ap-templates.md b/doc/controllers/orgs-ap-templates.md index 825a687f..1be5e558 100644 --- a/doc/controllers/orgs-ap-templates.md +++ b/doc/controllers/orgs-ap-templates.md @@ -763,8 +763,8 @@ Get List of Org AP Templates ListOrgAptemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.ApTemplate], error) ``` @@ -774,8 +774,8 @@ ListOrgAptemplates( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -788,11 +788,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsAPTemplates.ListOrgAptemplates(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsAPTemplates.ListOrgAptemplates(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-asset-filters.md b/doc/controllers/orgs-asset-filters.md index 051925e7..22d3550e 100644 --- a/doc/controllers/orgs-asset-filters.md +++ b/doc/controllers/orgs-asset-filters.md @@ -236,8 +236,8 @@ Each asset filter in the list operates independently. For a filter object to mat ListOrgAssetFilters( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.AssetFilter], error) ``` @@ -247,8 +247,8 @@ ListOrgAssetFilters( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -261,11 +261,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsAssetFilters.ListOrgAssetFilters(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsAssetFilters.ListOrgAssetFilters(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-assets.md b/doc/controllers/orgs-assets.md index 7a396649..bd9bf6f8 100644 --- a/doc/controllers/orgs-assets.md +++ b/doc/controllers/orgs-assets.md @@ -284,8 +284,8 @@ Get List of Org Assets ListOrgAssets( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Asset], error) ``` @@ -295,8 +295,8 @@ ListOrgAssets( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -309,11 +309,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsAssets.ListOrgAssets(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsAssets.ListOrgAssets(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-clients-wired.md b/doc/controllers/orgs-clients-wired.md index 15a5ae9c..2ba0aa8c 100644 --- a/doc/controllers/orgs-clients-wired.md +++ b/doc/controllers/orgs-clients-wired.md @@ -25,11 +25,11 @@ CountOrgWiredClients( ctx context.Context, orgId uuid.UUID, distinct *models.OrgWiredClientsCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -40,11 +40,11 @@ CountOrgWiredClients( | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | | `distinct` | [`*models.OrgWiredClientsCountDistinctEnum`](../../doc/models/org-wired-clients-count-distinct-enum.md) | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -59,17 +59,17 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") distinct := models.OrgWiredClientsCountDistinctEnum("mac") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsClientsWired.CountOrgWiredClients(ctx, orgId, &distinct, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsClientsWired.CountOrgWiredClients(ctx, orgId, &distinct, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-clients-wireless.md b/doc/controllers/orgs-clients-wireless.md index 7d072eaa..31e1d531 100644 --- a/doc/controllers/orgs-clients-wireless.md +++ b/doc/controllers/orgs-clients-wireless.md @@ -35,11 +35,11 @@ CountOrgWirelessClients( vlan *string, ssid *string, ipAddress *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -59,11 +59,11 @@ CountOrgWirelessClients( | `vlan` | `*string` | Query, Optional | vlan | | `ssid` | `*string` | Query, Optional | SSID | | `ipAddress` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -96,17 +96,17 @@ distinct := models.OrgClientsCountDistinctEnum("device") ipAddress := "192.168.1.1" -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsClientsWireless.CountOrgWirelessClients(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, &ipAddress, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsClientsWireless.CountOrgWirelessClients(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, &ipAddress, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -162,11 +162,11 @@ CountOrgWirelessClientsSessions( clientOs *string, ssid *string, wlanId *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -185,11 +185,11 @@ CountOrgWirelessClientsSessions( | `clientOs` | `*string` | Query, Optional | E.g. “Mojave”, “Windows 10”, “Linux” | | `ssid` | `*string` | Query, Optional | SSID | | `wlanId` | `*string` | Query, Optional | wlan_id | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -220,17 +220,17 @@ distinct := models.OrgClientSessionsCountDistinctEnum("device") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsClientsWireless.CountOrgWirelessClientsSessions(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsClientsWireless.CountOrgWirelessClientsSessions(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-devices-others.md b/doc/controllers/orgs-devices-others.md index f6ae88ea..a1122503 100644 --- a/doc/controllers/orgs-devices-others.md +++ b/doc/controllers/orgs-devices-others.md @@ -249,8 +249,8 @@ ListOrgOtherDevices( serial *string, model *string, name *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.DeviceOther], error) ``` @@ -265,8 +265,8 @@ ListOrgOtherDevices( | `serial` | `*string` | Query, Optional | - | | `model` | `*string` | Query, Optional | - | | `name` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -289,11 +289,11 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsDevicesOthers.ListOrgOtherDevices(ctx, orgId, nil, nil, nil, nil, nil, &page, &limit) +page := 1 + +apiResponse, err := orgsDevicesOthers.ListOrgOtherDevices(ctx, orgId, nil, nil, nil, nil, nil, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-devices.md b/doc/controllers/orgs-devices.md index a44696b3..653f1255 100644 --- a/doc/controllers/orgs-devices.md +++ b/doc/controllers/orgs-devices.md @@ -247,11 +247,11 @@ CountOrgDevices( lldpSystemDesc *string, lldpPortId *string, lldpMgmtAddr *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -275,11 +275,11 @@ CountOrgDevices( | `lldpSystemDesc` | `*string` | Query, Optional | LLDP system description | | `lldpPortId` | `*string` | Query, Optional | LLDP port id | | `lldpMgmtAddr` | `*string` | Query, Optional | LLDP management ip address | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -320,17 +320,17 @@ ipAddress := "192.168.1.1" -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsDevices.CountOrgDevices(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, &ipAddress, nil, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsDevices.CountOrgDevices(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, &ipAddress, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -444,8 +444,8 @@ Each radio MAC can have 16 BSSIDs (enumerate the last octet from 0-F) ListOrgApsMacs( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.ApRadioMac], error) ``` @@ -455,8 +455,8 @@ ListOrgApsMacs( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -469,11 +469,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsDevices.ListOrgApsMacs(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsDevices.ListOrgApsMacs(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-evpn-topologies.md b/doc/controllers/orgs-evpn-topologies.md index a58f5055..5ca6ef2c 100644 --- a/doc/controllers/orgs-evpn-topologies.md +++ b/doc/controllers/orgs-evpn-topologies.md @@ -298,8 +298,8 @@ Get List of the existing Org EVPN topologies ListOrgEvpnTopologies( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.EvpnTopology], error) ``` @@ -309,8 +309,8 @@ ListOrgEvpnTopologies( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -323,11 +323,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsEVPNTopologies.ListOrgEvpnTopologies(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsEVPNTopologies.ListOrgEvpnTopologies(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-gateway-templates.md b/doc/controllers/orgs-gateway-templates.md index 4f61fc6b..91622e11 100644 --- a/doc/controllers/orgs-gateway-templates.md +++ b/doc/controllers/orgs-gateway-templates.md @@ -496,8 +496,8 @@ Get List of Org Gateway Templates ListOrgGatewayTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.GatewayTemplate], error) ``` @@ -507,8 +507,8 @@ ListOrgGatewayTemplates( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -521,11 +521,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsGatewayTemplates.ListOrgGatewayTemplates(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsGatewayTemplates.ListOrgGatewayTemplates(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-guests.md b/doc/controllers/orgs-guests.md index 24bf4ceb..46449c28 100644 --- a/doc/controllers/orgs-guests.md +++ b/doc/controllers/orgs-guests.md @@ -27,11 +27,11 @@ CountOrgGuestAuthorizations( ctx context.Context, orgId uuid.UUID, distinct *models.OrgGuestsCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -42,11 +42,11 @@ CountOrgGuestAuthorizations( | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | | `distinct` | [`*models.OrgGuestsCountDistinctEnum`](../../doc/models/org-guests-count-distinct-enum.md) | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -61,17 +61,17 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") distinct := models.OrgGuestsCountDistinctEnum("auth_method") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsGuests.CountOrgGuestAuthorizations(ctx, orgId, &distinct, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsGuests.CountOrgGuestAuthorizations(ctx, orgId, &distinct, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-idp-profiles.md b/doc/controllers/orgs-idp-profiles.md index 9a1a2614..573808ba 100644 --- a/doc/controllers/orgs-idp-profiles.md +++ b/doc/controllers/orgs-idp-profiles.md @@ -260,8 +260,8 @@ get the list of Org IDP Profiles ListOrgIdpProfiles( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.IdpProfile], error) ``` @@ -271,8 +271,8 @@ ListOrgIdpProfiles( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -285,11 +285,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsIDPProfiles.ListOrgIdpProfiles(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsIDPProfiles.ListOrgIdpProfiles(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-logs.md b/doc/controllers/orgs-logs.md index 905f05d0..7a5d971f 100644 --- a/doc/controllers/orgs-logs.md +++ b/doc/controllers/orgs-logs.md @@ -27,11 +27,11 @@ CountOrgAuditLogs( adminName *string, siteId *string, message *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -46,11 +46,11 @@ CountOrgAuditLogs( | `adminName` | `*string` | Query, Optional | - | | `siteId` | `*string` | Query, Optional | - | | `message` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -73,17 +73,17 @@ distinct := models.OrgLogsCountDistinctEnum("admin_name") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsLogs.CountOrgAuditLogs(ctx, orgId, &distinct, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsLogs.CountOrgAuditLogs(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -136,9 +136,9 @@ ListOrgAuditLogs( sort *models.ListOrgLogsSortEnum, start *int, end *int, + duration *string, limit *int, - page *int, - duration *string) ( + page *int) ( models.ApiResponse[models.ResponseLogSearch], error) ``` @@ -154,9 +154,9 @@ ListOrgAuditLogs( | `sort` | [`*models.ListOrgLogsSortEnum`](../../doc/models/list-org-logs-sort-enum.md) | Query, Optional | sort order | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | +| `duration` | `*string` | Query, Optional | duration like 7d, 2w | | `limit` | `*int` | Query, Optional | - | | `page` | `*int` | Query, Optional | - | -| `duration` | `*string` | Query, Optional | duration like 7d, 2w | ## Response Type @@ -181,13 +181,13 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") +duration := "10m" + limit := 100 page := 1 -duration := "10m" - -apiResponse, err := orgsLogs.ListOrgAuditLogs(ctx, orgId, nil, nil, nil, nil, nil, nil, &limit, &page, &duration) +apiResponse, err := orgsLogs.ListOrgAuditLogs(ctx, orgId, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-mx-clusters.md b/doc/controllers/orgs-mx-clusters.md index b1829ffc..35fba833 100644 --- a/doc/controllers/orgs-mx-clusters.md +++ b/doc/controllers/orgs-mx-clusters.md @@ -336,8 +336,8 @@ Get List of Org MxEdge Clusters ListOrgMxEdgeClusters( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Mxcluster], error) ``` @@ -347,8 +347,8 @@ ListOrgMxEdgeClusters( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -361,11 +361,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsMxClusters.ListOrgMxEdgeClusters(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsMxClusters.ListOrgMxEdgeClusters(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-mx-tunnels.md b/doc/controllers/orgs-mx-tunnels.md index e5713970..207ec540 100644 --- a/doc/controllers/orgs-mx-tunnels.md +++ b/doc/controllers/orgs-mx-tunnels.md @@ -275,8 +275,8 @@ Get List of Org MxTunnels ListOrgMxTunnels( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Mxtunnel], error) ``` @@ -286,8 +286,8 @@ ListOrgMxTunnels( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -300,11 +300,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsMxTunnels.ListOrgMxTunnels(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsMxTunnels.ListOrgMxTunnels(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-nac-portals.md b/doc/controllers/orgs-nac-portals.md index 83e60cb1..63591575 100644 --- a/doc/controllers/orgs-nac-portals.md +++ b/doc/controllers/orgs-nac-portals.md @@ -444,11 +444,11 @@ ListOrgNacPortalSsoLatestFailures( ctx context.Context, orgId uuid.UUID, nacportalId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseSsoFailureSearch], error) ``` @@ -459,11 +459,11 @@ ListOrgNacPortalSsoLatestFailures( | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | | `nacportalId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -478,17 +478,17 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") nacportalId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsNACPortals.ListOrgNacPortalSsoLatestFailures(ctx, orgId, nacportalId, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsNACPortals.ListOrgNacPortalSsoLatestFailures(ctx, orgId, nacportalId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -531,8 +531,8 @@ List Org NAC Portals ListOrgNacPortals( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.NacPortal], error) ``` @@ -542,8 +542,8 @@ ListOrgNacPortals( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -556,11 +556,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsNACPortals.ListOrgNacPortals(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsNACPortals.ListOrgNacPortals(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-nac-rules.md b/doc/controllers/orgs-nac-rules.md index 56c11712..6672a38e 100644 --- a/doc/controllers/orgs-nac-rules.md +++ b/doc/controllers/orgs-nac-rules.md @@ -212,8 +212,8 @@ Get List of Org NAC Rules ListOrgNacRules( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.NacRule], error) ``` @@ -223,8 +223,8 @@ ListOrgNacRules( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -237,11 +237,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsNACRules.ListOrgNacRules(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsNACRules.ListOrgNacRules(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-nac-tags.md b/doc/controllers/orgs-nac-tags.md index 8b180e94..98fe935c 100644 --- a/doc/controllers/orgs-nac-tags.md +++ b/doc/controllers/orgs-nac-tags.md @@ -236,8 +236,8 @@ ListOrgNacTags( mType *string, name *string, match *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.NacTag], error) ``` @@ -250,8 +250,8 @@ ListOrgNacTags( | `mType` | `*string` | Query, Optional | Type of NAC Tag | | `name` | `*string` | Query, Optional | Name of NAC Tag | | `match` | `*string` | Query, Optional | Type of NAC Tag | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -270,11 +270,11 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsNACTags.ListOrgNacTags(ctx, orgId, nil, nil, nil, &page, &limit) +page := 1 + +apiResponse, err := orgsNACTags.ListOrgNacTags(ctx, orgId, nil, nil, nil, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-network-templates.md b/doc/controllers/orgs-network-templates.md index f374aaa8..be5f3eb7 100644 --- a/doc/controllers/orgs-network-templates.md +++ b/doc/controllers/orgs-network-templates.md @@ -569,8 +569,8 @@ Get List of Org Network Templates ListOrgNetworkTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.NetworkTemplate], error) ``` @@ -580,8 +580,8 @@ ListOrgNetworkTemplates( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -594,11 +594,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsNetworkTemplates.ListOrgNetworkTemplates(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsNetworkTemplates.ListOrgNetworkTemplates(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-networks.md b/doc/controllers/orgs-networks.md index 67b938c2..234b9308 100644 --- a/doc/controllers/orgs-networks.md +++ b/doc/controllers/orgs-networks.md @@ -560,8 +560,8 @@ Get List of Org Networks ListOrgNetworks( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Network], error) ``` @@ -571,8 +571,8 @@ ListOrgNetworks( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -585,11 +585,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsNetworks.ListOrgNetworks(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsNetworks.ListOrgNetworks(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-premium-analytics.md b/doc/controllers/orgs-premium-analytics.md index 5b3b35b5..73951e2d 100644 --- a/doc/controllers/orgs-premium-analytics.md +++ b/doc/controllers/orgs-premium-analytics.md @@ -17,8 +17,8 @@ Get List of premium analytics dashboards for this Org ListOrgPmaDashboards( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.PmaDashboard], error) ``` @@ -28,8 +28,8 @@ ListOrgPmaDashboards( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -42,11 +42,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsPremiumAnalytics.ListOrgPmaDashboards(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsPremiumAnalytics.ListOrgPmaDashboards(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-psk-portals.md b/doc/controllers/orgs-psk-portals.md index 02ac2ffc..44fed26c 100644 --- a/doc/controllers/orgs-psk-portals.md +++ b/doc/controllers/orgs-psk-portals.md @@ -449,8 +449,8 @@ Get List of Org Psk Portals ListOrgPskPortals( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.PskPortal], error) ``` @@ -460,8 +460,8 @@ ListOrgPskPortals( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -474,11 +474,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsPskPortals.ListOrgPskPortals(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsPskPortals.ListOrgPskPortals(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-psks.md b/doc/controllers/orgs-psks.md index 17faa2ae..daeccacd 100644 --- a/doc/controllers/orgs-psks.md +++ b/doc/controllers/orgs-psks.md @@ -411,8 +411,8 @@ ListOrgPsks( name *string, ssid *string, role *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Psk], error) ``` @@ -425,8 +425,8 @@ ListOrgPsks( | `name` | `*string` | Query, Optional | - | | `ssid` | `*string` | Query, Optional | - | | `role` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -445,11 +445,11 @@ name := "psk_name" -page := 1 - limit := 100 -apiResponse, err := orgsPsks.ListOrgPsks(ctx, orgId, &name, nil, nil, &page, &limit) +page := 1 + +apiResponse, err := orgsPsks.ListOrgPsks(ctx, orgId, &name, nil, nil, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-rf-templates.md b/doc/controllers/orgs-rf-templates.md index 65c301f2..0d264bf4 100644 --- a/doc/controllers/orgs-rf-templates.md +++ b/doc/controllers/orgs-rf-templates.md @@ -300,8 +300,8 @@ Get List of Org RF Template ListOrgRfTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.RfTemplate], error) ``` @@ -311,8 +311,8 @@ ListOrgRfTemplates( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -325,11 +325,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsRFTemplates.ListOrgRfTemplates(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsRFTemplates.ListOrgRfTemplates(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-sec-policies.md b/doc/controllers/orgs-sec-policies.md index 89dff8b5..131a4239 100644 --- a/doc/controllers/orgs-sec-policies.md +++ b/doc/controllers/orgs-sec-policies.md @@ -244,8 +244,8 @@ Get List of Org Security Policies ListOrgSecPolicies( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Secpolicy], error) ``` @@ -255,8 +255,8 @@ ListOrgSecPolicies( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -269,11 +269,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsSecPolicies.ListOrgSecPolicies(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsSecPolicies.ListOrgSecPolicies(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-service-policies.md b/doc/controllers/orgs-service-policies.md index 6d1beb98..8bda1c0f 100644 --- a/doc/controllers/orgs-service-policies.md +++ b/doc/controllers/orgs-service-policies.md @@ -194,8 +194,8 @@ Get List of Org Service Policies ListOrgServicePolicies( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.OrgServicePolicy], error) ``` @@ -205,8 +205,8 @@ ListOrgServicePolicies( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -219,11 +219,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsServicePolicies.ListOrgServicePolicies(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsServicePolicies.ListOrgServicePolicies(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-services.md b/doc/controllers/orgs-services.md index c6926731..d23fcabf 100644 --- a/doc/controllers/orgs-services.md +++ b/doc/controllers/orgs-services.md @@ -273,8 +273,8 @@ Get List of Org Services ListOrgServices( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Service], error) ``` @@ -284,8 +284,8 @@ ListOrgServices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -298,11 +298,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsServices.ListOrgServices(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsServices.ListOrgServices(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-site-templates.md b/doc/controllers/orgs-site-templates.md index a7ad5380..e636927b 100644 --- a/doc/controllers/orgs-site-templates.md +++ b/doc/controllers/orgs-site-templates.md @@ -226,8 +226,8 @@ Get List of Org Site Templates ListOrgSiteTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.SiteTemplate], error) ``` @@ -237,8 +237,8 @@ ListOrgSiteTemplates( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -251,11 +251,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsSiteTemplates.ListOrgSiteTemplates(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsSiteTemplates.ListOrgSiteTemplates(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-sitegroups.md b/doc/controllers/orgs-sitegroups.md index 2e74d99f..fb2ce786 100644 --- a/doc/controllers/orgs-sitegroups.md +++ b/doc/controllers/orgs-sitegroups.md @@ -217,8 +217,8 @@ Get List of Org Site Groups ListOrgSiteGroups( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Sitegroup], error) ``` @@ -228,8 +228,8 @@ ListOrgSiteGroups( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -242,11 +242,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsSitegroups.ListOrgSiteGroups(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsSitegroups.ListOrgSiteGroups(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-sites.md b/doc/controllers/orgs-sites.md index 67df415a..5beaab76 100644 --- a/doc/controllers/orgs-sites.md +++ b/doc/controllers/orgs-sites.md @@ -25,11 +25,11 @@ CountOrgSites( ctx context.Context, orgId uuid.UUID, distinct *models.OrgSitesCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -40,11 +40,11 @@ CountOrgSites( | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | | `distinct` | [`*models.OrgSitesCountDistinctEnum`](../../doc/models/org-sites-count-distinct-enum.md) | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -59,17 +59,17 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") distinct := models.OrgSitesCountDistinctEnum("id") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsSites.CountOrgSites(ctx, orgId, &distinct, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsSites.CountOrgSites(ctx, orgId, &distinct, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-sl-es.md b/doc/controllers/orgs-sl-es.md index 7cea18ab..2e646502 100644 --- a/doc/controllers/orgs-sl-es.md +++ b/doc/controllers/orgs-sl-es.md @@ -25,10 +25,10 @@ GetOrgSitesSle( sle *models.OrgSiteSleTypeEnum, start *int, end *int, - limit *int, - page *int, duration *string, - interval *string) ( + interval *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseOrgSiteSle], error) ``` @@ -41,10 +41,10 @@ GetOrgSitesSle( | `sle` | [`*models.OrgSiteSleTypeEnum`](../../doc/models/org-site-sle-type-enum.md) | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | -| `limit` | `*int` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | | `interval` | `*string` | Query, Optional | Aggregation works by giving a time range plus interval (e.g. 1d, 1h, 10m) where aggregation function would be applied to. | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -63,15 +63,15 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -limit := 100 - -page := 1 - duration := "10m" interval := "10m" -apiResponse, err := orgsSLEs.GetOrgSitesSle(ctx, orgId, nil, nil, nil, &limit, &page, &duration, &interval) +limit := 100 + +page := 1 + +apiResponse, err := orgsSLEs.GetOrgSitesSle(ctx, orgId, nil, nil, nil, &duration, &interval, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-sso-roles.md b/doc/controllers/orgs-sso-roles.md index 7c4a7688..b1e53896 100644 --- a/doc/controllers/orgs-sso-roles.md +++ b/doc/controllers/orgs-sso-roles.md @@ -236,8 +236,8 @@ Get List of Org SSO Roles ListOrgSsoRoles( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.SsoRoleMsp], error) ``` @@ -247,8 +247,8 @@ ListOrgSsoRoles( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -261,11 +261,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsSSORoles.ListOrgSsoRoles(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsSSORoles.ListOrgSsoRoles(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-sso.md b/doc/controllers/orgs-sso.md index 7a9f15e6..28e75c6c 100644 --- a/doc/controllers/orgs-sso.md +++ b/doc/controllers/orgs-sso.md @@ -383,11 +383,11 @@ ListOrgSsoLatestFailures( ctx context.Context, orgId uuid.UUID, ssoId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseSsoFailureSearch], error) ``` @@ -398,11 +398,11 @@ ListOrgSsoLatestFailures( | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | | `ssoId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -417,17 +417,17 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") ssoId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsSSO.ListOrgSsoLatestFailures(ctx, orgId, ssoId, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsSSO.ListOrgSsoLatestFailures(ctx, orgId, ssoId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -470,8 +470,8 @@ Get List of Org SSO Configuration ListOrgSsos( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Sso], error) ``` @@ -481,8 +481,8 @@ ListOrgSsos( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -495,11 +495,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsSSO.ListOrgSsos(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsSSO.ListOrgSsos(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-stats-assets.md b/doc/controllers/orgs-stats-assets.md index cbbf68b5..b4eb156b 100644 --- a/doc/controllers/orgs-stats-assets.md +++ b/doc/controllers/orgs-stats-assets.md @@ -95,11 +95,11 @@ Get List of Org Assets Stats ListOrgAssetsStats( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsAsset], error) ``` @@ -109,11 +109,11 @@ ListOrgAssetsStats( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -126,17 +126,17 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsStatsAssets.ListOrgAssetsStats(ctx, orgId, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsStatsAssets.ListOrgAssetsStats(ctx, orgId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-stats-devices.md b/doc/controllers/orgs-stats-devices.md index b7c1eeb8..fbc11c52 100644 --- a/doc/controllers/orgs-stats-devices.md +++ b/doc/controllers/orgs-stats-devices.md @@ -25,11 +25,11 @@ ListOrgDevicesStats( evpntopoId *string, evpnUnused *string, fields *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsDevice], error) ``` @@ -46,11 +46,11 @@ ListOrgDevicesStats( | `evpntopoId` | `*string` | Query, Optional | EVPN Topology ID | | `evpnUnused` | `*string` | Query, Optional | if `evpn_unused`==`true`, find EVPN eligible switches which don’t belong to any EVPN Topology yet | | `fields` | `*string` | Query, Optional | list of additional fields requests, comma separeted, or `fields=*` for all of them | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -77,17 +77,17 @@ status := models.DeviceStatusEnum("all") fields := "field1,field2" -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsStatsDevices.ListOrgDevicesStats(ctx, orgId, &mType, &status, nil, nil, nil, nil, &fields, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsStatsDevices.ListOrgDevicesStats(ctx, orgId, &mType, &status, nil, nil, nil, nil, &fields, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-stats-mx-edges.md b/doc/controllers/orgs-stats-mx-edges.md index d3d09cdb..93fb8239 100644 --- a/doc/controllers/orgs-stats-mx-edges.md +++ b/doc/controllers/orgs-stats-mx-edges.md @@ -247,12 +247,12 @@ Get List of Org MxEdge Stats ListOrgMxEdgesStats( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int, + forSite *bool, start *int, end *int, duration *string, - forSite *bool) ( + limit *int, + page *int) ( models.ApiResponse[[]models.StatsMxedge], error) ``` @@ -262,12 +262,12 @@ ListOrgMxEdgesStats( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | +| `forSite` | `*bool` | Query, Optional | filter for site level mist edges | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | -| `forSite` | `*bool` | Query, Optional | filter for site level mist edges | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -280,9 +280,7 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - -limit := 100 +forSite := false @@ -290,9 +288,11 @@ limit := 100 duration := "10m" -forSite := false +limit := 100 + +page := 1 -apiResponse, err := orgsStatsMxEdges.ListOrgMxEdgesStats(ctx, orgId, &page, &limit, nil, nil, &duration, &forSite) +apiResponse, err := orgsStatsMxEdges.ListOrgMxEdgesStats(ctx, orgId, &forSite, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-stats-ports.md b/doc/controllers/orgs-stats-ports.md index ae18eb63..5ed907b6 100644 --- a/doc/controllers/orgs-stats-ports.md +++ b/doc/controllers/orgs-stats-ports.md @@ -48,11 +48,11 @@ CountOrgSwitchPorts( stpRole *models.CountPortsStpRoleEnum, authState *models.CountPortsAuthStateEnum, up *bool, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -88,11 +88,11 @@ CountOrgSwitchPorts( | `stpRole` | [`*models.CountPortsStpRoleEnum`](../../doc/models/count-ports-stp-role-enum.md) | Query, Optional | if `up`==`true` | | `authState` | [`*models.CountPortsAuthStateEnum`](../../doc/models/count-ports-auth-state-enum.md) | Query, Optional | if `up`==`true` | | `up` | `*bool` | Query, Optional | indicates if interface is up | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -157,17 +157,17 @@ distinct := models.OrgSwitchPortCountDistinctEnum("mac") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsStatsPorts.CountOrgSwitchPorts(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsStatsPorts.CountOrgSwitchPorts(ctx, orgId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-stats-vpn-peers.md b/doc/controllers/orgs-stats-vpn-peers.md index e5ee05f2..0aebc3ab 100644 --- a/doc/controllers/orgs-stats-vpn-peers.md +++ b/doc/controllers/orgs-stats-vpn-peers.md @@ -23,11 +23,11 @@ CountOrgPeerPathStats( ctx context.Context, orgId uuid.UUID, distinct *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -38,11 +38,11 @@ CountOrgPeerPathStats( | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | | `distinct` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -57,17 +57,17 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsStatsVPNPeers.CountOrgPeerPathStats(ctx, orgId, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsStatsVPNPeers.CountOrgPeerPathStats(ctx, orgId, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-stats.md b/doc/controllers/orgs-stats.md index a0a55534..b2ee7891 100644 --- a/doc/controllers/orgs-stats.md +++ b/doc/controllers/orgs-stats.md @@ -17,11 +17,11 @@ Get Org Stats GetOrgStats( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.StatsOrg], error) ``` @@ -31,11 +31,11 @@ GetOrgStats( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -48,17 +48,17 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := orgsStats.GetOrgStats(ctx, orgId, &page, &limit, nil, nil, &duration) +apiResponse, err := orgsStats.GetOrgStats(ctx, orgId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-user-ma-cs.md b/doc/controllers/orgs-user-ma-cs.md index 70f84ffa..795117eb 100644 --- a/doc/controllers/orgs-user-ma-cs.md +++ b/doc/controllers/orgs-user-ma-cs.md @@ -303,8 +303,8 @@ SearchOrgUserMacs( orgId uuid.UUID, mac *string, labels []string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[models.UserMacsSearch], error) ``` @@ -316,8 +316,8 @@ SearchOrgUserMacs( | `orgId` | `uuid.UUID` | Template, Required | - | | `mac` | `*string` | Query, Optional | mac address | | `labels` | `[]string` | Query, Optional | optional, array of strings of labels | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -334,11 +334,11 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsUserMACs.SearchOrgUserMacs(ctx, orgId, nil, nil, &page, &limit) +page := 1 + +apiResponse, err := orgsUserMACs.SearchOrgUserMacs(ctx, orgId, nil, nil, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-vp-ns.md b/doc/controllers/orgs-vp-ns.md index 65316d99..d91322d2 100644 --- a/doc/controllers/orgs-vp-ns.md +++ b/doc/controllers/orgs-vp-ns.md @@ -241,8 +241,8 @@ Get List of Org VPNs ListOrgsVpns( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Vpn], error) ``` @@ -252,8 +252,8 @@ ListOrgsVpns( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -266,11 +266,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsVPNs.ListOrgsVpns(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsVPNs.ListOrgsVpns(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-webhooks.md b/doc/controllers/orgs-webhooks.md index d3744be8..0d74f906 100644 --- a/doc/controllers/orgs-webhooks.md +++ b/doc/controllers/orgs-webhooks.md @@ -362,8 +362,8 @@ Get List of Org Webhooks ListOrgWebhooks( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Webhook], error) ``` @@ -373,8 +373,8 @@ ListOrgWebhooks( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -387,11 +387,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsWebhooks.ListOrgWebhooks(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsWebhooks.ListOrgWebhooks(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-wlan-templates.md b/doc/controllers/orgs-wlan-templates.md index 7bf6ea13..4c5f7206 100644 --- a/doc/controllers/orgs-wlan-templates.md +++ b/doc/controllers/orgs-wlan-templates.md @@ -348,8 +348,8 @@ Get List of Org WLAN Templates ListOrgTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Template], error) ``` @@ -359,8 +359,8 @@ ListOrgTemplates( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -373,11 +373,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsWLANTemplates.ListOrgTemplates(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsWLANTemplates.ListOrgTemplates(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-wlans.md b/doc/controllers/orgs-wlans.md index cea4891d..44d3c33f 100644 --- a/doc/controllers/orgs-wlans.md +++ b/doc/controllers/orgs-wlans.md @@ -104,7 +104,7 @@ body := models.Wlan{ "msg.snapchat.com", }, PortalImage: models.NewOptional(models.ToPointer("https://url/to/image.png")), - RoamMode: models.ToPointer(models.WlanRoamModeEnum("none")), + RoamMode: models.ToPointer(models.WlanRoamModeEnum("NONE")), SiteId: models.ToPointer(uuid.MustParse("441a1214-6928-442a-8e92-e1d34b8ec6a6")), SleExcluded: models.ToPointer(false), Ssid: "corporate", @@ -307,8 +307,8 @@ Get List of Org Wlans ListOrgWlans( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Wlan], error) ``` @@ -318,8 +318,8 @@ ListOrgWlans( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -332,11 +332,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsWlans.ListOrgWlans(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsWlans.ListOrgWlans(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -445,7 +445,7 @@ body := models.Wlan{ "msg.snapchat.com", }, PortalImage: models.NewOptional(models.ToPointer("https://url/to/image.png")), - RoamMode: models.ToPointer(models.WlanRoamModeEnum("none")), + RoamMode: models.ToPointer(models.WlanRoamModeEnum("NONE")), SiteId: models.ToPointer(uuid.MustParse("441a1214-6928-442a-8e92-e1d34b8ec6a6")), SleExcluded: models.ToPointer(false), Ssid: "corporate", diff --git a/doc/controllers/orgs-wx-rules.md b/doc/controllers/orgs-wx-rules.md index 5c02533e..1a3bd385 100644 --- a/doc/controllers/orgs-wx-rules.md +++ b/doc/controllers/orgs-wx-rules.md @@ -366,8 +366,8 @@ Get List of Org WxRules ListOrgWxRules( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanRule], error) ``` @@ -377,8 +377,8 @@ ListOrgWxRules( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -391,11 +391,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsWxRules.ListOrgWxRules(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsWxRules.ListOrgWxRules(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-wx-tags.md b/doc/controllers/orgs-wx-tags.md index cc8fee20..9224d6e5 100644 --- a/doc/controllers/orgs-wx-tags.md +++ b/doc/controllers/orgs-wx-tags.md @@ -385,8 +385,8 @@ Get List of Org WxLAN Tags ListOrgWxTags( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanTag], error) ``` @@ -396,8 +396,8 @@ ListOrgWxTags( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -410,11 +410,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsWxTags.ListOrgWxTags(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsWxTags.ListOrgWxTags(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/orgs-wx-tunnels.md b/doc/controllers/orgs-wx-tunnels.md index 91f70135..f2a1a217 100644 --- a/doc/controllers/orgs-wx-tunnels.md +++ b/doc/controllers/orgs-wx-tunnels.md @@ -295,8 +295,8 @@ Get List of Org WxLAN Tunnels ListOrgWxTunnels( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanTunnel], error) ``` @@ -306,8 +306,8 @@ ListOrgWxTunnels( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -320,11 +320,11 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := orgsWxTunnels.ListOrgWxTunnels(ctx, orgId, &page, &limit) +page := 1 + +apiResponse, err := orgsWxTunnels.ListOrgWxTunnels(ctx, orgId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/self-audit-logs.md b/doc/controllers/self-audit-logs.md index 55adcd30..3a308fcd 100644 --- a/doc/controllers/self-audit-logs.md +++ b/doc/controllers/self-audit-logs.md @@ -17,11 +17,11 @@ Audit logs records all administrative activities done by current admin across al ```go ListSelfAuditLogs( ctx context.Context, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseSelfAuditLogs], error) ``` @@ -30,11 +30,11 @@ ListSelfAuditLogs( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -45,17 +45,17 @@ ListSelfAuditLogs( ```go ctx := context.Background() -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := selfAuditLogs.ListSelfAuditLogs(ctx, &page, &limit, nil, nil, &duration) +apiResponse, err := selfAuditLogs.ListSelfAuditLogs(ctx, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-alarms.md b/doc/controllers/sites-alarms.md index d3ccb9a0..36d0a7e0 100644 --- a/doc/controllers/sites-alarms.md +++ b/doc/controllers/sites-alarms.md @@ -208,11 +208,11 @@ CountSiteAlarms( mType *string, severity *string, group *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -228,11 +228,11 @@ CountSiteAlarms( | `mType` | `*string` | Query, Optional | Key-name of the alarms; accepts multiple values separated by comma | | `severity` | `*string` | Query, Optional | Alarm severity; accepts multiple values separated by comma | | `group` | `*string` | Query, Optional | Alarm group name; accepts multiple values separated by comma | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -257,17 +257,17 @@ distinct := models.AlarmCountDisctinctEnum("type") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesAlarms.CountSiteAlarms(ctx, siteId, &distinct, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesAlarms.CountSiteAlarms(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-asset-filters.md b/doc/controllers/sites-asset-filters.md index 97219df6..78c35295 100644 --- a/doc/controllers/sites-asset-filters.md +++ b/doc/controllers/sites-asset-filters.md @@ -236,8 +236,8 @@ Get List of Site Asset Filters ListSiteAssetFilters( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.AssetFilter], error) ``` @@ -247,8 +247,8 @@ ListSiteAssetFilters( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -261,11 +261,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesAssetFilters.ListSiteAssetFilters(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesAssetFilters.ListSiteAssetFilters(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-assets.md b/doc/controllers/sites-assets.md index 1eeb89f0..156718df 100644 --- a/doc/controllers/sites-assets.md +++ b/doc/controllers/sites-assets.md @@ -288,8 +288,8 @@ Get List of Site Assets ListSiteAssets( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Asset], error) ``` @@ -299,8 +299,8 @@ ListSiteAssets( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -313,11 +313,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesAssets.ListSiteAssets(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesAssets.ListSiteAssets(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-beacons.md b/doc/controllers/sites-beacons.md index 9512651f..5d16cc6c 100644 --- a/doc/controllers/sites-beacons.md +++ b/doc/controllers/sites-beacons.md @@ -248,8 +248,8 @@ Get List of Site Beacons ListSiteBeacons( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Beacon], error) ``` @@ -259,8 +259,8 @@ ListSiteBeacons( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -273,11 +273,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesBeacons.ListSiteBeacons(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesBeacons.ListSiteBeacons(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-clients-wired.md b/doc/controllers/sites-clients-wired.md index 33aa2075..47d151a0 100644 --- a/doc/controllers/sites-clients-wired.md +++ b/doc/controllers/sites-clients-wired.md @@ -27,11 +27,11 @@ CountSiteWiredClients( deviceMac *string, portId *string, vlan *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -46,11 +46,11 @@ CountSiteWiredClients( | `deviceMac` | `*string` | Query, Optional | device mac | | `portId` | `*string` | Query, Optional | port id | | `vlan` | `*string` | Query, Optional | vlan | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -73,17 +73,17 @@ distinct := models.SiteWiredClientsCountDistinctEnum("mac") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesClientsWired.CountSiteWiredClients(ctx, siteId, &distinct, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesClientsWired.CountSiteWiredClients(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-clients-wireless.md b/doc/controllers/sites-clients-wireless.md index 3626cde7..6ec4429c 100644 --- a/doc/controllers/sites-clients-wireless.md +++ b/doc/controllers/sites-clients-wireless.md @@ -152,11 +152,11 @@ CountSiteWirelessClientSessions( clientOs *string, ssid *string, wlanId *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -175,11 +175,11 @@ CountSiteWirelessClientSessions( | `clientOs` | `*string` | Query, Optional | E.g. “Mojave”, “Windows 10”, “Linux” | | `ssid` | `*string` | Query, Optional | SSID | | `wlanId` | `*string` | Query, Optional | wlan_id | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -210,17 +210,17 @@ distinct := models.SiteClientSessionsCountDistinctEnum("mac") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesClientsWireless.CountSiteWirelessClientSessions(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesClientsWireless.CountSiteWirelessClientSessions(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -276,11 +276,11 @@ CountSiteWirelessClients( os *string, model *string, device *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -299,11 +299,11 @@ CountSiteWirelessClients( | `os` | `*string` | Query, Optional | - | | `model` | `*string` | Query, Optional | - | | `device` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -334,17 +334,17 @@ ipAddress := "192.168.1.1" -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesClientsWireless.CountSiteWirelessClients(ctx, siteId, &distinct, nil, nil, &ipAddress, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesClientsWireless.CountSiteWirelessClients(ctx, siteId, &distinct, nil, nil, &ipAddress, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -400,9 +400,9 @@ GetSiteEventsForClient( ssid *string, start *int, end *int, - page *int, + duration *string, limit *int, - duration *string) ( + page *int) ( models.ApiResponse[models.ResponseClientEventsSearch], error) ``` @@ -421,9 +421,9 @@ GetSiteEventsForClient( | `ssid` | `*string` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -454,13 +454,13 @@ clientMac := "0000000000ab" -page := 1 +duration := "10m" limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesClientsWireless.GetSiteEventsForClient(ctx, siteId, clientMac, nil, nil, nil, nil, nil, nil, nil, nil, &page, &limit, &duration) +apiResponse, err := sitesClientsWireless.GetSiteEventsForClient(ctx, siteId, clientMac, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-devices-others.md b/doc/controllers/sites-devices-others.md index 955295cf..2ab09af1 100644 --- a/doc/controllers/sites-devices-others.md +++ b/doc/controllers/sites-devices-others.md @@ -120,8 +120,8 @@ ListSiteOtherDevices( serial *string, model *string, name *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.DeviceOther], error) ``` @@ -136,8 +136,8 @@ ListSiteOtherDevices( | `serial` | `*string` | Query, Optional | - | | `model` | `*string` | Query, Optional | - | | `name` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -160,11 +160,11 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesDevicesOthers.ListSiteOtherDevices(ctx, siteId, nil, nil, nil, nil, nil, &page, &limit) +page := 1 + +apiResponse, err := sitesDevicesOthers.ListSiteOtherDevices(ctx, siteId, nil, nil, nil, nil, nil, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-devices.md b/doc/controllers/sites-devices.md index 6a5b968c..af4cfa58 100644 --- a/doc/controllers/sites-devices.md +++ b/doc/controllers/sites-devices.md @@ -102,11 +102,11 @@ CountSiteDeviceConfigHistory( siteId uuid.UUID, distinct *string, mac *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -118,11 +118,11 @@ CountSiteDeviceConfigHistory( | `siteId` | `uuid.UUID` | Template, Required | - | | `distinct` | `*string` | Query, Optional | - | | `mac` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -139,17 +139,17 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesDevices.CountSiteDeviceConfigHistory(ctx, siteId, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesDevices.CountSiteDeviceConfigHistory(ctx, siteId, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -297,11 +297,11 @@ CountSiteDeviceLastConfig( ctx context.Context, siteId uuid.UUID, distinct *models.SiteDeviceLastConfigCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -312,11 +312,11 @@ CountSiteDeviceLastConfig( | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | | `distinct` | [`*models.SiteDeviceLastConfigCountDistinctEnum`](../../doc/models/site-device-last-config-count-distinct-enum.md) | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -331,17 +331,17 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") distinct := models.SiteDeviceLastConfigCountDistinctEnum("mac") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesDevices.CountSiteDeviceLastConfig(ctx, siteId, &distinct, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesDevices.CountSiteDeviceLastConfig(ctx, siteId, &distinct, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -400,11 +400,11 @@ CountSiteDevices( lldpPortId *string, lldpMgmtAddr *string, mapId *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -426,11 +426,11 @@ CountSiteDevices( | `lldpPortId` | `*string` | Query, Optional | - | | `lldpMgmtAddr` | `*string` | Query, Optional | - | | `mapId` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -467,17 +467,17 @@ distinct := models.SiteDevicesCountDistinctEnum("model") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesDevices.CountSiteDevices(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesDevices.CountSiteDevices(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -1120,8 +1120,8 @@ ListSiteDevices( siteId uuid.UUID, mType *models.DeviceTypeWithAllEnum, name *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.ConfigDevice], error) ``` @@ -1133,8 +1133,8 @@ ListSiteDevices( | `siteId` | `uuid.UUID` | Template, Required | - | | `mType` | [`*models.DeviceTypeWithAllEnum`](../../doc/models/device-type-with-all-enum.md) | Query, Optional | - | | `name` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -1151,11 +1151,11 @@ mType := models.DeviceTypeWithAllEnum("ap") -page := 1 - limit := 100 -apiResponse, err := sitesDevices.ListSiteDevices(ctx, siteId, &mType, nil, &page, &limit) +page := 1 + +apiResponse, err := sitesDevices.ListSiteDevices(ctx, siteId, &mType, nil, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-guests.md b/doc/controllers/sites-guests.md index 31513643..3df34369 100644 --- a/doc/controllers/sites-guests.md +++ b/doc/controllers/sites-guests.md @@ -28,11 +28,11 @@ CountSiteGuestAuthorizations( ctx context.Context, siteId uuid.UUID, distinct *models.SiteGuestsCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -43,11 +43,11 @@ CountSiteGuestAuthorizations( | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | | `distinct` | [`*models.SiteGuestsCountDistinctEnum`](../../doc/models/site-guests-count-distinct-enum.md) | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -62,17 +62,17 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") distinct := models.SiteGuestsCountDistinctEnum("auth_method") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesGuests.CountSiteGuestAuthorizations(ctx, siteId, &distinct, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesGuests.CountSiteGuestAuthorizations(ctx, siteId, &distinct, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-insights.md b/doc/controllers/sites-insights.md index 57e3bc8f..27cb7b94 100644 --- a/doc/controllers/sites-insights.md +++ b/doc/controllers/sites-insights.md @@ -25,12 +25,12 @@ GetSiteInsightMetrics( ctx context.Context, siteId uuid.UUID, metric string, - page *int, - limit *int, start *int, end *int, duration *string, - interval *string) ( + interval *string, + limit *int, + page *int) ( models.ApiResponse[models.InsightMetrics], error) ``` @@ -41,12 +41,12 @@ GetSiteInsightMetrics( | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | | `metric` | `string` | Template, Required | see /api/v1/const/insight_metrics for available metrics | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | | `interval` | `*string` | Query, Optional | Aggregation works by giving a time range plus interval (e.g. 1d, 1h, 10m) where aggregation function would be applied to. | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -61,10 +61,6 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") metric := "metric8" -page := 1 - -limit := 100 - @@ -73,7 +69,11 @@ duration := "10m" interval := "10m" -apiResponse, err := sitesInsights.GetSiteInsightMetrics(ctx, siteId, metric, &page, &limit, nil, nil, &duration, &interval) +limit := 100 + +page := 1 + +apiResponse, err := sitesInsights.GetSiteInsightMetrics(ctx, siteId, metric, nil, nil, &duration, &interval, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -118,12 +118,12 @@ GetSiteInsightMetricsForClient( siteId uuid.UUID, clientMac string, metric string, - page *int, - limit *int, start *int, end *int, duration *string, - interval *string) ( + interval *string, + limit *int, + page *int) ( models.ApiResponse[models.InsightMetrics], error) ``` @@ -135,12 +135,12 @@ GetSiteInsightMetricsForClient( | `siteId` | `uuid.UUID` | Template, Required | - | | `clientMac` | `string` | Template, Required | - | | `metric` | `string` | Template, Required | see /api/v1/const/insight_metrics for available metrics | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | | `interval` | `*string` | Query, Optional | Aggregation works by giving a time range plus interval (e.g. 1d, 1h, 10m) where aggregation function would be applied to. | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -157,10 +157,6 @@ clientMac := "0000000000ab" metric := "metric8" -page := 1 - -limit := 100 - @@ -169,7 +165,11 @@ duration := "10m" interval := "10m" -apiResponse, err := sitesInsights.GetSiteInsightMetricsForClient(ctx, siteId, clientMac, metric, &page, &limit, nil, nil, &duration, &interval) +limit := 100 + +page := 1 + +apiResponse, err := sitesInsights.GetSiteInsightMetricsForClient(ctx, siteId, clientMac, metric, nil, nil, &duration, &interval, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -214,12 +214,12 @@ GetSiteInsightMetricsForDevice( siteId uuid.UUID, metric string, deviceMac string, - page *int, - limit *int, start *int, end *int, duration *string, - interval *string) ( + interval *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseDeviceMetrics], error) ``` @@ -231,12 +231,12 @@ GetSiteInsightMetricsForDevice( | `siteId` | `uuid.UUID` | Template, Required | - | | `metric` | `string` | Template, Required | see /api/v1/const/insight_metrics for available metrics | | `deviceMac` | `string` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | | `interval` | `*string` | Query, Optional | Aggregation works by giving a time range plus interval (e.g. 1d, 1h, 10m) where aggregation function would be applied to. | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -253,10 +253,6 @@ metric := "metric8" deviceMac := "0000000000ab" -page := 1 - -limit := 100 - @@ -265,7 +261,11 @@ duration := "10m" interval := "10m" -apiResponse, err := sitesInsights.GetSiteInsightMetricsForDevice(ctx, siteId, metric, deviceMac, &page, &limit, nil, nil, &duration, &interval) +limit := 100 + +page := 1 + +apiResponse, err := sitesInsights.GetSiteInsightMetricsForDevice(ctx, siteId, metric, deviceMac, nil, nil, &duration, &interval, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-maps.md b/doc/controllers/sites-maps.md index cfb4a96d..7a9c3891 100644 --- a/doc/controllers/sites-maps.md +++ b/doc/controllers/sites-maps.md @@ -642,8 +642,8 @@ Get List of Site Maps ListSiteMaps( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Map], error) ``` @@ -653,8 +653,8 @@ ListSiteMaps( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -667,11 +667,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesMaps.ListSiteMaps(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesMaps.ListSiteMaps(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-mx-edges.md b/doc/controllers/sites-mx-edges.md index 36b93f35..584a6b25 100644 --- a/doc/controllers/sites-mx-edges.md +++ b/doc/controllers/sites-mx-edges.md @@ -355,8 +355,8 @@ Get List of Site Mist Edges ListSiteMxEdges( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Mxedge], error) ``` @@ -366,8 +366,8 @@ ListSiteMxEdges( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -380,11 +380,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesMxEdges.ListSiteMxEdges(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesMxEdges.ListSiteMxEdges(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-psks.md b/doc/controllers/sites-psks.md index cfa9f0d2..ee4afcf9 100644 --- a/doc/controllers/sites-psks.md +++ b/doc/controllers/sites-psks.md @@ -282,8 +282,8 @@ ListSitePsks( ssid *string, role *string, name *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Psk], error) ``` @@ -296,8 +296,8 @@ ListSitePsks( | `ssid` | `*string` | Query, Optional | - | | `role` | `*string` | Query, Optional | - | | `name` | `*string` | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -316,11 +316,11 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesPsks.ListSitePsks(ctx, siteId, nil, nil, nil, &page, &limit) +page := 1 + +apiResponse, err := sitesPsks.ListSitePsks(ctx, siteId, nil, nil, nil, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-rfdiags.md b/doc/controllers/sites-rfdiags.md index 1f6f89fb..ce145037 100644 --- a/doc/controllers/sites-rfdiags.md +++ b/doc/controllers/sites-rfdiags.md @@ -216,11 +216,11 @@ List RF Glass Recording GetSiteSiteRfdiagRecording( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[][]models.RfDiagInfoItem], error) ``` @@ -230,11 +230,11 @@ GetSiteSiteRfdiagRecording( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -247,17 +247,17 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesRfdiags.GetSiteSiteRfdiagRecording(ctx, siteId, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesRfdiags.GetSiteSiteRfdiagRecording(ctx, siteId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-rrm.md b/doc/controllers/sites-rrm.md index 4801bb5e..634b6136 100644 --- a/doc/controllers/sites-rrm.md +++ b/doc/controllers/sites-rrm.md @@ -246,8 +246,8 @@ GetSiteCurrentRrmNeighbors( ctx context.Context, siteId uuid.UUID, band models.Dot11BandEnum, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[models.ResponseRrmNeighbors], error) ``` @@ -258,8 +258,8 @@ GetSiteCurrentRrmNeighbors( | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | | `band` | [`models.Dot11BandEnum`](../../doc/models/dot-11-band-enum.md) | Template, Required | 802.11 Band | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -274,11 +274,11 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") band := models.Dot11BandEnum("6") -page := 1 - limit := 100 -apiResponse, err := sitesRRM.GetSiteCurrentRrmNeighbors(ctx, siteId, band, &page, &limit) +page := 1 + +apiResponse, err := sitesRRM.GetSiteCurrentRrmNeighbors(ctx, siteId, band, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -330,11 +330,11 @@ GetSiteRrmEvents( ctx context.Context, siteId uuid.UUID, band *models.Dot11BandEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseEventsRrm], error) ``` @@ -345,11 +345,11 @@ GetSiteRrmEvents( | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | | `band` | [`*models.Dot11BandEnum`](../../doc/models/dot-11-band-enum.md) | Query, Optional | 802.11 Band | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -364,17 +364,17 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesRRM.GetSiteRrmEvents(ctx, siteId, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesRRM.GetSiteRrmEvents(ctx, siteId, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-rssi-zones.md b/doc/controllers/sites-rssi-zones.md index 595bc4d0..290256bd 100644 --- a/doc/controllers/sites-rssi-zones.md +++ b/doc/controllers/sites-rssi-zones.md @@ -229,8 +229,8 @@ Get List of Site RSSI Zone (RSSI-based) ListSiteRssiZones( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.RssiZone], error) ``` @@ -240,8 +240,8 @@ ListSiteRssiZones( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -254,11 +254,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesRSSIZones.ListSiteRssiZones(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesRSSIZones.ListSiteRssiZones(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-stats-assets.md b/doc/controllers/sites-stats-assets.md index 50e02893..5c74b346 100644 --- a/doc/controllers/sites-stats-assets.md +++ b/doc/controllers/sites-stats-assets.md @@ -196,8 +196,8 @@ GetSiteAssetsOfInterest( duration *string, start *int, end *int, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.AssetOfInterest], error) ``` @@ -210,8 +210,8 @@ GetSiteAssetsOfInterest( | `duration` | `*string` | Query, Optional | duration like 7d, 2w | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -230,11 +230,11 @@ duration := "10m" -page := 1 - limit := 100 -apiResponse, err := sitesStatsAssets.GetSiteAssetsOfInterest(ctx, siteId, &duration, nil, nil, &page, &limit) +page := 1 + +apiResponse, err := sitesStatsAssets.GetSiteAssetsOfInterest(ctx, siteId, &duration, nil, nil, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -341,11 +341,11 @@ Get List of Site Assets Stats ListSiteAssetsStats( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsAsset], error) ``` @@ -355,11 +355,11 @@ ListSiteAssetsStats( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -372,17 +372,17 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesStatsAssets.ListSiteAssetsStats(ctx, siteId, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesStatsAssets.ListSiteAssetsStats(ctx, siteId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -445,11 +445,11 @@ Get List of Site Discovered BLE Assets that doesn’t match any of the Asset / A ListSiteDiscoveredAssets( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.Asset], error) ``` @@ -459,11 +459,11 @@ ListSiteDiscoveredAssets( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -476,17 +476,17 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesStatsAssets.ListSiteDiscoveredAssets(ctx, siteId, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesStatsAssets.ListSiteDiscoveredAssets(ctx, siteId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-stats-beacons.md b/doc/controllers/sites-stats-beacons.md index c0b43d57..5522f706 100644 --- a/doc/controllers/sites-stats-beacons.md +++ b/doc/controllers/sites-stats-beacons.md @@ -17,11 +17,11 @@ Get List of Site Beacons Stats ListSiteBeaconsStats( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsBeacon], error) ``` @@ -31,11 +31,11 @@ ListSiteBeaconsStats( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -48,17 +48,17 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesStatsBeacons.ListSiteBeaconsStats(ctx, siteId, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesStatsBeacons.ListSiteBeaconsStats(ctx, siteId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-stats-clients-wireless.md b/doc/controllers/sites-stats-clients-wireless.md index 471dff12..f0ebd23b 100644 --- a/doc/controllers/sites-stats-clients-wireless.md +++ b/doc/controllers/sites-stats-clients-wireless.md @@ -91,11 +91,11 @@ GetSiteWirelessClientsStatsByMap( ctx context.Context, siteId uuid.UUID, mapId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsWirelessClient], error) ``` @@ -106,11 +106,11 @@ GetSiteWirelessClientsStatsByMap( | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | | `mapId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -125,17 +125,17 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") mapId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesStatsClientsWireless.GetSiteWirelessClientsStatsByMap(ctx, siteId, mapId, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesStatsClientsWireless.GetSiteWirelessClientsStatsByMap(ctx, siteId, mapId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-stats-devices.md b/doc/controllers/sites-stats-devices.md index 6b0011b4..f2025188 100644 --- a/doc/controllers/sites-stats-devices.md +++ b/doc/controllers/sites-stats-devices.md @@ -315,8 +315,8 @@ ListSiteDevicesStats( siteId uuid.UUID, mType *models.DeviceTypeWithAllEnum, status *models.StatDeviceStatusFilterEnum, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.StatsDevice], error) ``` @@ -328,8 +328,8 @@ ListSiteDevicesStats( | `siteId` | `uuid.UUID` | Template, Required | - | | `mType` | [`*models.DeviceTypeWithAllEnum`](../../doc/models/device-type-with-all-enum.md) | Query, Optional | - | | `status` | [`*models.StatDeviceStatusFilterEnum`](../../doc/models/stat-device-status-filter-enum.md) | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -346,11 +346,11 @@ mType := models.DeviceTypeWithAllEnum("ap") status := models.StatDeviceStatusFilterEnum("all") -page := 1 - limit := 100 -apiResponse, err := sitesStatsDevices.ListSiteDevicesStats(ctx, siteId, &mType, &status, &page, &limit) +page := 1 + +apiResponse, err := sitesStatsDevices.ListSiteDevicesStats(ctx, siteId, &mType, &status, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-stats-discovered-switches.md b/doc/controllers/sites-stats-discovered-switches.md index b418aec0..9ca6ddbf 100644 --- a/doc/controllers/sites-stats-discovered-switches.md +++ b/doc/controllers/sites-stats-discovered-switches.md @@ -25,11 +25,11 @@ CountSiteDiscoveredSwitches( ctx context.Context, siteId uuid.UUID, distinct *models.SiteDiscoveredSwitchesCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -40,11 +40,11 @@ CountSiteDiscoveredSwitches( | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | | `distinct` | [`*models.SiteDiscoveredSwitchesCountDistinctEnum`](../../doc/models/site-discovered-switches-count-distinct-enum.md) | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -59,17 +59,17 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") distinct := models.SiteDiscoveredSwitchesCountDistinctEnum("system_name") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesStatsDiscoveredSwitches.CountSiteDiscoveredSwitches(ctx, siteId, &distinct, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesStatsDiscoveredSwitches.CountSiteDiscoveredSwitches(ctx, siteId, &distinct, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-stats-mx-edges.md b/doc/controllers/sites-stats-mx-edges.md index 90e2e031..851a6465 100644 --- a/doc/controllers/sites-stats-mx-edges.md +++ b/doc/controllers/sites-stats-mx-edges.md @@ -259,11 +259,11 @@ Get List of Site MxEdges Stats ListSiteMxEdgesStats( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsMxedge], error) ``` @@ -273,11 +273,11 @@ ListSiteMxEdgesStats( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -290,17 +290,17 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesStatsMxEdges.ListSiteMxEdgesStats(ctx, siteId, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesStatsMxEdges.ListSiteMxEdgesStats(ctx, siteId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-stats-ports.md b/doc/controllers/sites-stats-ports.md index 0f5c012c..bc5a7f90 100644 --- a/doc/controllers/sites-stats-ports.md +++ b/doc/controllers/sites-stats-ports.md @@ -50,11 +50,11 @@ CountSiteSwOrGwPorts( stpRole *models.CountPortsStpRoleEnum, authState *models.CountPortsAuthStateEnum, up *bool, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -90,11 +90,11 @@ CountSiteSwOrGwPorts( | `stpRole` | [`*models.CountPortsStpRoleEnum`](../../doc/models/count-ports-stp-role-enum.md) | Query, Optional | if `up`==`true` | | `authState` | [`*models.CountPortsAuthStateEnum`](../../doc/models/count-ports-auth-state-enum.md) | Query, Optional | if `up`==`true` && has Authenticator role | | `up` | `*bool` | Query, Optional | indicates if interface is up | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -159,17 +159,17 @@ distinct := models.SitePortsCountDistinctEnum("mac") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesStatsPorts.CountSiteSwOrGwPorts(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesStatsPorts.CountSiteSwOrGwPorts(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -242,11 +242,11 @@ CountSiteSwitchPorts( stpRole *models.CountPortsStpRoleEnum, authState *models.CountPortsAuthStateEnum, up *bool, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -282,11 +282,11 @@ CountSiteSwitchPorts( | `stpRole` | [`*models.CountPortsStpRoleEnum`](../../doc/models/count-ports-stp-role-enum.md) | Query, Optional | if `up`==`true` | | `authState` | [`*models.CountPortsAuthStateEnum`](../../doc/models/count-ports-auth-state-enum.md) | Query, Optional | if `up`==`true` | | `up` | `*bool` | Query, Optional | indicates if interface is up | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -351,17 +351,17 @@ distinct := models.SiteSwitchPortsCountDistinctEnum("mac") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesStatsPorts.CountSiteSwitchPorts(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesStatsPorts.CountSiteSwitchPorts(ctx, siteId, &distinct, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-wan-usages.md b/doc/controllers/sites-wan-usages.md index 77af13c2..83002f58 100644 --- a/doc/controllers/sites-wan-usages.md +++ b/doc/controllers/sites-wan-usages.md @@ -30,11 +30,11 @@ CountSiteWanUsage( tenant *string, pathType *string, distinct *models.WanUsagesCountDisctinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -52,11 +52,11 @@ CountSiteWanUsage( | `tenant` | `*string` | Query, Optional | tenant network in which the packet is sent | | `pathType` | `*string` | Query, Optional | path_type of the port | | `distinct` | [`*models.WanUsagesCountDisctinctEnum`](../../doc/models/wan-usages-count-disctinct-enum.md) | Query, Optional | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -85,17 +85,17 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") distinct := models.WanUsagesCountDisctinctEnum("policy") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesWANUsages.CountSiteWanUsage(ctx, siteId, nil, nil, nil, nil, nil, nil, nil, &distinct, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesWANUsages.CountSiteWanUsage(ctx, siteId, nil, nil, nil, nil, nil, nil, nil, &distinct, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -149,11 +149,11 @@ SearchSiteWanUsage( policy *string, tenant *string, pathType *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.SearchWanUsage], error) ``` @@ -170,11 +170,11 @@ SearchSiteWanUsage( | `policy` | `*string` | Query, Optional | policy for the wan path | | `tenant` | `*string` | Query, Optional | tenant network in which the packet is sent | | `pathType` | `*string` | Query, Optional | path_type of the port | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -201,17 +201,17 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesWANUsages.SearchSiteWanUsage(ctx, siteId, nil, nil, nil, nil, nil, nil, nil, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesWANUsages.SearchSiteWanUsage(ctx, siteId, nil, nil, nil, nil, nil, nil, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-webhooks.md b/doc/controllers/sites-webhooks.md index 253d44c4..0e201541 100644 --- a/doc/controllers/sites-webhooks.md +++ b/doc/controllers/sites-webhooks.md @@ -390,8 +390,8 @@ Get List of Site Webhooks ListSiteWebhooks( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Webhook], error) ``` @@ -401,8 +401,8 @@ ListSiteWebhooks( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -415,11 +415,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesWebhooks.ListSiteWebhooks(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesWebhooks.ListSiteWebhooks(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-wlans.md b/doc/controllers/sites-wlans.md index 61c957d1..46b705ab 100644 --- a/doc/controllers/sites-wlans.md +++ b/doc/controllers/sites-wlans.md @@ -104,7 +104,7 @@ body := models.Wlan{ "msg.snapchat.com", }, PortalImage: models.NewOptional(models.ToPointer("https://url/to/image.png")), - RoamMode: models.ToPointer(models.WlanRoamModeEnum("none")), + RoamMode: models.ToPointer(models.WlanRoamModeEnum("NONE")), SiteId: models.ToPointer(uuid.MustParse("441a1214-6928-442a-8e92-e1d34b8ec6a6")), SleExcluded: models.ToPointer(false), Ssid: "corporate", @@ -313,8 +313,8 @@ Get List of Site WLANs ListSiteWlans( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Wlan], error) ``` @@ -324,8 +324,8 @@ ListSiteWlans( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -338,11 +338,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesWlans.ListSiteWlans(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesWlans.ListSiteWlans(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -451,7 +451,7 @@ body := models.Wlan{ "msg.snapchat.com", }, PortalImage: models.NewOptional(models.ToPointer("https://url/to/image.png")), - RoamMode: models.ToPointer(models.WlanRoamModeEnum("none")), + RoamMode: models.ToPointer(models.WlanRoamModeEnum("NONE")), SiteId: models.ToPointer(uuid.MustParse("441a1214-6928-442a-8e92-e1d34b8ec6a6")), SleExcluded: models.ToPointer(false), Ssid: "corporate", diff --git a/doc/controllers/sites-wx-rules.md b/doc/controllers/sites-wx-rules.md index 524572b9..fb8624b5 100644 --- a/doc/controllers/sites-wx-rules.md +++ b/doc/controllers/sites-wx-rules.md @@ -366,8 +366,8 @@ Get List of Site WxLan Rules ListSiteWxRules( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanRule], error) ``` @@ -377,8 +377,8 @@ ListSiteWxRules( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -391,11 +391,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesWxRules.ListSiteWxRules(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesWxRules.ListSiteWxRules(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-wx-tags.md b/doc/controllers/sites-wx-tags.md index 3f10b945..570a7718 100644 --- a/doc/controllers/sites-wx-tags.md +++ b/doc/controllers/sites-wx-tags.md @@ -396,8 +396,8 @@ Get List of Site WxTags ListSiteWxTags( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanTag], error) ``` @@ -407,8 +407,8 @@ ListSiteWxTags( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -421,11 +421,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesWxTags.ListSiteWxTags(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesWxTags.ListSiteWxTags(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-wx-tunnels.md b/doc/controllers/sites-wx-tunnels.md index 45054a41..9bde6fa4 100644 --- a/doc/controllers/sites-wx-tunnels.md +++ b/doc/controllers/sites-wx-tunnels.md @@ -324,8 +324,8 @@ Get List of Site WxLan Tunnels ListSiteWxTunnels( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanTunnel], error) ``` @@ -335,8 +335,8 @@ ListSiteWxTunnels( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -349,11 +349,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesWxTunnels.ListSiteWxTunnels(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesWxTunnels.ListSiteWxTunnels(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sites-zones.md b/doc/controllers/sites-zones.md index c40a56f4..542f2a13 100644 --- a/doc/controllers/sites-zones.md +++ b/doc/controllers/sites-zones.md @@ -33,11 +33,11 @@ CountSiteZoneSessions( user *string, scopeId *string, scope *models.ZoneScopeEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) ``` @@ -53,11 +53,11 @@ CountSiteZoneSessions( | `user` | `*string` | Query, Optional | client MAC / Asset MAC / SDK UUID | | `scopeId` | `*string` | Query, Optional | if `scope`==`map`/`zone`/`rssizone`, the scope id | | `scope` | [`*models.ZoneScopeEnum`](../../doc/models/zone-scope-enum.md) | Query, Optional | scope | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -82,17 +82,17 @@ distinct := models.SiteZoneCountDistinctEnum("scope_id") scope := models.ZoneScopeEnum("site") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesZones.CountSiteZoneSessions(ctx, siteId, zoneType, &distinct, nil, nil, nil, &scope, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesZones.CountSiteZoneSessions(ctx, siteId, zoneType, &distinct, nil, nil, nil, &scope, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -347,8 +347,8 @@ Get List of Site Zones ListSiteZones( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Zone], error) ``` @@ -358,8 +358,8 @@ ListSiteZones( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -372,11 +372,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesZones.ListSiteZones(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesZones.ListSiteZones(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -432,11 +432,11 @@ SearchSiteZoneSessions( user *string, scopeId *string, scope *models.VisitsScopeEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseZoneSearch], error) ``` @@ -451,11 +451,11 @@ SearchSiteZoneSessions( | `user` | `*string` | Query, Optional | client MAC / Asset MAC / SDK UUID | | `scopeId` | `*string` | Query, Optional | if `scope`==`map`/`zone`/`rssizone`, the scope id | | `scope` | [`*models.VisitsScopeEnum`](../../doc/models/visits-scope-enum.md) | Query, Optional | scope | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -478,17 +478,17 @@ zoneType := models.ZoneTypeEnum("rssizones") scope := models.VisitsScopeEnum("site") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := sitesZones.SearchSiteZoneSessions(ctx, siteId, zoneType, nil, nil, nil, &scope, &page, &limit, nil, nil, &duration) +apiResponse, err := sitesZones.SearchSiteZoneSessions(ctx, siteId, zoneType, nil, nil, nil, &scope, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/sitesv-beacons.md b/doc/controllers/sitesv-beacons.md index c2e9faff..6b4919c9 100644 --- a/doc/controllers/sitesv-beacons.md +++ b/doc/controllers/sitesv-beacons.md @@ -245,8 +245,8 @@ Get List of Site Virtual Beacons ListSiteVBeacons( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Vbeacon], error) ``` @@ -256,8 +256,8 @@ ListSiteVBeacons( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | | `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -270,11 +270,11 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 - limit := 100 -apiResponse, err := sitesVBeacons.ListSiteVBeacons(ctx, siteId, &page, &limit) +page := 1 + +apiResponse, err := sitesVBeacons.ListSiteVBeacons(ctx, siteId, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/controllers/utilities-pca-ps.md b/doc/controllers/utilities-pca-ps.md index 6cb0368a..e677e13c 100644 --- a/doc/controllers/utilities-pca-ps.md +++ b/doc/controllers/utilities-pca-ps.md @@ -177,11 +177,11 @@ Get List of Org Packet Captures ListOrgPacketCaptures( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponsePcapSearch], error) ``` @@ -191,11 +191,11 @@ ListOrgPacketCaptures( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `orgId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -208,17 +208,17 @@ ctx := context.Background() orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 +duration := "10m" +limit := 100 -duration := "10m" +page := 1 -apiResponse, err := utilitiesPCAPs.ListOrgPacketCaptures(ctx, orgId, &page, &limit, nil, nil, &duration) +apiResponse, err := utilitiesPCAPs.ListOrgPacketCaptures(ctx, orgId, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { @@ -268,12 +268,12 @@ Get List of Site Packet Captures ListSitePacketCaptures( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, + clientMac *string, start *int, end *int, duration *string, - clientMac *string) ( + limit *int, + page *int) ( models.ApiResponse[models.ResponsePcapSearch], error) ``` @@ -283,12 +283,12 @@ ListSitePacketCaptures( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `siteId` | `uuid.UUID` | Template, Required | - | -| `page` | `*int` | Query, Optional | - | -| `limit` | `*int` | Query, Optional | - | +| `clientMac` | `*string` | Query, Optional | optional client mac filter | | `start` | `*int` | Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified | | `end` | `*int` | Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified | | `duration` | `*string` | Query, Optional | duration like 7d, 2w | -| `clientMac` | `*string` | Query, Optional | optional client mac filter | +| `limit` | `*int` | Query, Optional | - | +| `page` | `*int` | Query, Optional | - | ## Response Type @@ -301,9 +301,7 @@ ctx := context.Background() siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab") -page := 1 -limit := 100 @@ -311,9 +309,11 @@ limit := 100 duration := "10m" +limit := 100 +page := 1 -apiResponse, err := utilitiesPCAPs.ListSitePacketCaptures(ctx, siteId, &page, &limit, nil, nil, &duration, nil) +apiResponse, err := utilitiesPCAPs.ListSitePacketCaptures(ctx, siteId, nil, nil, nil, &duration, &limit, &page) if err != nil { log.Fatalln(err) } else { diff --git a/doc/models/wlan-roam-mode-enum.md b/doc/models/wlan-roam-mode-enum.md index fb3b8e99..64fdbd87 100644 --- a/doc/models/wlan-roam-mode-enum.md +++ b/doc/models/wlan-roam-mode-enum.md @@ -1,7 +1,7 @@ # Wlan Roam Mode Enum -enum: `11r`, `OKC`, `none` +enum: `11r`, `OKC`, `NONE` ## Enumeration @@ -13,11 +13,11 @@ enum: `11r`, `OKC`, `none` | --- | | `11r` | | `OKC` | -| `none` | +| `NONE` | ## Example ``` -none +NONE ``` diff --git a/doc/models/wlan.md b/doc/models/wlan.md index a3ea3a21..a1181dd7 100644 --- a/doc/models/wlan.md +++ b/doc/models/wlan.md @@ -93,7 +93,7 @@ WLAN | `Qos` | [`*models.WlanQos`](../../doc/models/wlan-qos.md) | Optional | - | | `Radsec` | [`*models.Radsec`](../../doc/models/radsec.md) | Optional | Radsec settings | | `Rateset` | [`map[string]models.WlanDatarates`](../../doc/models/wlan-datarates.md) | Optional | - | -| `RoamMode` | [`*models.WlanRoamModeEnum`](../../doc/models/wlan-roam-mode-enum.md) | Optional | enum: `11r`, `OKC`, `none`
**Default**: `"none"` | +| `RoamMode` | [`*models.WlanRoamModeEnum`](../../doc/models/wlan-roam-mode-enum.md) | Optional | enum: `11r`, `OKC`, `NONE` | | `Schedule` | [`*models.WlanSchedule`](../../doc/models/wlan-schedule.md) | Optional | WLAN operating schedule, default is disabled | | `SiteId` | `*uuid.UUID` | Optional | - | | `SleExcluded` | `*bool` | Optional | whether to exclude this WLAN from SLE metrics
**Default**: `false` | @@ -169,7 +169,7 @@ WLAN "msg.snapchat.com" ], "portal_image": "https://url/to/image.png", - "roam_mode": "none", + "roam_mode": "NONE", "site_id": "441a1214-6928-442a-8e92-e1d34b8ec6a6", "sle_excluded": false, "ssid": "corporate", diff --git a/mistapi/errors/errors.go b/mistapi/errors/errors.go index 5659d155..4a3d20bd 100644 --- a/mistapi/errors/errors.go +++ b/mistapi/errors/errors.go @@ -21,7 +21,7 @@ func NewErrorDeleteFailed(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ErrorDeleteFailed. -func (e *ErrorDeleteFailed) Error() string { +func (e ErrorDeleteFailed) Error() string { return fmt.Sprintf("ErrorDeleteFailed occured: %v", e.Message) } @@ -39,7 +39,7 @@ func NewResponseDetailString(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ResponseDetailString. -func (r *ResponseDetailString) Error() string { +func (r ResponseDetailString) Error() string { return fmt.Sprintf("ResponseDetailString occured: %v", r.Message) } @@ -57,7 +57,7 @@ func NewResponseHttp400(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ResponseHttp400. -func (r *ResponseHttp400) Error() string { +func (r ResponseHttp400) Error() string { return fmt.Sprintf("ResponseHttp400 occured: %v", r.Message) } @@ -75,7 +75,7 @@ func NewResponseHttp404(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ResponseHttp404. -func (r *ResponseHttp404) Error() string { +func (r ResponseHttp404) Error() string { return fmt.Sprintf("ResponseHttp404 occured: %v", r.Message) } @@ -94,7 +94,7 @@ func NewResponseLoginFailure(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ResponseLoginFailure. -func (r *ResponseLoginFailure) Error() string { +func (r ResponseLoginFailure) Error() string { return fmt.Sprintf("ResponseLoginFailure occured: %v", r.Message) } @@ -113,7 +113,7 @@ func NewResponseSelfOauthLinkFailure(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ResponseSelfOauthLinkFailure. -func (r *ResponseSelfOauthLinkFailure) Error() string { +func (r ResponseSelfOauthLinkFailure) Error() string { return fmt.Sprintf("ResponseSelfOauthLinkFailure occured: %v", r.Message) } @@ -131,7 +131,7 @@ func NewResponseHttp401Error(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ResponseHttp401Error. -func (r *ResponseHttp401Error) Error() string { +func (r ResponseHttp401Error) Error() string { return fmt.Sprintf("ResponseHttp401Error occured: %v", r.Message) } @@ -149,7 +149,7 @@ func NewResponseHttp403Error(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ResponseHttp403Error. -func (r *ResponseHttp403Error) Error() string { +func (r ResponseHttp403Error) Error() string { return fmt.Sprintf("ResponseHttp403Error occured: %v", r.Message) } @@ -167,6 +167,6 @@ func NewResponseHttp429Error(apiError https.ApiError) error { // Error implements the Error method for the error interface. // It returns a formatted error message for ResponseHttp429Error. -func (r *ResponseHttp429Error) Error() string { +func (r ResponseHttp429Error) Error() string { return fmt.Sprintf("ResponseHttp429Error occured: %v", r.Message) } diff --git a/mistapi/models/enums.go b/mistapi/models/enums.go index 18579814..61477e32 100644 --- a/mistapi/models/enums.go +++ b/mistapi/models/enums.go @@ -4319,13 +4319,13 @@ const ( ) // WlanRoamModeEnum is a string enum. -// enum: `11r`, `OKC`, `none` +// enum: `11r`, `OKC`, `NONE` type WlanRoamModeEnum string const ( WlanRoamModeEnum_ENUM11R WlanRoamModeEnum = "11r" WlanRoamModeEnum_OKC WlanRoamModeEnum = "OKC" - WlanRoamModeEnum_NONE WlanRoamModeEnum = "none" + WlanRoamModeEnum_NONE WlanRoamModeEnum = "NONE" ) // WxlanRuleActionEnum is a string enum. diff --git a/mistapi/models/wlan.go b/mistapi/models/wlan.go index bc17c80d..dc19f516 100644 --- a/mistapi/models/wlan.go +++ b/mistapi/models/wlan.go @@ -167,7 +167,7 @@ type Wlan struct { // Radsec settings Radsec *Radsec `json:"radsec,omitempty"` Rateset map[string]WlanDatarates `json:"rateset,omitempty"` - // enum: `11r`, `OKC`, `none` + // enum: `11r`, `OKC`, `NONE` RoamMode *WlanRoamModeEnum `json:"roam_mode,omitempty"` // WLAN operating schedule, default is disabled Schedule *WlanSchedule `json:"schedule,omitempty"` diff --git a/mistapi/ms_ps_logs.go b/mistapi/ms_ps_logs.go index cc77082a..fe8580aa 100644 --- a/mistapi/ms_ps_logs.go +++ b/mistapi/ms_ps_logs.go @@ -22,7 +22,7 @@ func NewMSPsLogs(baseController baseController) *MSPsLogs { return &mSPsLogs } -// ListMspAuditLogs takes context, mspId, siteId, adminName, message, sort, start, end, limit, page, duration as parameters and +// ListMspAuditLogs takes context, mspId, siteId, adminName, message, sort, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponseLogSearch data and // an error if there was an issue with the request or response. // Get list of change logs for the current MSP @@ -35,9 +35,9 @@ func (m *MSPsLogs) ListMspAuditLogs( sort *models.ListMspLogsSortEnum, start *int, end *int, + duration *string, limit *int, - page *int, - duration *string) ( + page *int) ( models.ApiResponse[models.ResponseLogSearch], error) { req := m.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/msps/%v/logs", mspId)) @@ -77,15 +77,15 @@ func (m *MSPsLogs) ListMspAuditLogs( if end != nil { req.QueryParam("end", *end) } + if duration != nil { + req.QueryParam("duration", *duration) + } if limit != nil { req.QueryParam("limit", *limit) } if page != nil { req.QueryParam("page", *page) } - if duration != nil { - req.QueryParam("duration", *duration) - } var result models.ResponseLogSearch decoder, resp, err := req.CallAsJson() diff --git a/mistapi/ms_ps_orgs.go b/mistapi/ms_ps_orgs.go index e3cb0188..fe4efe76 100644 --- a/mistapi/ms_ps_orgs.go +++ b/mistapi/ms_ps_orgs.go @@ -348,15 +348,15 @@ func (m *MSPsOrgs) UpdateMspOrg( return models.NewApiResponse(result, resp), err } -// ListMspOrgStats takes context, mspId, page, limit as parameters and +// ListMspOrgStats takes context, mspId, limit, page as parameters and // returns an models.ApiResponse with []models.StatsOrg data and // an error if there was an issue with the request or response. // Get List of MSP Orgs Stats func (m *MSPsOrgs) ListMspOrgStats( ctx context.Context, mspId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.StatsOrg], error) { req := m.prepareRequest( @@ -382,12 +382,12 @@ func (m *MSPsOrgs) ListMspOrgStats( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.StatsOrg decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_alarm_templates.go b/mistapi/orgs_alarm_templates.go index b47fcf55..b0cdbe88 100644 --- a/mistapi/orgs_alarm_templates.go +++ b/mistapi/orgs_alarm_templates.go @@ -23,15 +23,15 @@ func NewOrgsAlarmTemplates(baseController baseController) *OrgsAlarmTemplates { return &orgsAlarmTemplates } -// ListOrgAlarmTemplates takes context, orgId, page, limit as parameters and +// ListOrgAlarmTemplates takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.AlarmTemplate data and // an error if there was an issue with the request or response. // Get List of Org Alarm Templates func (o *OrgsAlarmTemplates) ListOrgAlarmTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.AlarmTemplate], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsAlarmTemplates) ListOrgAlarmTemplates( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.AlarmTemplate decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_alarms.go b/mistapi/orgs_alarms.go index 8a2426b5..e8e6e08e 100644 --- a/mistapi/orgs_alarms.go +++ b/mistapi/orgs_alarms.go @@ -114,7 +114,7 @@ func (o *OrgsAlarms) AckOrgAllAlarms( return context.Response, err } -// CountOrgAlarms takes context, orgId, distinct, page, limit, start, end, duration as parameters and +// CountOrgAlarms takes context, orgId, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Org Alarms @@ -122,11 +122,11 @@ func (o *OrgsAlarms) CountOrgAlarms( ctx context.Context, orgId uuid.UUID, distinct *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -155,12 +155,6 @@ func (o *OrgsAlarms) CountOrgAlarms( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -170,6 +164,12 @@ func (o *OrgsAlarms) CountOrgAlarms( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_antivirus_profiles.go b/mistapi/orgs_antivirus_profiles.go index 999a92ad..c9a54962 100644 --- a/mistapi/orgs_antivirus_profiles.go +++ b/mistapi/orgs_antivirus_profiles.go @@ -23,15 +23,15 @@ func NewOrgsAntivirusProfiles(baseController baseController) *OrgsAntivirusProfi return &orgsAntivirusProfiles } -// ListOrgAntivirusProfiles takes context, orgId, page, limit as parameters and +// ListOrgAntivirusProfiles takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Avprofile data and // an error if there was an issue with the request or response. // Get List of Antivirus Profiles func (o *OrgsAntivirusProfiles) ListOrgAntivirusProfiles( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Avprofile], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsAntivirusProfiles) ListOrgAntivirusProfiles( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Avprofile decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_ap_templates.go b/mistapi/orgs_ap_templates.go index bb829ddc..1115dc22 100644 --- a/mistapi/orgs_ap_templates.go +++ b/mistapi/orgs_ap_templates.go @@ -23,15 +23,15 @@ func NewOrgsAPTemplates(baseController baseController) *OrgsAPTemplates { return &orgsAPTemplates } -// ListOrgAptemplates takes context, orgId, page, limit as parameters and +// ListOrgAptemplates takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.ApTemplate data and // an error if there was an issue with the request or response. // Get List of Org AP Templates func (o *OrgsAPTemplates) ListOrgAptemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.ApTemplate], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsAPTemplates) ListOrgAptemplates( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.ApTemplate decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_asset_filters.go b/mistapi/orgs_asset_filters.go index c27da9a8..22bcb54b 100644 --- a/mistapi/orgs_asset_filters.go +++ b/mistapi/orgs_asset_filters.go @@ -23,7 +23,7 @@ func NewOrgsAssetFilters(baseController baseController) *OrgsAssetFilters { return &orgsAssetFilters } -// ListOrgAssetFilters takes context, orgId, page, limit as parameters and +// ListOrgAssetFilters takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.AssetFilter data and // an error if there was an issue with the request or response. // Get List of Org BLE asset filters. @@ -31,8 +31,8 @@ func NewOrgsAssetFilters(baseController baseController) *OrgsAssetFilters { func (o *OrgsAssetFilters) ListOrgAssetFilters( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.AssetFilter], error) { req := o.prepareRequest( @@ -58,12 +58,12 @@ func (o *OrgsAssetFilters) ListOrgAssetFilters( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.AssetFilter decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_assets.go b/mistapi/orgs_assets.go index 7774af1b..44797b33 100644 --- a/mistapi/orgs_assets.go +++ b/mistapi/orgs_assets.go @@ -23,15 +23,15 @@ func NewOrgsAssets(baseController baseController) *OrgsAssets { return &orgsAssets } -// ListOrgAssets takes context, orgId, page, limit as parameters and +// ListOrgAssets takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Asset data and // an error if there was an issue with the request or response. // Get List of Org Assets func (o *OrgsAssets) ListOrgAssets( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Asset], error) { req := o.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/assets", orgId)) @@ -53,12 +53,12 @@ func (o *OrgsAssets) ListOrgAssets( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Asset decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_clients_wired.go b/mistapi/orgs_clients_wired.go index 24c6867f..e5e05d6a 100644 --- a/mistapi/orgs_clients_wired.go +++ b/mistapi/orgs_clients_wired.go @@ -22,7 +22,7 @@ func NewOrgsClientsWired(baseController baseController) *OrgsClientsWired { return &orgsClientsWired } -// CountOrgWiredClients takes context, orgId, distinct, page, limit, start, end, duration as parameters and +// CountOrgWiredClients takes context, orgId, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count by Distinct Attributes of Clients @@ -31,11 +31,11 @@ func (o *OrgsClientsWired) CountOrgWiredClients( ctx context.Context, orgId uuid.UUID, distinct *models.OrgWiredClientsCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -64,12 +64,6 @@ func (o *OrgsClientsWired) CountOrgWiredClients( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -79,6 +73,12 @@ func (o *OrgsClientsWired) CountOrgWiredClients( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_clients_wireless.go b/mistapi/orgs_clients_wireless.go index b483c56c..226949ba 100644 --- a/mistapi/orgs_clients_wireless.go +++ b/mistapi/orgs_clients_wireless.go @@ -22,7 +22,7 @@ func NewOrgsClientsWireless(baseController baseController) *OrgsClientsWireless return &orgsClientsWireless } -// CountOrgWirelessClients takes context, orgId, distinct, mac, hostname, device, os, model, ap, vlan, ssid, ipAddress, page, limit, start, end, duration as parameters and +// CountOrgWirelessClients takes context, orgId, distinct, mac, hostname, device, os, model, ap, vlan, ssid, ipAddress, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Org Wireless Clients @@ -39,11 +39,11 @@ func (o *OrgsClientsWireless) CountOrgWirelessClients( vlan *string, ssid *string, ipAddress *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -99,12 +99,6 @@ func (o *OrgsClientsWireless) CountOrgWirelessClients( if ipAddress != nil { req.QueryParam("ip_address", *ipAddress) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -114,6 +108,12 @@ func (o *OrgsClientsWireless) CountOrgWirelessClients( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -327,7 +327,7 @@ func (o *OrgsClientsWireless) SearchOrgWirelessClients( return models.NewApiResponse(result, resp), err } -// CountOrgWirelessClientsSessions takes context, orgId, distinct, ap, band, clientFamily, clientManufacture, clientModel, clientOs, ssid, wlanId, page, limit, start, end, duration as parameters and +// CountOrgWirelessClientsSessions takes context, orgId, distinct, ap, band, clientFamily, clientManufacture, clientModel, clientOs, ssid, wlanId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Org Wireless Clients Sessions @@ -343,11 +343,11 @@ func (o *OrgsClientsWireless) CountOrgWirelessClientsSessions( clientOs *string, ssid *string, wlanId *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -400,12 +400,6 @@ func (o *OrgsClientsWireless) CountOrgWirelessClientsSessions( if wlanId != nil { req.QueryParam("wlan_id", *wlanId) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -415,6 +409,12 @@ func (o *OrgsClientsWireless) CountOrgWirelessClientsSessions( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_devices.go b/mistapi/orgs_devices.go index 1b435f9a..977b15b3 100644 --- a/mistapi/orgs_devices.go +++ b/mistapi/orgs_devices.go @@ -65,7 +65,7 @@ func (o *OrgsDevices) ListOrgDevices( return models.NewApiResponse(result, resp), err } -// CountOrgDevices takes context, orgId, distinct, hostname, siteId, model, managed, mac, version, ipAddress, mxtunnelStatus, mxedgeId, lldpSystemName, lldpSystemDesc, lldpPortId, lldpMgmtAddr, page, limit, start, end, duration as parameters and +// CountOrgDevices takes context, orgId, distinct, hostname, siteId, model, managed, mac, version, ipAddress, mxtunnelStatus, mxedgeId, lldpSystemName, lldpSystemDesc, lldpPortId, lldpMgmtAddr, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Org Devices @@ -86,11 +86,11 @@ func (o *OrgsDevices) CountOrgDevices( lldpSystemDesc *string, lldpPortId *string, lldpMgmtAddr *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -158,12 +158,6 @@ func (o *OrgsDevices) CountOrgDevices( if lldpMgmtAddr != nil { req.QueryParam("lldp_mgmt_addr", *lldpMgmtAddr) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -173,6 +167,12 @@ func (o *OrgsDevices) CountOrgDevices( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -500,7 +500,7 @@ func (o *OrgsDevices) SearchOrgDeviceLastConfigs( return models.NewApiResponse(result, resp), err } -// ListOrgApsMacs takes context, orgId, page, limit as parameters and +// ListOrgApsMacs takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.ApRadioMac data and // an error if there was an issue with the request or response. // For some scenarios like E911 or security systems, the BSSIDs are required to identify which AP the client is connecting to. Then the location of the AP can be used as the approximate location of the client. @@ -508,8 +508,8 @@ func (o *OrgsDevices) SearchOrgDeviceLastConfigs( func (o *OrgsDevices) ListOrgApsMacs( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.ApRadioMac], error) { req := o.prepareRequest( @@ -535,12 +535,12 @@ func (o *OrgsDevices) ListOrgApsMacs( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.ApRadioMac decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_devices_others.go b/mistapi/orgs_devices_others.go index de4e3d26..7416e9d7 100644 --- a/mistapi/orgs_devices_others.go +++ b/mistapi/orgs_devices_others.go @@ -23,7 +23,7 @@ func NewOrgsDevicesOthers(baseController baseController) *OrgsDevicesOthers { return &orgsDevicesOthers } -// ListOrgOtherDevices takes context, orgId, vendor, mac, serial, model, name, page, limit as parameters and +// ListOrgOtherDevices takes context, orgId, vendor, mac, serial, model, name, limit, page as parameters and // returns an models.ApiResponse with []models.DeviceOther data and // an error if there was an issue with the request or response. // Get List of Org other devices (3rd party devices) @@ -35,8 +35,8 @@ func (o *OrgsDevicesOthers) ListOrgOtherDevices( serial *string, model *string, name *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.DeviceOther], error) { req := o.prepareRequest( @@ -77,12 +77,12 @@ func (o *OrgsDevicesOthers) ListOrgOtherDevices( if name != nil { req.QueryParam("name", *name) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.DeviceOther decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_evpn_topologies.go b/mistapi/orgs_evpn_topologies.go index 087d84b3..3511269b 100644 --- a/mistapi/orgs_evpn_topologies.go +++ b/mistapi/orgs_evpn_topologies.go @@ -23,15 +23,15 @@ func NewOrgsEVPNTopologies(baseController baseController) *OrgsEVPNTopologies { return &orgsEVPNTopologies } -// ListOrgEvpnTopologies takes context, orgId, page, limit as parameters and +// ListOrgEvpnTopologies takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.EvpnTopology data and // an error if there was an issue with the request or response. // Get List of the existing Org EVPN topologies func (o *OrgsEVPNTopologies) ListOrgEvpnTopologies( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.EvpnTopology], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsEVPNTopologies) ListOrgEvpnTopologies( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.EvpnTopology decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_gateway_templates.go b/mistapi/orgs_gateway_templates.go index 23e2c13e..0e10505d 100644 --- a/mistapi/orgs_gateway_templates.go +++ b/mistapi/orgs_gateway_templates.go @@ -23,15 +23,15 @@ func NewOrgsGatewayTemplates(baseController baseController) *OrgsGatewayTemplate return &orgsGatewayTemplates } -// ListOrgGatewayTemplates takes context, orgId, page, limit as parameters and +// ListOrgGatewayTemplates takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.GatewayTemplate data and // an error if there was an issue with the request or response. // Get List of Org Gateway Templates func (o *OrgsGatewayTemplates) ListOrgGatewayTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.GatewayTemplate], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsGatewayTemplates) ListOrgGatewayTemplates( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.GatewayTemplate decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_guests.go b/mistapi/orgs_guests.go index 1c9a207a..8bc78f47 100644 --- a/mistapi/orgs_guests.go +++ b/mistapi/orgs_guests.go @@ -62,7 +62,7 @@ func (o *OrgsGuests) ListOrgGuestAuthorizations( return models.NewApiResponse(result, resp), err } -// CountOrgGuestAuthorizations takes context, orgId, distinct, page, limit, start, end, duration as parameters and +// CountOrgGuestAuthorizations takes context, orgId, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Org Authorized Guest @@ -70,11 +70,11 @@ func (o *OrgsGuests) CountOrgGuestAuthorizations( ctx context.Context, orgId uuid.UUID, distinct *models.OrgGuestsCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -103,12 +103,6 @@ func (o *OrgsGuests) CountOrgGuestAuthorizations( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -118,6 +112,12 @@ func (o *OrgsGuests) CountOrgGuestAuthorizations( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_idp_profiles.go b/mistapi/orgs_idp_profiles.go index 43e99ec0..eb66f50d 100644 --- a/mistapi/orgs_idp_profiles.go +++ b/mistapi/orgs_idp_profiles.go @@ -23,15 +23,15 @@ func NewOrgsIDPProfiles(baseController baseController) *OrgsIDPProfiles { return &orgsIDPProfiles } -// ListOrgIdpProfiles takes context, orgId, page, limit as parameters and +// ListOrgIdpProfiles takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.IdpProfile data and // an error if there was an issue with the request or response. // get the list of Org IDP Profiles func (o *OrgsIDPProfiles) ListOrgIdpProfiles( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.IdpProfile], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsIDPProfiles) ListOrgIdpProfiles( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.IdpProfile decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_logs.go b/mistapi/orgs_logs.go index ba2f7803..2529f9a7 100644 --- a/mistapi/orgs_logs.go +++ b/mistapi/orgs_logs.go @@ -22,7 +22,7 @@ func NewOrgsLogs(baseController baseController) *OrgsLogs { return &orgsLogs } -// ListOrgAuditLogs takes context, orgId, siteId, adminName, message, sort, start, end, limit, page, duration as parameters and +// ListOrgAuditLogs takes context, orgId, siteId, adminName, message, sort, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponseLogSearch data and // an error if there was an issue with the request or response. // Get List of change logs for the current Org @@ -35,9 +35,9 @@ func (o *OrgsLogs) ListOrgAuditLogs( sort *models.ListOrgLogsSortEnum, start *int, end *int, + duration *string, limit *int, - page *int, - duration *string) ( + page *int) ( models.ApiResponse[models.ResponseLogSearch], error) { req := o.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/logs", orgId)) @@ -77,15 +77,15 @@ func (o *OrgsLogs) ListOrgAuditLogs( if end != nil { req.QueryParam("end", *end) } + if duration != nil { + req.QueryParam("duration", *duration) + } if limit != nil { req.QueryParam("limit", *limit) } if page != nil { req.QueryParam("page", *page) } - if duration != nil { - req.QueryParam("duration", *duration) - } var result models.ResponseLogSearch decoder, resp, err := req.CallAsJson() @@ -97,7 +97,7 @@ func (o *OrgsLogs) ListOrgAuditLogs( return models.NewApiResponse(result, resp), err } -// CountOrgAuditLogs takes context, orgId, distinct, adminId, adminName, siteId, message, page, limit, start, end, duration as parameters and +// CountOrgAuditLogs takes context, orgId, distinct, adminId, adminName, siteId, message, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count by Distinct Attributes of Audit Logs @@ -109,11 +109,11 @@ func (o *OrgsLogs) CountOrgAuditLogs( adminName *string, siteId *string, message *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -154,12 +154,6 @@ func (o *OrgsLogs) CountOrgAuditLogs( if message != nil { req.QueryParam("message", *message) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -169,6 +163,12 @@ func (o *OrgsLogs) CountOrgAuditLogs( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_mx_clusters.go b/mistapi/orgs_mx_clusters.go index 414b3477..806e4c6f 100644 --- a/mistapi/orgs_mx_clusters.go +++ b/mistapi/orgs_mx_clusters.go @@ -23,15 +23,15 @@ func NewOrgsMxClusters(baseController baseController) *OrgsMxClusters { return &orgsMxClusters } -// ListOrgMxEdgeClusters takes context, orgId, page, limit as parameters and +// ListOrgMxEdgeClusters takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Mxcluster data and // an error if there was an issue with the request or response. // Get List of Org MxEdge Clusters func (o *OrgsMxClusters) ListOrgMxEdgeClusters( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Mxcluster], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsMxClusters) ListOrgMxEdgeClusters( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Mxcluster decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_mx_tunnels.go b/mistapi/orgs_mx_tunnels.go index adb5983b..fa3e513e 100644 --- a/mistapi/orgs_mx_tunnels.go +++ b/mistapi/orgs_mx_tunnels.go @@ -23,15 +23,15 @@ func NewOrgsMxTunnels(baseController baseController) *OrgsMxTunnels { return &orgsMxTunnels } -// ListOrgMxTunnels takes context, orgId, page, limit as parameters and +// ListOrgMxTunnels takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Mxtunnel data and // an error if there was an issue with the request or response. // Get List of Org MxTunnels func (o *OrgsMxTunnels) ListOrgMxTunnels( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Mxtunnel], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsMxTunnels) ListOrgMxTunnels( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Mxtunnel decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_nac_portals.go b/mistapi/orgs_nac_portals.go index e7fe79ac..882b8de9 100644 --- a/mistapi/orgs_nac_portals.go +++ b/mistapi/orgs_nac_portals.go @@ -23,15 +23,15 @@ func NewOrgsNACPortals(baseController baseController) *OrgsNACPortals { return &orgsNACPortals } -// ListOrgNacPortals takes context, orgId, page, limit as parameters and +// ListOrgNacPortals takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.NacPortal data and // an error if there was an issue with the request or response. // List Org NAC Portals func (o *OrgsNACPortals) ListOrgNacPortals( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.NacPortal], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsNACPortals) ListOrgNacPortals( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.NacPortal decoder, resp, err := req.CallAsJson() @@ -256,7 +256,7 @@ func (o *OrgsNACPortals) UpdateOrgNacPortal( return models.NewApiResponse(result, resp), err } -// ListOrgNacPortalSsoLatestFailures takes context, orgId, nacportalId, page, limit, start, end, duration as parameters and +// ListOrgNacPortalSsoLatestFailures takes context, orgId, nacportalId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponseSsoFailureSearch data and // an error if there was an issue with the request or response. // Get List of Org NAC Portal SSO Latest Failures @@ -264,11 +264,11 @@ func (o *OrgsNACPortals) ListOrgNacPortalSsoLatestFailures( ctx context.Context, orgId uuid.UUID, nacportalId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseSsoFailureSearch], error) { req := o.prepareRequest( @@ -294,12 +294,6 @@ func (o *OrgsNACPortals) ListOrgNacPortalSsoLatestFailures( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -309,6 +303,12 @@ func (o *OrgsNACPortals) ListOrgNacPortalSsoLatestFailures( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponseSsoFailureSearch decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_nac_rules.go b/mistapi/orgs_nac_rules.go index f6c111fe..dede1262 100644 --- a/mistapi/orgs_nac_rules.go +++ b/mistapi/orgs_nac_rules.go @@ -23,15 +23,15 @@ func NewOrgsNACRules(baseController baseController) *OrgsNACRules { return &orgsNACRules } -// ListOrgNacRules takes context, orgId, page, limit as parameters and +// ListOrgNacRules takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.NacRule data and // an error if there was an issue with the request or response. // Get List of Org NAC Rules func (o *OrgsNACRules) ListOrgNacRules( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.NacRule], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsNACRules) ListOrgNacRules( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.NacRule decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_nac_tags.go b/mistapi/orgs_nac_tags.go index f83e59c9..274a015c 100644 --- a/mistapi/orgs_nac_tags.go +++ b/mistapi/orgs_nac_tags.go @@ -23,7 +23,7 @@ func NewOrgsNACTags(baseController baseController) *OrgsNACTags { return &orgsNACTags } -// ListOrgNacTags takes context, orgId, mType, name, match, page, limit as parameters and +// ListOrgNacTags takes context, orgId, mType, name, match, limit, page as parameters and // returns an models.ApiResponse with []models.NacTag data and // an error if there was an issue with the request or response. // Get List of Org NAC Tags @@ -33,8 +33,8 @@ func (o *OrgsNACTags) ListOrgNacTags( mType *string, name *string, match *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.NacTag], error) { req := o.prepareRequest( @@ -69,12 +69,12 @@ func (o *OrgsNACTags) ListOrgNacTags( if match != nil { req.QueryParam("match", *match) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.NacTag decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_network_templates.go b/mistapi/orgs_network_templates.go index 789cec71..0a2f1d7e 100644 --- a/mistapi/orgs_network_templates.go +++ b/mistapi/orgs_network_templates.go @@ -23,15 +23,15 @@ func NewOrgsNetworkTemplates(baseController baseController) *OrgsNetworkTemplate return &orgsNetworkTemplates } -// ListOrgNetworkTemplates takes context, orgId, page, limit as parameters and +// ListOrgNetworkTemplates takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.NetworkTemplate data and // an error if there was an issue with the request or response. // Get List of Org Network Templates func (o *OrgsNetworkTemplates) ListOrgNetworkTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.NetworkTemplate], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsNetworkTemplates) ListOrgNetworkTemplates( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.NetworkTemplate decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_networks.go b/mistapi/orgs_networks.go index 2c3254b1..222f9d49 100644 --- a/mistapi/orgs_networks.go +++ b/mistapi/orgs_networks.go @@ -23,15 +23,15 @@ func NewOrgsNetworks(baseController baseController) *OrgsNetworks { return &orgsNetworks } -// ListOrgNetworks takes context, orgId, page, limit as parameters and +// ListOrgNetworks takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Network data and // an error if there was an issue with the request or response. // Get List of Org Networks func (o *OrgsNetworks) ListOrgNetworks( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Network], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsNetworks) ListOrgNetworks( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Network decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_premium_analytics.go b/mistapi/orgs_premium_analytics.go index 8e9323ce..7028daf5 100644 --- a/mistapi/orgs_premium_analytics.go +++ b/mistapi/orgs_premium_analytics.go @@ -22,15 +22,15 @@ func NewOrgsPremiumAnalytics(baseController baseController) *OrgsPremiumAnalytic return &orgsPremiumAnalytics } -// ListOrgPmaDashboards takes context, orgId, page, limit as parameters and +// ListOrgPmaDashboards takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.PmaDashboard data and // an error if there was an issue with the request or response. // Get List of premium analytics dashboards for this Org func (o *OrgsPremiumAnalytics) ListOrgPmaDashboards( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.PmaDashboard], error) { req := o.prepareRequest( @@ -56,12 +56,12 @@ func (o *OrgsPremiumAnalytics) ListOrgPmaDashboards( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.PmaDashboard decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_psk_portals.go b/mistapi/orgs_psk_portals.go index a394723d..559ad3eb 100644 --- a/mistapi/orgs_psk_portals.go +++ b/mistapi/orgs_psk_portals.go @@ -23,15 +23,15 @@ func NewOrgsPskPortals(baseController baseController) *OrgsPskPortals { return &orgsPskPortals } -// ListOrgPskPortals takes context, orgId, page, limit as parameters and +// ListOrgPskPortals takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.PskPortal data and // an error if there was an issue with the request or response. // Get List of Org Psk Portals func (o *OrgsPskPortals) ListOrgPskPortals( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.PskPortal], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsPskPortals) ListOrgPskPortals( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.PskPortal decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_psks.go b/mistapi/orgs_psks.go index 27ebad3e..357c5b24 100644 --- a/mistapi/orgs_psks.go +++ b/mistapi/orgs_psks.go @@ -23,7 +23,7 @@ func NewOrgsPsks(baseController baseController) *OrgsPsks { return &orgsPsks } -// ListOrgPsks takes context, orgId, name, ssid, role, page, limit as parameters and +// ListOrgPsks takes context, orgId, name, ssid, role, limit, page as parameters and // returns an models.ApiResponse with []models.Psk data and // an error if there was an issue with the request or response. // Get List of Org Psks @@ -33,8 +33,8 @@ func (o *OrgsPsks) ListOrgPsks( name *string, ssid *string, role *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Psk], error) { req := o.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/psks", orgId)) @@ -65,12 +65,12 @@ func (o *OrgsPsks) ListOrgPsks( if role != nil { req.QueryParam("role", *role) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Psk decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_rf_templates.go b/mistapi/orgs_rf_templates.go index 144ee866..fb2bf1f0 100644 --- a/mistapi/orgs_rf_templates.go +++ b/mistapi/orgs_rf_templates.go @@ -23,15 +23,15 @@ func NewOrgsRFTemplates(baseController baseController) *OrgsRFTemplates { return &orgsRFTemplates } -// ListOrgRfTemplates takes context, orgId, page, limit as parameters and +// ListOrgRfTemplates takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.RfTemplate data and // an error if there was an issue with the request or response. // Get List of Org RF Template func (o *OrgsRFTemplates) ListOrgRfTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.RfTemplate], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsRFTemplates) ListOrgRfTemplates( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.RfTemplate decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_sec_policies.go b/mistapi/orgs_sec_policies.go index e83656a4..f42fcc15 100644 --- a/mistapi/orgs_sec_policies.go +++ b/mistapi/orgs_sec_policies.go @@ -23,15 +23,15 @@ func NewOrgsSecPolicies(baseController baseController) *OrgsSecPolicies { return &orgsSecPolicies } -// ListOrgSecPolicies takes context, orgId, page, limit as parameters and +// ListOrgSecPolicies takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Secpolicy data and // an error if there was an issue with the request or response. // Get List of Org Security Policies func (o *OrgsSecPolicies) ListOrgSecPolicies( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Secpolicy], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsSecPolicies) ListOrgSecPolicies( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Secpolicy decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_service_policies.go b/mistapi/orgs_service_policies.go index c3f0b768..f8f09718 100644 --- a/mistapi/orgs_service_policies.go +++ b/mistapi/orgs_service_policies.go @@ -23,15 +23,15 @@ func NewOrgsServicePolicies(baseController baseController) *OrgsServicePolicies return &orgsServicePolicies } -// ListOrgServicePolicies takes context, orgId, page, limit as parameters and +// ListOrgServicePolicies takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.OrgServicePolicy data and // an error if there was an issue with the request or response. // Get List of Org Service Policies func (o *OrgsServicePolicies) ListOrgServicePolicies( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.OrgServicePolicy], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsServicePolicies) ListOrgServicePolicies( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.OrgServicePolicy decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_services.go b/mistapi/orgs_services.go index b57d40fe..0eb453a2 100644 --- a/mistapi/orgs_services.go +++ b/mistapi/orgs_services.go @@ -23,15 +23,15 @@ func NewOrgsServices(baseController baseController) *OrgsServices { return &orgsServices } -// ListOrgServices takes context, orgId, page, limit as parameters and +// ListOrgServices takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Service data and // an error if there was an issue with the request or response. // Get List of Org Services func (o *OrgsServices) ListOrgServices( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Service], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsServices) ListOrgServices( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Service decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_site_templates.go b/mistapi/orgs_site_templates.go index 3f6eda39..017910a9 100644 --- a/mistapi/orgs_site_templates.go +++ b/mistapi/orgs_site_templates.go @@ -23,15 +23,15 @@ func NewOrgsSiteTemplates(baseController baseController) *OrgsSiteTemplates { return &orgsSiteTemplates } -// ListOrgSiteTemplates takes context, orgId, page, limit as parameters and +// ListOrgSiteTemplates takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.SiteTemplate data and // an error if there was an issue with the request or response. // Get List of Org Site Templates func (o *OrgsSiteTemplates) ListOrgSiteTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.SiteTemplate], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsSiteTemplates) ListOrgSiteTemplates( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.SiteTemplate decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_sitegroups.go b/mistapi/orgs_sitegroups.go index 5f3a2e6d..2b635ac0 100644 --- a/mistapi/orgs_sitegroups.go +++ b/mistapi/orgs_sitegroups.go @@ -23,15 +23,15 @@ func NewOrgsSitegroups(baseController baseController) *OrgsSitegroups { return &orgsSitegroups } -// ListOrgSiteGroups takes context, orgId, page, limit as parameters and +// ListOrgSiteGroups takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Sitegroup data and // an error if there was an issue with the request or response. // Get List of Org Site Groups func (o *OrgsSitegroups) ListOrgSiteGroups( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Sitegroup], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsSitegroups) ListOrgSiteGroups( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Sitegroup decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_sites.go b/mistapi/orgs_sites.go index 6dd85657..60f7181c 100644 --- a/mistapi/orgs_sites.go +++ b/mistapi/orgs_sites.go @@ -113,7 +113,7 @@ func (o *OrgsSites) CreateOrgSite( return models.NewApiResponse(result, resp), err } -// CountOrgSites takes context, orgId, distinct, page, limit, start, end, duration as parameters and +// CountOrgSites takes context, orgId, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Sites @@ -121,11 +121,11 @@ func (o *OrgsSites) CountOrgSites( ctx context.Context, orgId uuid.UUID, distinct *models.OrgSitesCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -154,12 +154,6 @@ func (o *OrgsSites) CountOrgSites( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -169,6 +163,12 @@ func (o *OrgsSites) CountOrgSites( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_sl_es.go b/mistapi/orgs_sl_es.go index 61dc0276..2d42c205 100644 --- a/mistapi/orgs_sl_es.go +++ b/mistapi/orgs_sl_es.go @@ -22,7 +22,7 @@ func NewOrgsSLEs(baseController baseController) *OrgsSLEs { return &orgsSLEs } -// GetOrgSitesSle takes context, orgId, sle, start, end, limit, page, duration, interval as parameters and +// GetOrgSitesSle takes context, orgId, sle, start, end, duration, interval, limit, page as parameters and // returns an models.ApiResponse with models.ResponseOrgSiteSle data and // an error if there was an issue with the request or response. // Get Org Sites SLE @@ -32,10 +32,10 @@ func (o *OrgsSLEs) GetOrgSitesSle( sle *models.OrgSiteSleTypeEnum, start *int, end *int, - limit *int, - page *int, duration *string, - interval *string) ( + interval *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseOrgSiteSle], error) { req := o.prepareRequest( @@ -70,18 +70,18 @@ func (o *OrgsSLEs) GetOrgSitesSle( if end != nil { req.QueryParam("end", *end) } - if limit != nil { - req.QueryParam("limit", *limit) - } - if page != nil { - req.QueryParam("page", *page) - } if duration != nil { req.QueryParam("duration", *duration) } if interval != nil { req.QueryParam("interval", *interval) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponseOrgSiteSle decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_sso.go b/mistapi/orgs_sso.go index 4532af50..397e025a 100644 --- a/mistapi/orgs_sso.go +++ b/mistapi/orgs_sso.go @@ -23,15 +23,15 @@ func NewOrgsSSO(baseController baseController) *OrgsSSO { return &orgsSSO } -// ListOrgSsos takes context, orgId, page, limit as parameters and +// ListOrgSsos takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Sso data and // an error if there was an issue with the request or response. // Get List of Org SSO Configuration func (o *OrgsSSO) ListOrgSsos( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Sso], error) { req := o.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/ssos", orgId)) @@ -53,12 +53,12 @@ func (o *OrgsSSO) ListOrgSsos( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Sso decoder, resp, err := req.CallAsJson() @@ -248,7 +248,7 @@ func (o *OrgsSSO) UpdateOrgSso( return models.NewApiResponse(result, resp), err } -// ListOrgSsoLatestFailures takes context, orgId, ssoId, page, limit, start, end, duration as parameters and +// ListOrgSsoLatestFailures takes context, orgId, ssoId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponseSsoFailureSearch data and // an error if there was an issue with the request or response. // Get List of Org SSO Latest Failures @@ -256,11 +256,11 @@ func (o *OrgsSSO) ListOrgSsoLatestFailures( ctx context.Context, orgId uuid.UUID, ssoId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseSsoFailureSearch], error) { req := o.prepareRequest( @@ -286,12 +286,6 @@ func (o *OrgsSSO) ListOrgSsoLatestFailures( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -301,6 +295,12 @@ func (o *OrgsSSO) ListOrgSsoLatestFailures( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponseSsoFailureSearch decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_sso_roles.go b/mistapi/orgs_sso_roles.go index 1fa91b7e..ec69c078 100644 --- a/mistapi/orgs_sso_roles.go +++ b/mistapi/orgs_sso_roles.go @@ -23,15 +23,15 @@ func NewOrgsSSORoles(baseController baseController) *OrgsSSORoles { return &orgsSSORoles } -// ListOrgSsoRoles takes context, orgId, page, limit as parameters and +// ListOrgSsoRoles takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.SsoRoleMsp data and // an error if there was an issue with the request or response. // Get List of Org SSO Roles func (o *OrgsSSORoles) ListOrgSsoRoles( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.SsoRoleMsp], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsSSORoles) ListOrgSsoRoles( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.SsoRoleMsp decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_stats.go b/mistapi/orgs_stats.go index 2d61dfd8..eaff6e69 100644 --- a/mistapi/orgs_stats.go +++ b/mistapi/orgs_stats.go @@ -22,18 +22,18 @@ func NewOrgsStats(baseController baseController) *OrgsStats { return &orgsStats } -// GetOrgStats takes context, orgId, page, limit, start, end, duration as parameters and +// GetOrgStats takes context, orgId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.StatsOrg data and // an error if there was an issue with the request or response. // Get Org Stats func (o *OrgsStats) GetOrgStats( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.StatsOrg], error) { req := o.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/stats", orgId)) @@ -55,12 +55,6 @@ func (o *OrgsStats) GetOrgStats( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -70,6 +64,12 @@ func (o *OrgsStats) GetOrgStats( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.StatsOrg decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_stats_assets.go b/mistapi/orgs_stats_assets.go index caa3cd5a..d9e372db 100644 --- a/mistapi/orgs_stats_assets.go +++ b/mistapi/orgs_stats_assets.go @@ -22,18 +22,18 @@ func NewOrgsStatsAssets(baseController baseController) *OrgsStatsAssets { return &orgsStatsAssets } -// ListOrgAssetsStats takes context, orgId, page, limit, start, end, duration as parameters and +// ListOrgAssetsStats takes context, orgId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with []models.StatsAsset data and // an error if there was an issue with the request or response. // Get List of Org Assets Stats func (o *OrgsStatsAssets) ListOrgAssetsStats( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsAsset], error) { req := o.prepareRequest( @@ -59,12 +59,6 @@ func (o *OrgsStatsAssets) ListOrgAssetsStats( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -74,6 +68,12 @@ func (o *OrgsStatsAssets) ListOrgAssetsStats( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result []models.StatsAsset decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_stats_devices.go b/mistapi/orgs_stats_devices.go index 5b902255..142214b7 100644 --- a/mistapi/orgs_stats_devices.go +++ b/mistapi/orgs_stats_devices.go @@ -22,7 +22,7 @@ func NewOrgsStatsDevices(baseController baseController) *OrgsStatsDevices { return &orgsStatsDevices } -// ListOrgDevicesStats takes context, orgId, mType, status, siteId, mac, evpntopoId, evpnUnused, fields, page, limit, start, end, duration as parameters and +// ListOrgDevicesStats takes context, orgId, mType, status, siteId, mac, evpntopoId, evpnUnused, fields, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with []models.StatsDevice data and // an error if there was an issue with the request or response. // Get List of Org Devices stats @@ -37,11 +37,11 @@ func (o *OrgsStatsDevices) ListOrgDevicesStats( evpntopoId *string, evpnUnused *string, fields *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsDevice], error) { req := o.prepareRequest( @@ -88,12 +88,6 @@ func (o *OrgsStatsDevices) ListOrgDevicesStats( if fields != nil { req.QueryParam("fields", *fields) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -103,6 +97,12 @@ func (o *OrgsStatsDevices) ListOrgDevicesStats( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result []models.StatsDevice decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_stats_mx_edges.go b/mistapi/orgs_stats_mx_edges.go index ff3e22bc..4e0e501b 100644 --- a/mistapi/orgs_stats_mx_edges.go +++ b/mistapi/orgs_stats_mx_edges.go @@ -22,19 +22,19 @@ func NewOrgsStatsMxEdges(baseController baseController) *OrgsStatsMxEdges { return &orgsStatsMxEdges } -// ListOrgMxEdgesStats takes context, orgId, page, limit, start, end, duration, forSite as parameters and +// ListOrgMxEdgesStats takes context, orgId, forSite, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with []models.StatsMxedge data and // an error if there was an issue with the request or response. // Get List of Org MxEdge Stats func (o *OrgsStatsMxEdges) ListOrgMxEdgesStats( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int, + forSite *bool, start *int, end *int, duration *string, - forSite *bool) ( + limit *int, + page *int) ( models.ApiResponse[[]models.StatsMxedge], error) { req := o.prepareRequest( @@ -60,11 +60,8 @@ func (o *OrgsStatsMxEdges) ListOrgMxEdgesStats( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) + if forSite != nil { + req.QueryParam("for_site", *forSite) } if start != nil { req.QueryParam("start", *start) @@ -75,8 +72,11 @@ func (o *OrgsStatsMxEdges) ListOrgMxEdgesStats( if duration != nil { req.QueryParam("duration", *duration) } - if forSite != nil { - req.QueryParam("for_site", *forSite) + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) } var result []models.StatsMxedge diff --git a/mistapi/orgs_stats_ports.go b/mistapi/orgs_stats_ports.go index b72adb45..e0c71ea6 100644 --- a/mistapi/orgs_stats_ports.go +++ b/mistapi/orgs_stats_ports.go @@ -197,7 +197,7 @@ func (o *OrgsStatsPorts) SearchOrgSwOrGwPorts( return models.NewApiResponse(result, resp), err } -// CountOrgSwitchPorts takes context, orgId, distinct, fullDuplex, mac, neighborMac, neighborPortDesc, neighborSystemName, poeDisabled, poeMode, poeOn, portId, portMac, powerDraw, txPkts, rxPkts, rxBytes, txBps, rxBps, txMcastPkts, txBcastPkts, rxMcastPkts, rxBcastPkts, speed, stpState, stpRole, authState, up, page, limit, start, end, duration as parameters and +// CountOrgSwitchPorts takes context, orgId, distinct, fullDuplex, mac, neighborMac, neighborPortDesc, neighborSystemName, poeDisabled, poeMode, poeOn, portId, portMac, powerDraw, txPkts, rxPkts, rxBytes, txBps, rxBps, txMcastPkts, txBcastPkts, rxMcastPkts, rxBcastPkts, speed, stpState, stpRole, authState, up, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count by Distinct Attributes of Switch/Gateway Ports @@ -230,11 +230,11 @@ func (o *OrgsStatsPorts) CountOrgSwitchPorts( stpRole *models.CountPortsStpRoleEnum, authState *models.CountPortsAuthStateEnum, up *bool, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -338,12 +338,6 @@ func (o *OrgsStatsPorts) CountOrgSwitchPorts( if up != nil { req.QueryParam("up", *up) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -353,6 +347,12 @@ func (o *OrgsStatsPorts) CountOrgSwitchPorts( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_stats_vpn_peers.go b/mistapi/orgs_stats_vpn_peers.go index 1a8dc44e..97adde5e 100644 --- a/mistapi/orgs_stats_vpn_peers.go +++ b/mistapi/orgs_stats_vpn_peers.go @@ -22,7 +22,7 @@ func NewOrgsStatsVPNPeers(baseController baseController) *OrgsStatsVPNPeers { return &orgsStatsVPNPeers } -// CountOrgPeerPathStats takes context, orgId, distinct, page, limit, start, end, duration as parameters and +// CountOrgPeerPathStats takes context, orgId, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Org Peer Path Statgs @@ -30,11 +30,11 @@ func (o *OrgsStatsVPNPeers) CountOrgPeerPathStats( ctx context.Context, orgId uuid.UUID, distinct *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := o.prepareRequest( @@ -63,12 +63,6 @@ func (o *OrgsStatsVPNPeers) CountOrgPeerPathStats( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -78,6 +72,12 @@ func (o *OrgsStatsVPNPeers) CountOrgPeerPathStats( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_user_ma_cs.go b/mistapi/orgs_user_ma_cs.go index 3d35f31d..478798b1 100644 --- a/mistapi/orgs_user_ma_cs.go +++ b/mistapi/orgs_user_ma_cs.go @@ -132,7 +132,7 @@ func (o *OrgsUserMACs) ImportOrgUserMacs( return context.Response, err } -// SearchOrgUserMacs takes context, orgId, mac, labels, page, limit as parameters and +// SearchOrgUserMacs takes context, orgId, mac, labels, limit, page as parameters and // returns an models.ApiResponse with models.UserMacsSearch data and // an error if there was an issue with the request or response. // Search Org User MACs @@ -141,8 +141,8 @@ func (o *OrgsUserMACs) SearchOrgUserMacs( orgId uuid.UUID, mac *string, labels []string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[models.UserMacsSearch], error) { req := o.prepareRequest( @@ -174,12 +174,12 @@ func (o *OrgsUserMACs) SearchOrgUserMacs( if labels != nil { req.QueryParam("labels", labels) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result models.UserMacsSearch decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_vp_ns.go b/mistapi/orgs_vp_ns.go index 462bcf5c..bac9fabb 100644 --- a/mistapi/orgs_vp_ns.go +++ b/mistapi/orgs_vp_ns.go @@ -23,15 +23,15 @@ func NewOrgsVPNs(baseController baseController) *OrgsVPNs { return &orgsVPNs } -// ListOrgsVpns takes context, orgId, page, limit as parameters and +// ListOrgsVpns takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Vpn data and // an error if there was an issue with the request or response. // Get List of Org VPNs func (o *OrgsVPNs) ListOrgsVpns( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Vpn], error) { req := o.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/vpns", orgId)) @@ -53,12 +53,12 @@ func (o *OrgsVPNs) ListOrgsVpns( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Vpn decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_webhooks.go b/mistapi/orgs_webhooks.go index 7f975755..34e61432 100644 --- a/mistapi/orgs_webhooks.go +++ b/mistapi/orgs_webhooks.go @@ -23,15 +23,15 @@ func NewOrgsWebhooks(baseController baseController) *OrgsWebhooks { return &orgsWebhooks } -// ListOrgWebhooks takes context, orgId, page, limit as parameters and +// ListOrgWebhooks takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Webhook data and // an error if there was an issue with the request or response. // Get List of Org Webhooks func (o *OrgsWebhooks) ListOrgWebhooks( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Webhook], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsWebhooks) ListOrgWebhooks( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Webhook decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_wlan_templates.go b/mistapi/orgs_wlan_templates.go index ede4a3e2..50790eb6 100644 --- a/mistapi/orgs_wlan_templates.go +++ b/mistapi/orgs_wlan_templates.go @@ -23,15 +23,15 @@ func NewOrgsWLANTemplates(baseController baseController) *OrgsWLANTemplates { return &orgsWLANTemplates } -// ListOrgTemplates takes context, orgId, page, limit as parameters and +// ListOrgTemplates takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Template data and // an error if there was an issue with the request or response. // Get List of Org WLAN Templates func (o *OrgsWLANTemplates) ListOrgTemplates( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Template], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsWLANTemplates) ListOrgTemplates( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Template decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_wlans.go b/mistapi/orgs_wlans.go index a22e87ba..c9f8c4ee 100644 --- a/mistapi/orgs_wlans.go +++ b/mistapi/orgs_wlans.go @@ -23,15 +23,15 @@ func NewOrgsWlans(baseController baseController) *OrgsWlans { return &orgsWlans } -// ListOrgWlans takes context, orgId, page, limit as parameters and +// ListOrgWlans takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.Wlan data and // an error if there was an issue with the request or response. // Get List of Org Wlans func (o *OrgsWlans) ListOrgWlans( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Wlan], error) { req := o.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/wlans", orgId)) @@ -53,12 +53,12 @@ func (o *OrgsWlans) ListOrgWlans( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Wlan decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_wx_rules.go b/mistapi/orgs_wx_rules.go index 224a2a06..6ed1135e 100644 --- a/mistapi/orgs_wx_rules.go +++ b/mistapi/orgs_wx_rules.go @@ -23,15 +23,15 @@ func NewOrgsWxRules(baseController baseController) *OrgsWxRules { return &orgsWxRules } -// ListOrgWxRules takes context, orgId, page, limit as parameters and +// ListOrgWxRules takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.WxlanRule data and // an error if there was an issue with the request or response. // Get List of Org WxRules func (o *OrgsWxRules) ListOrgWxRules( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanRule], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsWxRules) ListOrgWxRules( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.WxlanRule decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_wx_tags.go b/mistapi/orgs_wx_tags.go index 2114d867..90181112 100644 --- a/mistapi/orgs_wx_tags.go +++ b/mistapi/orgs_wx_tags.go @@ -23,15 +23,15 @@ func NewOrgsWxTags(baseController baseController) *OrgsWxTags { return &orgsWxTags } -// ListOrgWxTags takes context, orgId, page, limit as parameters and +// ListOrgWxTags takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.WxlanTag data and // an error if there was an issue with the request or response. // Get List of Org WxLAN Tags func (o *OrgsWxTags) ListOrgWxTags( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanTag], error) { req := o.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/wxtags", orgId)) @@ -53,12 +53,12 @@ func (o *OrgsWxTags) ListOrgWxTags( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.WxlanTag decoder, resp, err := req.CallAsJson() diff --git a/mistapi/orgs_wx_tunnels.go b/mistapi/orgs_wx_tunnels.go index 38ff07f5..443c74c5 100644 --- a/mistapi/orgs_wx_tunnels.go +++ b/mistapi/orgs_wx_tunnels.go @@ -23,15 +23,15 @@ func NewOrgsWxTunnels(baseController baseController) *OrgsWxTunnels { return &orgsWxTunnels } -// ListOrgWxTunnels takes context, orgId, page, limit as parameters and +// ListOrgWxTunnels takes context, orgId, limit, page as parameters and // returns an models.ApiResponse with []models.WxlanTunnel data and // an error if there was an issue with the request or response. // Get List of Org WxLAN Tunnels func (o *OrgsWxTunnels) ListOrgWxTunnels( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanTunnel], error) { req := o.prepareRequest( @@ -57,12 +57,12 @@ func (o *OrgsWxTunnels) ListOrgWxTunnels( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.WxlanTunnel decoder, resp, err := req.CallAsJson() diff --git a/mistapi/self_audit_logs.go b/mistapi/self_audit_logs.go index 49738bc2..8640ad2e 100644 --- a/mistapi/self_audit_logs.go +++ b/mistapi/self_audit_logs.go @@ -20,18 +20,18 @@ func NewSelfAuditLogs(baseController baseController) *SelfAuditLogs { return &selfAuditLogs } -// ListSelfAuditLogs takes context, page, limit, start, end, duration as parameters and +// ListSelfAuditLogs takes context, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponseSelfAuditLogs data and // an error if there was an issue with the request or response. // Get List of change logs across all Orgs for current admin // Audit logs records all administrative activities done by current admin across all orgs func (s *SelfAuditLogs) ListSelfAuditLogs( ctx context.Context, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseSelfAuditLogs], error) { req := s.prepareRequest(ctx, "GET", "/api/v1/self/logs") @@ -53,12 +53,6 @@ func (s *SelfAuditLogs) ListSelfAuditLogs( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -68,6 +62,12 @@ func (s *SelfAuditLogs) ListSelfAuditLogs( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponseSelfAuditLogs decoder, resp, err := req.CallAsJson() if err != nil { diff --git a/mistapi/sites_alarms.go b/mistapi/sites_alarms.go index 07e0e8a7..9bc17db9 100644 --- a/mistapi/sites_alarms.go +++ b/mistapi/sites_alarms.go @@ -114,7 +114,7 @@ func (s *SitesAlarms) AckSiteAllAlarms( return context.Response, err } -// CountSiteAlarms takes context, siteId, distinct, ackAdminName, acked, mType, severity, group, page, limit, start, end, duration as parameters and +// CountSiteAlarms takes context, siteId, distinct, ackAdminName, acked, mType, severity, group, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Site Alarms @@ -127,11 +127,11 @@ func (s *SitesAlarms) CountSiteAlarms( mType *string, severity *string, group *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -175,12 +175,6 @@ func (s *SitesAlarms) CountSiteAlarms( if group != nil { req.QueryParam("group", *group) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -190,6 +184,12 @@ func (s *SitesAlarms) CountSiteAlarms( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_asset_filters.go b/mistapi/sites_asset_filters.go index e25d80bc..aefceb53 100644 --- a/mistapi/sites_asset_filters.go +++ b/mistapi/sites_asset_filters.go @@ -23,15 +23,15 @@ func NewSitesAssetFilters(baseController baseController) *SitesAssetFilters { return &sitesAssetFilters } -// ListSiteAssetFilters takes context, siteId, page, limit as parameters and +// ListSiteAssetFilters takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.AssetFilter data and // an error if there was an issue with the request or response. // Get List of Site Asset Filters func (s *SitesAssetFilters) ListSiteAssetFilters( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.AssetFilter], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesAssetFilters) ListSiteAssetFilters( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.AssetFilter decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_assets.go b/mistapi/sites_assets.go index 11cfb513..663d3f09 100644 --- a/mistapi/sites_assets.go +++ b/mistapi/sites_assets.go @@ -23,15 +23,15 @@ func NewSitesAssets(baseController baseController) *SitesAssets { return &sitesAssets } -// ListSiteAssets takes context, siteId, page, limit as parameters and +// ListSiteAssets takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.Asset data and // an error if there was an issue with the request or response. // Get List of Site Assets func (s *SitesAssets) ListSiteAssets( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Asset], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesAssets) ListSiteAssets( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Asset decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_beacons.go b/mistapi/sites_beacons.go index cdcdcc82..515cc9ef 100644 --- a/mistapi/sites_beacons.go +++ b/mistapi/sites_beacons.go @@ -23,15 +23,15 @@ func NewSitesBeacons(baseController baseController) *SitesBeacons { return &sitesBeacons } -// ListSiteBeacons takes context, siteId, page, limit as parameters and +// ListSiteBeacons takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.Beacon data and // an error if there was an issue with the request or response. // Get List of Site Beacons func (s *SitesBeacons) ListSiteBeacons( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Beacon], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesBeacons) ListSiteBeacons( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Beacon decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_clients_wired.go b/mistapi/sites_clients_wired.go index 53ad1c78..ab580d06 100644 --- a/mistapi/sites_clients_wired.go +++ b/mistapi/sites_clients_wired.go @@ -22,7 +22,7 @@ func NewSitesClientsWired(baseController baseController) *SitesClientsWired { return &sitesClientsWired } -// CountSiteWiredClients takes context, siteId, distinct, mac, deviceMac, portId, vlan, page, limit, start, end, duration as parameters and +// CountSiteWiredClients takes context, siteId, distinct, mac, deviceMac, portId, vlan, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count by Distinct Attributes of Clients @@ -34,11 +34,11 @@ func (s *SitesClientsWired) CountSiteWiredClients( deviceMac *string, portId *string, vlan *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -79,12 +79,6 @@ func (s *SitesClientsWired) CountSiteWiredClients( if vlan != nil { req.QueryParam("vlan", *vlan) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -94,6 +88,12 @@ func (s *SitesClientsWired) CountSiteWiredClients( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_clients_wireless.go b/mistapi/sites_clients_wireless.go index a2c93494..8ace8d7a 100644 --- a/mistapi/sites_clients_wireless.go +++ b/mistapi/sites_clients_wireless.go @@ -22,7 +22,7 @@ func NewSitesClientsWireless(baseController baseController) *SitesClientsWireles return &sitesClientsWireless } -// CountSiteWirelessClients takes context, siteId, distinct, ssid, ap, ipAddress, vlan, hostname, os, model, device, page, limit, start, end, duration as parameters and +// CountSiteWirelessClients takes context, siteId, distinct, ssid, ap, ipAddress, vlan, hostname, os, model, device, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count by Distinct Attributes of Clients @@ -38,11 +38,11 @@ func (s *SitesClientsWireless) CountSiteWirelessClients( os *string, model *string, device *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -95,12 +95,6 @@ func (s *SitesClientsWireless) CountSiteWirelessClients( if device != nil { req.QueryParam("device", *device) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -110,6 +104,12 @@ func (s *SitesClientsWireless) CountSiteWirelessClients( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -403,7 +403,7 @@ func (s *SitesClientsWireless) SearchSiteWirelessClients( return models.NewApiResponse(result, resp), err } -// CountSiteWirelessClientSessions takes context, siteId, distinct, ap, band, clientFamily, clientManufacture, clientModel, clientOs, ssid, wlanId, page, limit, start, end, duration as parameters and +// CountSiteWirelessClientSessions takes context, siteId, distinct, ap, band, clientFamily, clientManufacture, clientModel, clientOs, ssid, wlanId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count by Distinct Attributes of Client Sessions @@ -419,11 +419,11 @@ func (s *SitesClientsWireless) CountSiteWirelessClientSessions( clientOs *string, ssid *string, wlanId *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -476,12 +476,6 @@ func (s *SitesClientsWireless) CountSiteWirelessClientSessions( if wlanId != nil { req.QueryParam("wlan_id", *wlanId) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -491,6 +485,12 @@ func (s *SitesClientsWireless) CountSiteWirelessClientSessions( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -605,7 +605,7 @@ func (s *SitesClientsWireless) SearchSiteWirelessClientSessions( return models.NewApiResponse(result, resp), err } -// GetSiteEventsForClient takes context, siteId, clientMac, mType, proto, band, channel, wlanId, ssid, start, end, page, limit, duration as parameters and +// GetSiteEventsForClient takes context, siteId, clientMac, mType, proto, band, channel, wlanId, ssid, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponseClientEventsSearch data and // an error if there was an issue with the request or response. // Get the list of events for a specific client @@ -621,9 +621,9 @@ func (s *SitesClientsWireless) GetSiteEventsForClient( ssid *string, start *int, end *int, - page *int, + duration *string, limit *int, - duration *string) ( + page *int) ( models.ApiResponse[models.ResponseClientEventsSearch], error) { req := s.prepareRequest( @@ -673,14 +673,14 @@ func (s *SitesClientsWireless) GetSiteEventsForClient( if end != nil { req.QueryParam("end", *end) } - if page != nil { - req.QueryParam("page", *page) + if duration != nil { + req.QueryParam("duration", *duration) } if limit != nil { req.QueryParam("limit", *limit) } - if duration != nil { - req.QueryParam("duration", *duration) + if page != nil { + req.QueryParam("page", *page) } var result models.ResponseClientEventsSearch diff --git a/mistapi/sites_devices.go b/mistapi/sites_devices.go index 025eeff1..85a1c147 100644 --- a/mistapi/sites_devices.go +++ b/mistapi/sites_devices.go @@ -23,7 +23,7 @@ func NewSitesDevices(baseController baseController) *SitesDevices { return &sitesDevices } -// ListSiteDevices takes context, siteId, mType, name, page, limit as parameters and +// ListSiteDevices takes context, siteId, mType, name, limit, page as parameters and // returns an models.ApiResponse with []models.ConfigDevice data and // an error if there was an issue with the request or response. // Get list of devices on the site. @@ -32,8 +32,8 @@ func (s *SitesDevices) ListSiteDevices( siteId uuid.UUID, mType *models.DeviceTypeWithAllEnum, name *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.ConfigDevice], error) { req := s.prepareRequest( @@ -65,12 +65,12 @@ func (s *SitesDevices) ListSiteDevices( if name != nil { req.QueryParam("name", *name) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.ConfigDevice decoder, resp, err := req.CallAsJson() @@ -82,7 +82,7 @@ func (s *SitesDevices) ListSiteDevices( return models.NewApiResponse(result, resp), err } -// CountSiteDeviceConfigHistory takes context, siteId, distinct, mac, page, limit, start, end, duration as parameters and +// CountSiteDeviceConfigHistory takes context, siteId, distinct, mac, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Counts the number of entries in device config history for distinct field with given filters @@ -91,11 +91,11 @@ func (s *SitesDevices) CountSiteDeviceConfigHistory( siteId uuid.UUID, distinct *string, mac *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -127,12 +127,6 @@ func (s *SitesDevices) CountSiteDeviceConfigHistory( if mac != nil { req.QueryParam("mac", *mac) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -142,6 +136,12 @@ func (s *SitesDevices) CountSiteDeviceConfigHistory( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -220,7 +220,7 @@ func (s *SitesDevices) SearchSiteDeviceConfigHistory( return models.NewApiResponse(result, resp), err } -// CountSiteDevices takes context, siteId, distinct, hostname, model, mac, version, mxtunnelStatus, mxedgeId, lldpSystemName, lldpSystemDesc, lldpPortId, lldpMgmtAddr, mapId, page, limit, start, end, duration as parameters and +// CountSiteDevices takes context, siteId, distinct, hostname, model, mac, version, mxtunnelStatus, mxedgeId, lldpSystemName, lldpSystemDesc, lldpPortId, lldpMgmtAddr, mapId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Counts the number of entries in ap events history for distinct field with given filters @@ -239,11 +239,11 @@ func (s *SitesDevices) CountSiteDevices( lldpPortId *string, lldpMgmtAddr *string, mapId *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -305,12 +305,6 @@ func (s *SitesDevices) CountSiteDevices( if mapId != nil { req.QueryParam("map_id", *mapId) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -320,6 +314,12 @@ func (s *SitesDevices) CountSiteDevices( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -582,7 +582,7 @@ func (s *SitesDevices) ImportSiteDevices( return models.NewApiResponse(result, resp), err } -// CountSiteDeviceLastConfig takes context, siteId, distinct, page, limit, start, end, duration as parameters and +// CountSiteDeviceLastConfig takes context, siteId, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Counts the number of entries in device config history for distinct field with given filters @@ -590,11 +590,11 @@ func (s *SitesDevices) CountSiteDeviceLastConfig( ctx context.Context, siteId uuid.UUID, distinct *models.SiteDeviceLastConfigCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -623,12 +623,6 @@ func (s *SitesDevices) CountSiteDeviceLastConfig( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -638,6 +632,12 @@ func (s *SitesDevices) CountSiteDeviceLastConfig( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_devices_others.go b/mistapi/sites_devices_others.go index da48c43f..238d4283 100644 --- a/mistapi/sites_devices_others.go +++ b/mistapi/sites_devices_others.go @@ -22,7 +22,7 @@ func NewSitesDevicesOthers(baseController baseController) *SitesDevicesOthers { return &sitesDevicesOthers } -// ListSiteOtherDevices takes context, siteId, vendor, mac, serial, model, name, page, limit as parameters and +// ListSiteOtherDevices takes context, siteId, vendor, mac, serial, model, name, limit, page as parameters and // returns an models.ApiResponse with []models.DeviceOther data and // an error if there was an issue with the request or response. // Get List of Site other devices (3rd party devices) @@ -34,8 +34,8 @@ func (s *SitesDevicesOthers) ListSiteOtherDevices( serial *string, model *string, name *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.DeviceOther], error) { req := s.prepareRequest( @@ -76,12 +76,12 @@ func (s *SitesDevicesOthers) ListSiteOtherDevices( if name != nil { req.QueryParam("name", *name) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.DeviceOther decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_guests.go b/mistapi/sites_guests.go index c2a0b194..8b18731d 100644 --- a/mistapi/sites_guests.go +++ b/mistapi/sites_guests.go @@ -70,7 +70,7 @@ func (s *SitesGuests) ListSiteAllGuestAuthorizations( return models.NewApiResponse(result, resp), err } -// CountSiteGuestAuthorizations takes context, siteId, distinct, page, limit, start, end, duration as parameters and +// CountSiteGuestAuthorizations takes context, siteId, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Authorized Guest @@ -78,11 +78,11 @@ func (s *SitesGuests) CountSiteGuestAuthorizations( ctx context.Context, siteId uuid.UUID, distinct *models.SiteGuestsCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -111,12 +111,6 @@ func (s *SitesGuests) CountSiteGuestAuthorizations( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -126,6 +120,12 @@ func (s *SitesGuests) CountSiteGuestAuthorizations( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_insights.go b/mistapi/sites_insights.go index 04ed4181..5e34d6f6 100644 --- a/mistapi/sites_insights.go +++ b/mistapi/sites_insights.go @@ -22,7 +22,7 @@ func NewSitesInsights(baseController baseController) *SitesInsights { return &sitesInsights } -// GetSiteInsightMetricsForClient takes context, siteId, clientMac, metric, page, limit, start, end, duration, interval as parameters and +// GetSiteInsightMetricsForClient takes context, siteId, clientMac, metric, start, end, duration, interval, limit, page as parameters and // returns an models.ApiResponse with models.InsightMetrics data and // an error if there was an issue with the request or response. // Get Client Insight Metrics @@ -32,12 +32,12 @@ func (s *SitesInsights) GetSiteInsightMetricsForClient( siteId uuid.UUID, clientMac string, metric string, - page *int, - limit *int, start *int, end *int, duration *string, - interval *string) ( + interval *string, + limit *int, + page *int) ( models.ApiResponse[models.InsightMetrics], error) { req := s.prepareRequest( @@ -63,12 +63,6 @@ func (s *SitesInsights) GetSiteInsightMetricsForClient( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -81,6 +75,12 @@ func (s *SitesInsights) GetSiteInsightMetricsForClient( if interval != nil { req.QueryParam("interval", *interval) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.InsightMetrics decoder, resp, err := req.CallAsJson() @@ -92,7 +92,7 @@ func (s *SitesInsights) GetSiteInsightMetricsForClient( return models.NewApiResponse(result, resp), err } -// GetSiteInsightMetricsForDevice takes context, siteId, metric, deviceMac, page, limit, start, end, duration, interval as parameters and +// GetSiteInsightMetricsForDevice takes context, siteId, metric, deviceMac, start, end, duration, interval, limit, page as parameters and // returns an models.ApiResponse with models.ResponseDeviceMetrics data and // an error if there was an issue with the request or response. // Get AP Insight Metrics @@ -102,12 +102,12 @@ func (s *SitesInsights) GetSiteInsightMetricsForDevice( siteId uuid.UUID, metric string, deviceMac string, - page *int, - limit *int, start *int, end *int, duration *string, - interval *string) ( + interval *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseDeviceMetrics], error) { req := s.prepareRequest( @@ -133,12 +133,6 @@ func (s *SitesInsights) GetSiteInsightMetricsForDevice( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -151,6 +145,12 @@ func (s *SitesInsights) GetSiteInsightMetricsForDevice( if interval != nil { req.QueryParam("interval", *interval) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponseDeviceMetrics decoder, resp, err := req.CallAsJson() @@ -162,7 +162,7 @@ func (s *SitesInsights) GetSiteInsightMetricsForDevice( return models.NewApiResponse(result, resp), err } -// GetSiteInsightMetrics takes context, siteId, metric, page, limit, start, end, duration, interval as parameters and +// GetSiteInsightMetrics takes context, siteId, metric, start, end, duration, interval, limit, page as parameters and // returns an models.ApiResponse with models.InsightMetrics data and // an error if there was an issue with the request or response. // Get Site Insight Metrics @@ -171,12 +171,12 @@ func (s *SitesInsights) GetSiteInsightMetrics( ctx context.Context, siteId uuid.UUID, metric string, - page *int, - limit *int, start *int, end *int, duration *string, - interval *string) ( + interval *string, + limit *int, + page *int) ( models.ApiResponse[models.InsightMetrics], error) { req := s.prepareRequest( @@ -202,12 +202,6 @@ func (s *SitesInsights) GetSiteInsightMetrics( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -220,6 +214,12 @@ func (s *SitesInsights) GetSiteInsightMetrics( if interval != nil { req.QueryParam("interval", *interval) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.InsightMetrics decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_maps.go b/mistapi/sites_maps.go index 5cef66cc..98114d9a 100644 --- a/mistapi/sites_maps.go +++ b/mistapi/sites_maps.go @@ -23,15 +23,15 @@ func NewSitesMaps(baseController baseController) *SitesMaps { return &sitesMaps } -// ListSiteMaps takes context, siteId, page, limit as parameters and +// ListSiteMaps takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.Map data and // an error if there was an issue with the request or response. // Get List of Site Maps func (s *SitesMaps) ListSiteMaps( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Map], error) { req := s.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/sites/%v/maps", siteId)) @@ -53,12 +53,12 @@ func (s *SitesMaps) ListSiteMaps( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Map decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_mx_edges.go b/mistapi/sites_mx_edges.go index 7c598615..8960ac50 100644 --- a/mistapi/sites_mx_edges.go +++ b/mistapi/sites_mx_edges.go @@ -23,15 +23,15 @@ func NewSitesMxEdges(baseController baseController) *SitesMxEdges { return &sitesMxEdges } -// ListSiteMxEdges takes context, siteId, page, limit as parameters and +// ListSiteMxEdges takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.Mxedge data and // an error if there was an issue with the request or response. // Get List of Site Mist Edges func (s *SitesMxEdges) ListSiteMxEdges( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Mxedge], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesMxEdges) ListSiteMxEdges( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Mxedge decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_psks.go b/mistapi/sites_psks.go index cd08e83d..b92f9452 100644 --- a/mistapi/sites_psks.go +++ b/mistapi/sites_psks.go @@ -23,7 +23,7 @@ func NewSitesPsks(baseController baseController) *SitesPsks { return &sitesPsks } -// ListSitePsks takes context, siteId, ssid, role, name, page, limit as parameters and +// ListSitePsks takes context, siteId, ssid, role, name, limit, page as parameters and // returns an models.ApiResponse with []models.Psk data and // an error if there was an issue with the request or response. // Get List of Site PSKs @@ -33,8 +33,8 @@ func (s *SitesPsks) ListSitePsks( ssid *string, role *string, name *string, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Psk], error) { req := s.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/sites/%v/psks", siteId)) @@ -65,12 +65,12 @@ func (s *SitesPsks) ListSitePsks( if name != nil { req.QueryParam("name", *name) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Psk decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_rfdiags.go b/mistapi/sites_rfdiags.go index 1291891c..a8bb0d96 100644 --- a/mistapi/sites_rfdiags.go +++ b/mistapi/sites_rfdiags.go @@ -23,18 +23,18 @@ func NewSitesRfdiags(baseController baseController) *SitesRfdiags { return &sitesRfdiags } -// GetSiteSiteRfdiagRecording takes context, siteId, page, limit, start, end, duration as parameters and +// GetSiteSiteRfdiagRecording takes context, siteId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with [][]models.RfDiagInfoItem data and // an error if there was an issue with the request or response. // List RF Glass Recording func (s *SitesRfdiags) GetSiteSiteRfdiagRecording( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[][]models.RfDiagInfoItem], error) { req := s.prepareRequest( @@ -60,12 +60,6 @@ func (s *SitesRfdiags) GetSiteSiteRfdiagRecording( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -75,6 +69,12 @@ func (s *SitesRfdiags) GetSiteSiteRfdiagRecording( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result [][]models.RfDiagInfoItem decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_rrm.go b/mistapi/sites_rrm.go index 37d97b83..f3d5b858 100644 --- a/mistapi/sites_rrm.go +++ b/mistapi/sites_rrm.go @@ -110,7 +110,7 @@ func (s *SitesRRM) GetSiteCurrentRrmConsiderations( return models.NewApiResponse(result, resp), err } -// GetSiteRrmEvents takes context, siteId, band, page, limit, start, end, duration as parameters and +// GetSiteRrmEvents takes context, siteId, band, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponseEventsRrm data and // an error if there was an issue with the request or response. // Get Site RRM Events @@ -118,11 +118,11 @@ func (s *SitesRRM) GetSiteRrmEvents( ctx context.Context, siteId uuid.UUID, band *models.Dot11BandEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseEventsRrm], error) { req := s.prepareRequest( @@ -151,12 +151,6 @@ func (s *SitesRRM) GetSiteRrmEvents( if band != nil { req.QueryParam("band", *band) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -166,6 +160,12 @@ func (s *SitesRRM) GetSiteRrmEvents( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponseEventsRrm decoder, resp, err := req.CallAsJson() @@ -177,7 +177,7 @@ func (s *SitesRRM) GetSiteRrmEvents( return models.NewApiResponse(result, resp), err } -// GetSiteCurrentRrmNeighbors takes context, siteId, band, page, limit as parameters and +// GetSiteCurrentRrmNeighbors takes context, siteId, band, limit, page as parameters and // returns an models.ApiResponse with models.ResponseRrmNeighbors data and // an error if there was an issue with the request or response. // Get Current RRM observed neighbors @@ -185,8 +185,8 @@ func (s *SitesRRM) GetSiteCurrentRrmNeighbors( ctx context.Context, siteId uuid.UUID, band models.Dot11BandEnum, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[models.ResponseRrmNeighbors], error) { req := s.prepareRequest( @@ -212,12 +212,12 @@ func (s *SitesRRM) GetSiteCurrentRrmNeighbors( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponseRrmNeighbors decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_rssi_zones.go b/mistapi/sites_rssi_zones.go index 5d8bfe52..823dfbe4 100644 --- a/mistapi/sites_rssi_zones.go +++ b/mistapi/sites_rssi_zones.go @@ -23,15 +23,15 @@ func NewSitesRSSIZones(baseController baseController) *SitesRSSIZones { return &sitesRSSIZones } -// ListSiteRssiZones takes context, siteId, page, limit as parameters and +// ListSiteRssiZones takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.RssiZone data and // an error if there was an issue with the request or response. // Get List of Site RSSI Zone (RSSI-based) func (s *SitesRSSIZones) ListSiteRssiZones( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.RssiZone], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesRSSIZones) ListSiteRssiZones( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.RssiZone decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_stats_assets.go b/mistapi/sites_stats_assets.go index c198b1c2..c4b20015 100644 --- a/mistapi/sites_stats_assets.go +++ b/mistapi/sites_stats_assets.go @@ -22,18 +22,18 @@ func NewSitesStatsAssets(baseController baseController) *SitesStatsAssets { return &sitesStatsAssets } -// ListSiteAssetsStats takes context, siteId, page, limit, start, end, duration as parameters and +// ListSiteAssetsStats takes context, siteId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with []models.StatsAsset data and // an error if there was an issue with the request or response. // Get List of Site Assets Stats func (s *SitesStatsAssets) ListSiteAssetsStats( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsAsset], error) { req := s.prepareRequest( @@ -59,12 +59,6 @@ func (s *SitesStatsAssets) ListSiteAssetsStats( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -74,6 +68,12 @@ func (s *SitesStatsAssets) ListSiteAssetsStats( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result []models.StatsAsset decoder, resp, err := req.CallAsJson() @@ -302,18 +302,18 @@ func (s *SitesStatsAssets) SearchSiteAssets( return models.NewApiResponse(result, resp), err } -// ListSiteDiscoveredAssets takes context, siteId, page, limit, start, end, duration as parameters and +// ListSiteDiscoveredAssets takes context, siteId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with []models.Asset data and // an error if there was an issue with the request or response. // Get List of Site Discovered BLE Assets that doesn’t match any of the Asset / Assetfilters func (s *SitesStatsAssets) ListSiteDiscoveredAssets( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.Asset], error) { req := s.prepareRequest( @@ -339,12 +339,6 @@ func (s *SitesStatsAssets) ListSiteDiscoveredAssets( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -354,6 +348,12 @@ func (s *SitesStatsAssets) ListSiteDiscoveredAssets( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Asset decoder, resp, err := req.CallAsJson() @@ -365,7 +365,7 @@ func (s *SitesStatsAssets) ListSiteDiscoveredAssets( return models.NewApiResponse(result, resp), err } -// GetSiteAssetsOfInterest takes context, siteId, duration, start, end, page, limit as parameters and +// GetSiteAssetsOfInterest takes context, siteId, duration, start, end, limit, page as parameters and // returns an models.ApiResponse with []models.AssetOfInterest data and // an error if there was an issue with the request or response. // Get a list of BLE beacons that matches Asset or AssetFilter @@ -375,8 +375,8 @@ func (s *SitesStatsAssets) GetSiteAssetsOfInterest( duration *string, start *int, end *int, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.AssetOfInterest], error) { req := s.prepareRequest( @@ -411,12 +411,12 @@ func (s *SitesStatsAssets) GetSiteAssetsOfInterest( if end != nil { req.QueryParam("end", *end) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.AssetOfInterest decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_stats_beacons.go b/mistapi/sites_stats_beacons.go index d8263995..0ec5dae2 100644 --- a/mistapi/sites_stats_beacons.go +++ b/mistapi/sites_stats_beacons.go @@ -22,18 +22,18 @@ func NewSitesStatsBeacons(baseController baseController) *SitesStatsBeacons { return &sitesStatsBeacons } -// ListSiteBeaconsStats takes context, siteId, page, limit, start, end, duration as parameters and +// ListSiteBeaconsStats takes context, siteId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with []models.StatsBeacon data and // an error if there was an issue with the request or response. // Get List of Site Beacons Stats func (s *SitesStatsBeacons) ListSiteBeaconsStats( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsBeacon], error) { req := s.prepareRequest( @@ -59,12 +59,6 @@ func (s *SitesStatsBeacons) ListSiteBeaconsStats( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -74,6 +68,12 @@ func (s *SitesStatsBeacons) ListSiteBeaconsStats( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result []models.StatsBeacon decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_stats_clients_wireless.go b/mistapi/sites_stats_clients_wireless.go index 4abc20d8..c29d1e08 100644 --- a/mistapi/sites_stats_clients_wireless.go +++ b/mistapi/sites_stats_clients_wireless.go @@ -133,7 +133,7 @@ func (s *SitesStatsClientsWireless) GetSiteWirelessClientStats( return models.NewApiResponse(result, resp), err } -// GetSiteWirelessClientsStatsByMap takes context, siteId, mapId, page, limit, start, end, duration as parameters and +// GetSiteWirelessClientsStatsByMap takes context, siteId, mapId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with []models.StatsWirelessClient data and // an error if there was an issue with the request or response. // Get Site Clients Stats By Map @@ -141,11 +141,11 @@ func (s *SitesStatsClientsWireless) GetSiteWirelessClientsStatsByMap( ctx context.Context, siteId uuid.UUID, mapId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsWirelessClient], error) { req := s.prepareRequest( @@ -171,12 +171,6 @@ func (s *SitesStatsClientsWireless) GetSiteWirelessClientsStatsByMap( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -186,6 +180,12 @@ func (s *SitesStatsClientsWireless) GetSiteWirelessClientsStatsByMap( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result []models.StatsWirelessClient decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_stats_devices.go b/mistapi/sites_stats_devices.go index e95ec323..61d25250 100644 --- a/mistapi/sites_stats_devices.go +++ b/mistapi/sites_stats_devices.go @@ -22,7 +22,7 @@ func NewSitesStatsDevices(baseController baseController) *SitesStatsDevices { return &sitesStatsDevices } -// ListSiteDevicesStats takes context, siteId, mType, status, page, limit as parameters and +// ListSiteDevicesStats takes context, siteId, mType, status, limit, page as parameters and // returns an models.ApiResponse with []models.StatsDevice data and // an error if there was an issue with the request or response. // Get List of Site Devices Stats @@ -31,8 +31,8 @@ func (s *SitesStatsDevices) ListSiteDevicesStats( siteId uuid.UUID, mType *models.DeviceTypeWithAllEnum, status *models.StatDeviceStatusFilterEnum, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.StatsDevice], error) { req := s.prepareRequest( @@ -64,12 +64,12 @@ func (s *SitesStatsDevices) ListSiteDevicesStats( if status != nil { req.QueryParam("status", *status) } - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.StatsDevice decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_stats_discovered_switches.go b/mistapi/sites_stats_discovered_switches.go index 951cbe89..cdfda1d7 100644 --- a/mistapi/sites_stats_discovered_switches.go +++ b/mistapi/sites_stats_discovered_switches.go @@ -89,7 +89,7 @@ func (s *SitesStatsDiscoveredSwitches) SearchSiteDiscoveredSwitchesMetrics( return models.NewApiResponse(result, resp), err } -// CountSiteDiscoveredSwitches takes context, siteId, distinct, page, limit, start, end, duration as parameters and +// CountSiteDiscoveredSwitches takes context, siteId, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Discovered Switches @@ -97,11 +97,11 @@ func (s *SitesStatsDiscoveredSwitches) CountSiteDiscoveredSwitches( ctx context.Context, siteId uuid.UUID, distinct *models.SiteDiscoveredSwitchesCountDistinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -130,12 +130,6 @@ func (s *SitesStatsDiscoveredSwitches) CountSiteDiscoveredSwitches( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -145,6 +139,12 @@ func (s *SitesStatsDiscoveredSwitches) CountSiteDiscoveredSwitches( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_stats_mx_edges.go b/mistapi/sites_stats_mx_edges.go index 14f6c0e9..6d76b84c 100644 --- a/mistapi/sites_stats_mx_edges.go +++ b/mistapi/sites_stats_mx_edges.go @@ -22,18 +22,18 @@ func NewSitesStatsMxEdges(baseController baseController) *SitesStatsMxEdges { return &sitesStatsMxEdges } -// ListSiteMxEdgesStats takes context, siteId, page, limit, start, end, duration as parameters and +// ListSiteMxEdgesStats takes context, siteId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with []models.StatsMxedge data and // an error if there was an issue with the request or response. // Get List of Site MxEdges Stats func (s *SitesStatsMxEdges) ListSiteMxEdgesStats( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[[]models.StatsMxedge], error) { req := s.prepareRequest( @@ -59,12 +59,6 @@ func (s *SitesStatsMxEdges) ListSiteMxEdgesStats( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -74,6 +68,12 @@ func (s *SitesStatsMxEdges) ListSiteMxEdgesStats( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result []models.StatsMxedge decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_stats_ports.go b/mistapi/sites_stats_ports.go index 1fff7649..4e63759a 100644 --- a/mistapi/sites_stats_ports.go +++ b/mistapi/sites_stats_ports.go @@ -22,7 +22,7 @@ func NewSitesStatsPorts(baseController baseController) *SitesStatsPorts { return &sitesStatsPorts } -// CountSiteSwOrGwPorts takes context, siteId, distinct, fullDuplex, mac, neighborMac, neighborPortDesc, neighborSystemName, poeDisabled, poeMode, poeOn, portId, portMac, powerDraw, txPkts, rxPkts, rxBytes, txBps, rxBps, txMcastPkts, txBcastPkts, rxMcastPkts, rxBcastPkts, speed, stpState, stpRole, authState, up, page, limit, start, end, duration as parameters and +// CountSiteSwOrGwPorts takes context, siteId, distinct, fullDuplex, mac, neighborMac, neighborPortDesc, neighborSystemName, poeDisabled, poeMode, poeOn, portId, portMac, powerDraw, txPkts, rxPkts, rxBytes, txBps, rxBps, txMcastPkts, txBcastPkts, rxMcastPkts, rxBcastPkts, speed, stpState, stpRole, authState, up, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count by Distinct Attributes of Switch/Gateway Ports @@ -55,11 +55,11 @@ func (s *SitesStatsPorts) CountSiteSwOrGwPorts( stpRole *models.CountPortsStpRoleEnum, authState *models.CountPortsAuthStateEnum, up *bool, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -163,12 +163,6 @@ func (s *SitesStatsPorts) CountSiteSwOrGwPorts( if up != nil { req.QueryParam("up", *up) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -178,6 +172,12 @@ func (s *SitesStatsPorts) CountSiteSwOrGwPorts( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -400,7 +400,7 @@ func (s *SitesStatsPorts) SearchSiteSwOrGwPorts( return models.NewApiResponse(result, resp), err } -// CountSiteSwitchPorts takes context, siteId, distinct, fullDuplex, mac, neighborMac, neighborPortDesc, neighborSystemName, poeDisabled, poeMode, poeOn, portId, portMac, powerDraw, txPkts, rxPkts, rxBytes, txBps, rxBps, txMcastPkts, txBcastPkts, rxMcastPkts, rxBcastPkts, speed, stpState, stpRole, authState, up, page, limit, start, end, duration as parameters and +// CountSiteSwitchPorts takes context, siteId, distinct, fullDuplex, mac, neighborMac, neighborPortDesc, neighborSystemName, poeDisabled, poeMode, poeOn, portId, portMac, powerDraw, txPkts, rxPkts, rxBytes, txBps, rxBps, txMcastPkts, txBcastPkts, rxMcastPkts, rxBcastPkts, speed, stpState, stpRole, authState, up, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count by Distinct Attributes of Switch/Gateway Ports @@ -433,11 +433,11 @@ func (s *SitesStatsPorts) CountSiteSwitchPorts( stpRole *models.CountPortsStpRoleEnum, authState *models.CountPortsAuthStateEnum, up *bool, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -541,12 +541,6 @@ func (s *SitesStatsPorts) CountSiteSwitchPorts( if up != nil { req.QueryParam("up", *up) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -556,6 +550,12 @@ func (s *SitesStatsPorts) CountSiteSwitchPorts( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_v_beacons.go b/mistapi/sites_v_beacons.go index f4bfec53..4676aaf1 100644 --- a/mistapi/sites_v_beacons.go +++ b/mistapi/sites_v_beacons.go @@ -23,15 +23,15 @@ func NewSitesVBeacons(baseController baseController) *SitesVBeacons { return &sitesVBeacons } -// ListSiteVBeacons takes context, siteId, page, limit as parameters and +// ListSiteVBeacons takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.Vbeacon data and // an error if there was an issue with the request or response. // Get List of Site Virtual Beacons func (s *SitesVBeacons) ListSiteVBeacons( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Vbeacon], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesVBeacons) ListSiteVBeacons( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Vbeacon decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_wan_usages.go b/mistapi/sites_wan_usages.go index 7f87ad0f..1c41f1b2 100644 --- a/mistapi/sites_wan_usages.go +++ b/mistapi/sites_wan_usages.go @@ -22,7 +22,7 @@ func NewSitesWANUsages(baseController baseController) *SitesWANUsages { return &sitesWANUsages } -// CountSiteWanUsage takes context, siteId, mac, peerMac, portId, peerPortId, policy, tenant, pathType, distinct, page, limit, start, end, duration as parameters and +// CountSiteWanUsage takes context, siteId, mac, peerMac, portId, peerPortId, policy, tenant, pathType, distinct, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Site WAN Uages @@ -37,11 +37,11 @@ func (s *SitesWANUsages) CountSiteWanUsage( tenant *string, pathType *string, distinct *models.WanUsagesCountDisctinctEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -91,12 +91,6 @@ func (s *SitesWANUsages) CountSiteWanUsage( if distinct != nil { req.QueryParam("distinct", *distinct) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -106,6 +100,12 @@ func (s *SitesWANUsages) CountSiteWanUsage( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -117,7 +117,7 @@ func (s *SitesWANUsages) CountSiteWanUsage( return models.NewApiResponse(result, resp), err } -// SearchSiteWanUsage takes context, siteId, mac, peerMac, portId, peerPortId, policy, tenant, pathType, page, limit, start, end, duration as parameters and +// SearchSiteWanUsage takes context, siteId, mac, peerMac, portId, peerPortId, policy, tenant, pathType, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.SearchWanUsage data and // an error if there was an issue with the request or response. // Search Site WAN Uages @@ -131,11 +131,11 @@ func (s *SitesWANUsages) SearchSiteWanUsage( policy *string, tenant *string, pathType *string, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.SearchWanUsage], error) { req := s.prepareRequest( @@ -182,12 +182,6 @@ func (s *SitesWANUsages) SearchSiteWanUsage( if pathType != nil { req.QueryParam("path_type", *pathType) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -197,6 +191,12 @@ func (s *SitesWANUsages) SearchSiteWanUsage( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.SearchWanUsage decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_webhooks.go b/mistapi/sites_webhooks.go index 33de32f0..acd68dca 100644 --- a/mistapi/sites_webhooks.go +++ b/mistapi/sites_webhooks.go @@ -23,15 +23,15 @@ func NewSitesWebhooks(baseController baseController) *SitesWebhooks { return &sitesWebhooks } -// ListSiteWebhooks takes context, siteId, page, limit as parameters and +// ListSiteWebhooks takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.Webhook data and // an error if there was an issue with the request or response. // Get List of Site Webhooks func (s *SitesWebhooks) ListSiteWebhooks( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Webhook], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesWebhooks) ListSiteWebhooks( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Webhook decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_wlans.go b/mistapi/sites_wlans.go index c079f530..b2672fd8 100644 --- a/mistapi/sites_wlans.go +++ b/mistapi/sites_wlans.go @@ -23,15 +23,15 @@ func NewSitesWlans(baseController baseController) *SitesWlans { return &sitesWlans } -// ListSiteWlans takes context, siteId, page, limit as parameters and +// ListSiteWlans takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.Wlan data and // an error if there was an issue with the request or response. // Get List of Site WLANs func (s *SitesWlans) ListSiteWlans( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Wlan], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesWlans) ListSiteWlans( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Wlan decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_wx_rules.go b/mistapi/sites_wx_rules.go index f1b116a5..14b3733e 100644 --- a/mistapi/sites_wx_rules.go +++ b/mistapi/sites_wx_rules.go @@ -23,15 +23,15 @@ func NewSitesWxRules(baseController baseController) *SitesWxRules { return &sitesWxRules } -// ListSiteWxRules takes context, siteId, page, limit as parameters and +// ListSiteWxRules takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.WxlanRule data and // an error if there was an issue with the request or response. // Get List of Site WxLan Rules func (s *SitesWxRules) ListSiteWxRules( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanRule], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesWxRules) ListSiteWxRules( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.WxlanRule decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_wx_tags.go b/mistapi/sites_wx_tags.go index 336e5264..36beb25b 100644 --- a/mistapi/sites_wx_tags.go +++ b/mistapi/sites_wx_tags.go @@ -23,15 +23,15 @@ func NewSitesWxTags(baseController baseController) *SitesWxTags { return &sitesWxTags } -// ListSiteWxTags takes context, siteId, page, limit as parameters and +// ListSiteWxTags takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.WxlanTag data and // an error if there was an issue with the request or response. // Get List of Site WxTags func (s *SitesWxTags) ListSiteWxTags( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanTag], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesWxTags) ListSiteWxTags( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.WxlanTag decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_wx_tunnels.go b/mistapi/sites_wx_tunnels.go index 725ad27c..e534b48c 100644 --- a/mistapi/sites_wx_tunnels.go +++ b/mistapi/sites_wx_tunnels.go @@ -23,15 +23,15 @@ func NewSitesWxTunnels(baseController baseController) *SitesWxTunnels { return &sitesWxTunnels } -// ListSiteWxTunnels takes context, siteId, page, limit as parameters and +// ListSiteWxTunnels takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.WxlanTunnel data and // an error if there was an issue with the request or response. // Get List of Site WxLan Tunnels func (s *SitesWxTunnels) ListSiteWxTunnels( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.WxlanTunnel], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesWxTunnels) ListSiteWxTunnels( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.WxlanTunnel decoder, resp, err := req.CallAsJson() diff --git a/mistapi/sites_zones.go b/mistapi/sites_zones.go index 86e058b3..41423bc5 100644 --- a/mistapi/sites_zones.go +++ b/mistapi/sites_zones.go @@ -23,15 +23,15 @@ func NewSitesZones(baseController baseController) *SitesZones { return &sitesZones } -// ListSiteZones takes context, siteId, page, limit as parameters and +// ListSiteZones takes context, siteId, limit, page as parameters and // returns an models.ApiResponse with []models.Zone data and // an error if there was an issue with the request or response. // Get List of Site Zones func (s *SitesZones) ListSiteZones( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int) ( + limit *int, + page *int) ( models.ApiResponse[[]models.Zone], error) { req := s.prepareRequest( @@ -57,12 +57,12 @@ func (s *SitesZones) ListSiteZones( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } if limit != nil { req.QueryParam("limit", *limit) } + if page != nil { + req.QueryParam("page", *page) + } var result []models.Zone decoder, resp, err := req.CallAsJson() @@ -256,7 +256,7 @@ func (s *SitesZones) UpdateSiteZone( return models.NewApiResponse(result, resp), err } -// CountSiteZoneSessions takes context, siteId, zoneType, distinct, userType, user, scopeId, scope, page, limit, start, end, duration as parameters and +// CountSiteZoneSessions takes context, siteId, zoneType, distinct, userType, user, scopeId, scope, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.RepsonseCount data and // an error if there was an issue with the request or response. // Count Site Zone Sessions @@ -269,11 +269,11 @@ func (s *SitesZones) CountSiteZoneSessions( user *string, scopeId *string, scope *models.ZoneScopeEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.RepsonseCount], error) { req := s.prepareRequest( @@ -314,12 +314,6 @@ func (s *SitesZones) CountSiteZoneSessions( if scope != nil { req.QueryParam("scope", *scope) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -329,6 +323,12 @@ func (s *SitesZones) CountSiteZoneSessions( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.RepsonseCount decoder, resp, err := req.CallAsJson() @@ -340,7 +340,7 @@ func (s *SitesZones) CountSiteZoneSessions( return models.NewApiResponse(result, resp), err } -// SearchSiteZoneSessions takes context, siteId, zoneType, userType, user, scopeId, scope, page, limit, start, end, duration as parameters and +// SearchSiteZoneSessions takes context, siteId, zoneType, userType, user, scopeId, scope, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponseZoneSearch data and // an error if there was an issue with the request or response. // Search Zone Sessions @@ -352,11 +352,11 @@ func (s *SitesZones) SearchSiteZoneSessions( user *string, scopeId *string, scope *models.VisitsScopeEnum, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponseZoneSearch], error) { req := s.prepareRequest( @@ -394,12 +394,6 @@ func (s *SitesZones) SearchSiteZoneSessions( if scope != nil { req.QueryParam("scope", *scope) } - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -409,6 +403,12 @@ func (s *SitesZones) SearchSiteZoneSessions( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponseZoneSearch decoder, resp, err := req.CallAsJson() diff --git a/mistapi/utilities_pca_ps.go b/mistapi/utilities_pca_ps.go index 9a1f0ecb..1508f0cb 100644 --- a/mistapi/utilities_pca_ps.go +++ b/mistapi/utilities_pca_ps.go @@ -23,18 +23,18 @@ func NewUtilitiesPCAPs(baseController baseController) *UtilitiesPCAPs { return &utilitiesPCAPs } -// ListOrgPacketCaptures takes context, orgId, page, limit, start, end, duration as parameters and +// ListOrgPacketCaptures takes context, orgId, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponsePcapSearch data and // an error if there was an issue with the request or response. // Get List of Org Packet Captures func (u *UtilitiesPCAPs) ListOrgPacketCaptures( ctx context.Context, orgId uuid.UUID, - page *int, - limit *int, start *int, end *int, - duration *string) ( + duration *string, + limit *int, + page *int) ( models.ApiResponse[models.ResponsePcapSearch], error) { req := u.prepareRequest(ctx, "GET", fmt.Sprintf("/api/v1/orgs/%v/pcaps", orgId)) @@ -56,12 +56,6 @@ func (u *UtilitiesPCAPs) ListOrgPacketCaptures( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) - } if start != nil { req.QueryParam("start", *start) } @@ -71,6 +65,12 @@ func (u *UtilitiesPCAPs) ListOrgPacketCaptures( if duration != nil { req.QueryParam("duration", *duration) } + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) + } var result models.ResponsePcapSearch decoder, resp, err := req.CallAsJson() @@ -249,19 +249,19 @@ func (u *UtilitiesPCAPs) StartOrgPacketCapture( return models.NewApiResponse(result, resp), err } -// ListSitePacketCaptures takes context, siteId, page, limit, start, end, duration, clientMac as parameters and +// ListSitePacketCaptures takes context, siteId, clientMac, start, end, duration, limit, page as parameters and // returns an models.ApiResponse with models.ResponsePcapSearch data and // an error if there was an issue with the request or response. // Get List of Site Packet Captures func (u *UtilitiesPCAPs) ListSitePacketCaptures( ctx context.Context, siteId uuid.UUID, - page *int, - limit *int, + clientMac *string, start *int, end *int, duration *string, - clientMac *string) ( + limit *int, + page *int) ( models.ApiResponse[models.ResponsePcapSearch], error) { req := u.prepareRequest( @@ -287,11 +287,8 @@ func (u *UtilitiesPCAPs) ListSitePacketCaptures( "404": {Message: "Not found. The API endpoint doesn’t exist or resource doesn’ t exist", Unmarshaller: errors.NewResponseHttp404}, "429": {Message: "Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold", Unmarshaller: errors.NewResponseHttp429Error}, }) - if page != nil { - req.QueryParam("page", *page) - } - if limit != nil { - req.QueryParam("limit", *limit) + if clientMac != nil { + req.QueryParam("client_mac", *clientMac) } if start != nil { req.QueryParam("start", *start) @@ -302,8 +299,11 @@ func (u *UtilitiesPCAPs) ListSitePacketCaptures( if duration != nil { req.QueryParam("duration", *duration) } - if clientMac != nil { - req.QueryParam("client_mac", *clientMac) + if limit != nil { + req.QueryParam("limit", *limit) + } + if page != nil { + req.QueryParam("page", *page) } var result models.ResponsePcapSearch