Skip to content

Commit

Permalink
v0.3.40
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Oct 17, 2024
1 parent 33c86fc commit c3cb89d
Show file tree
Hide file tree
Showing 89 changed files with 1,600 additions and 1,004 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

## Introduction

> Version: **2409.1.9**
> Version: **2409.1.11**
>
> Date: **September 27, 2024**
> Date: **October 17, 2024**
---

Expand All @@ -14,7 +14,7 @@

* [Mist Automation Guide](https://www.juniper.net/documentation/us/en/software/mist/automation-integration/index.html)
* [Mist Location SDK](https://www.juniper.net/documentation/us/en/software/mist/location_services/topics/concept/mist-how-get-mist-sdk.html)
* [Mist Product Updates](https://www.mist.com/documentation/category/product-updates/)
* [Mist Product Updates](https://www.juniper.net/documentation/us/en/software/mist/product-updates/)

---

Expand Down Expand Up @@ -234,6 +234,7 @@ This API uses the following authentication schemes.
* [Orgs Stats-Mx Edges](doc/controllers/orgs-stats-mx-edges.md)
* [Orgs Stats-Other Devices](doc/controllers/orgs-stats-other-devices.md)
* [Orgs Stats-Ports](doc/controllers/orgs-stats-ports.md)
* [Orgs Stats-Sites](doc/controllers/orgs-stats-sites.md)
* [Orgs Stats-Tunnels](doc/controllers/orgs-stats-tunnels.md)
* [Orgs Stats-VPN Peers](doc/controllers/orgs-stats-vpn-peers.md)
* [Orgs Subscriptions](doc/controllers/orgs-subscriptions.md)
Expand Down
1 change: 1 addition & 0 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ The gateway for the SDK. This class acts as a factory for the Controllers and al
| OrgsStatsMxEdges() | Gets OrgsStatsMxEdges |
| OrgsStatsOtherDevices() | Gets OrgsStatsOtherDevices |
| OrgsStatsPorts() | Gets OrgsStatsPorts |
| OrgsStatsSites() | Gets OrgsStatsSites |
| OrgsStatsTunnels() | Gets OrgsStatsTunnels |
| OrgsStatsVPNPeers() | Gets OrgsStatsVPNPeers |
| OrgsNACRules() | Gets OrgsNACRules |
Expand Down
16 changes: 8 additions & 8 deletions doc/controllers/orgs-clients-wired.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ SearchOrgWiredClients(
mac *string,
portId *string,
vlan *int,
ip *string,
ipAddress *string,
manufacture *string,
text *string,
nacruleId *string,
Expand All @@ -146,13 +146,13 @@ SearchOrgWiredClients(
| --- | --- | --- | --- |
| `orgId` | `uuid.UUID` | Template, Required | - |
| `siteId` | `*string` | Query, Optional | Site ID |
| `deviceMac` | `*string` | Query, Optional | device mac |
| `mac` | `*string` | Query, Optional | client mac |
| `portId` | `*string` | Query, Optional | port id |
| `deviceMac` | `*string` | Query, Optional | device mac (Gateway/Switch) where the client has connected to |
| `mac` | `*string` | Query, Optional | partial / full MAC address |
| `portId` | `*string` | Query, Optional | port id where the client has connected to |
| `vlan` | `*int` | Query, Optional | vlan |
| `ip` | `*string` | Query, Optional | ip |
| `ipAddress` | `*string` | Query, Optional | - |
| `manufacture` | `*string` | Query, Optional | client manufacturer |
| `text` | `*string` | Query, Optional | single entry of hostname/mac |
| `text` | `*string` | Query, Optional | partial / full MAC address, hostname or username |
| `nacruleId` | `*string` | Query, Optional | nacrule_id |
| `dhcpHostname` | `*string` | Query, Optional | DHCP Hostname |
| `dhcpFqdn` | `*string` | Query, Optional | DHCP FQDN |
Expand Down Expand Up @@ -185,7 +185,7 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")




ipAddress := "192.168.1.1"



Expand All @@ -211,7 +211,7 @@ limit := 100

duration := "10m"

apiResponse, err := orgsClientsWired.SearchOrgWiredClients(ctx, orgId, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, &limit, nil, nil, &duration)
apiResponse, err := orgsClientsWired.SearchOrgWiredClients(ctx, orgId, nil, nil, nil, nil, nil, &ipAddress, nil, nil, nil, nil, nil, nil, nil, nil, &limit, nil, nil, &duration)
if err != nil {
log.Fatalln(err)
} else {
Expand Down
18 changes: 13 additions & 5 deletions doc/controllers/orgs-clients-wireless.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,14 @@ SearchOrgWirelessClients(
mac *string,
ipAddress *string,
hostname *string,
band *string,
device *string,
os *string,
model *string,
ap *string,
pskId *string,
pskName *string,
username *string,
vlan *string,
ssid *string,
text *string,
Expand All @@ -571,12 +573,14 @@ SearchOrgWirelessClients(
| `mac` | `*string` | Query, Optional | partial / full MAC address |
| `ipAddress` | `*string` | Query, Optional | - |
| `hostname` | `*string` | Query, Optional | partial / full hostname |
| `band` | `*string` | Query, Optional | Radio band. enum: `24`, `5`, `6` |
| `device` | `*string` | Query, Optional | device type, e.g. Mac, Nvidia, iPhone |
| `os` | `*string` | Query, Optional | os, e.g. Sierra, Yosemite, Windows 10 |
| `model` | `*string` | Query, Optional | model, e.g. “MBP 15 late 2013”, 6, 6s, “8+ GSM” |
| `os` | `*string` | Query, Optional | only available for clients running the Marvis Client app, os, e.g. Sierra, Yosemite, Windows 10 |
| `model` | `*string` | Query, Optional | only available for clients running the Marvis Client app, model, e.g. “MBP 15 late 2013”, 6, 6s, “8+ GSM” |
| `ap` | `*string` | Query, Optional | AP mac where the client has connected to |
| `pskId` | `*string` | Query, Optional | PSK ID |
| `pskName` | `*string` | Query, Optional | PSK Name |
| `pskName` | `*string` | Query, Optional | only available for clients using PPSK authentication, the Name of the PSK |
| `username` | `*string` | Query, Optional | only available for clients using 802.1X authentication, partial / full username |
| `vlan` | `*string` | Query, Optional | vlan |
| `ssid` | `*string` | Query, Optional | SSID |
| `text` | `*string` | Query, Optional | partial / full MAC address, hostname, username, psk_name or ip |
Expand Down Expand Up @@ -612,6 +616,8 @@ ipAddress := "192.168.1.1"





pskId := "000000ab-00ab-00ab-00ab-0000000000ab"


Expand All @@ -622,6 +628,8 @@ pskId := "000000ab-00ab-00ab-00ab-0000000000ab"





limit := 100


Expand All @@ -630,7 +638,7 @@ limit := 100

duration := "10m"

apiResponse, err := orgsClientsWireless.SearchOrgWirelessClients(ctx, orgId, nil, nil, &ipAddress, nil, nil, nil, nil, nil, &pskId, nil, nil, nil, nil, &limit, nil, nil, &duration)
apiResponse, err := orgsClientsWireless.SearchOrgWirelessClients(ctx, orgId, nil, nil, &ipAddress, nil, nil, nil, nil, nil, nil, &pskId, nil, nil, nil, nil, nil, &limit, nil, nil, &duration)
if err != nil {
log.Fatalln(err)
} else {
Expand Down Expand Up @@ -671,7 +679,7 @@ if err != nil {
"192.168.0.2"
],
"last_ap": "a83a79a947ee",
"last_devuce": "Mac",
"last_device": "Mac",
"last_firmware": "wl0: Jan 20 2024 04:08:41 version 20.103.12.0.8.7.171 FWID 01-e09d2675",
"last_hostname": "hostname-a",
"last_ip": "10.5.23.43",
Expand Down
23 changes: 11 additions & 12 deletions doc/controllers/orgs-guests.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ UpdateOrgGuestAuthorization(
ctx context.Context,
orgId uuid.UUID,
guestMac string,
body *models.Guest) (
body *models.GuestOrg) (
models.ApiResponse[models.Guest],
error)
```
Expand All @@ -440,7 +440,7 @@ UpdateOrgGuestAuthorization(
| --- | --- | --- | --- |
| `orgId` | `uuid.UUID` | Template, Required | - |
| `guestMac` | `string` | Template, Required | **Constraints**: *Pattern*: `^[0-9a-fA-F]{12}$` |
| `body` | [`*models.Guest`](../../doc/models/guest.md) | Body, Optional | - |
| `body` | [`*models.GuestOrg`](../../doc/models/guest-org.md) | Body, Optional | - |

## Response Type

Expand All @@ -455,17 +455,16 @@ orgId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")

guestMac := "0000000000ab"

body := models.Guest{
body := models.GuestOrg{
Authorized: models.ToPointer(true),
Company: models.ToPointer("string"),
Email: models.ToPointer("user@example.com"),
Field1: models.ToPointer("string"),
Field2: models.ToPointer("string"),
Field3: models.ToPointer("string"),
Field4: models.ToPointer("string"),
Mac: models.ToPointer("string"),
Minutes: models.ToPointer(0),
Name: models.ToPointer("string"),
AuthorizedExpiringTime: models.ToPointer(float64(1480704955)),
AuthorizedTime: models.ToPointer(float64(1480704355)),
Company: models.ToPointer("abc"),
Email: models.ToPointer("john@abc.com"),
Minutes: models.ToPointer(1440),
Name: models.ToPointer("John Smith"),
Ssid: models.ToPointer("Guest-SSID"),
WlanId: uuid.MustParse("6748cfa6-4e12-11e6-9188-0242ac110007"),
}

apiResponse, err := orgsGuests.UpdateOrgGuestAuthorization(ctx, orgId, guestMac, &body)
Expand Down
129 changes: 129 additions & 0 deletions doc/controllers/orgs-stats-sites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Orgs Stats-Sites

```go
orgsStatsSites := client.OrgsStatsSites()
```

## Class Name

`OrgsStatsSites`


# List Org Site Stats

Get List of Org Site Stats

```go
ListOrgSiteStats(
ctx context.Context,
orgId uuid.UUID,
start *int,
end *int,
duration *string,
limit *int,
page *int) (
models.ApiResponse[[]models.StatsSite],
error)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `orgId` | `uuid.UUID` | Template, Required | - |
| `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<br>**Default**: `"1d"` |
| `limit` | `*int` | Query, Optional | **Default**: `100`<br>**Constraints**: `>= 0` |
| `page` | `*int` | Query, Optional | **Default**: `1`<br>**Constraints**: `>= 1` |

## Response Type

[`[]models.StatsSite`](../../doc/models/stats-site.md)

## Example Usage

```go
ctx := context.Background()

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





duration := "10m"

limit := 100

page := 1

apiResponse, err := orgsStatsSites.ListOrgSiteStats(ctx, orgId, nil, nil, &duration, &limit, &page)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
```

## Example Response *(as JSON)*

```json
[
{
"address": "1601 S De Anza Blvd, Cupertino, CA 95014, USA",
"alarmtemplate_id": null,
"analyticEnabled": true,
"aptemplate_id": null,
"country_code": "US",
"created_time": 1472591606,
"engagementEnabled": true,
"gatewaytemplate_id": "e571f2a2-d748-4ad4-bd6c-895467957c21",
"id": "83bc290a-b76d-47fa-a294-d34e47f30f7f",
"lat": 37.295553,
"latlng": {
"lat": 37.295553,
"lng": -122.033007
},
"lng": -122.033007,
"modified_time": 1728057857,
"msp_id": "a9af4951-a1de-4520-b398-c95a58947349",
"name": "Live-Demo",
"networktemplate_id": "964cb213-deb2-469d-8c1e-a5f8661c6886",
"notes": "This site is used for demonstration purposes.",
"num_ap": 17,
"num_ap_connected": 14,
"num_clients": 14,
"num_devices": 26,
"num_devices_connected": 22,
"num_gateway": 1,
"num_gateway_connected": 1,
"num_switch": 8,
"num_switch_connected": 7,
"org_id": "b9814b40-ac4b-4424-86a8-b787eb68b86a",
"rftemplate_id": "2c134c07-3c57-46b3-a53b-8aea92ed7234",
"secpolicy_id": null,
"sitegroup_ids": [
"5644a432-eea9-4a2f-a30a-ddaf4dbc79cf",
"5fc0f305-f626-49db-8869-10b87f201bba",
"882796ef-190b-405e-98ef-cb487140cf64"
],
"sitetemplate_id": null,
"timezone": "America/Los_Angeles",
"tzoffset": 960
}
]
```

## Errors

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 400 | Bad Syntax | [`ResponseHttp400Exception`](../../doc/models/response-http-400-exception.md) |
| 401 | Unauthorized | [`ResponseHttp401ErrorException`](../../doc/models/response-http-401-error-exception.md) |
| 403 | Permission Denied | [`ResponseHttp403ErrorException`](../../doc/models/response-http-403-error-exception.md) |
| 404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | [`ResponseHttp404Exception`](../../doc/models/response-http-404-exception.md) |
| 429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | [`ResponseHttp429ErrorException`](../../doc/models/response-http-429-error-exception.md) |

12 changes: 7 additions & 5 deletions doc/controllers/samples-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ if err != nil {

# Client Info

Webhook sample for `client_info` topic
Webhook sample for `client-info` topic

**Note**: The server host will be your own server FQDN where the Mist Cloud is sending the webhook messages

Expand Down Expand Up @@ -247,10 +247,12 @@ ctx := context.Background()
body := models.WebhookClientInfo{
Events: []models.WebhookClientInfoEvent{
models.WebhookClientInfoEvent{
Mac: models.ToPointer("string"),
OrgId: models.ToPointer(uuid.MustParse("a40f5d1f-d889-42e9-94ea-b9b33585fc6b")),
SiteId: models.ToPointer(uuid.MustParse("72771e6a-6f5e-4de4-a5b9-1266c4197811")),
Timestamp: models.ToPointer(float64(0)),
Hostname: models.ToPointer("service.company.net"),
Ip: models.ToPointer("21.0.128.151"),
Mac: models.ToPointer("6ebaa47a3fd4"),
OrgId: models.ToPointer(uuid.MustParse("0c160b7f-1027-4cd1-923b-744534c4b070")),
SiteId: models.ToPointer(uuid.MustParse("6e77a2ea-d579-471c-9056-5ff5b4ed70ed")),
Timestamp: models.ToPointer(float64(1703003296)),
},
},
Topic: models.ToPointer(models.WebhookClientInfoTopicEnum("client-info")),
Expand Down
2 changes: 1 addition & 1 deletion doc/controllers/sites-clients-wireless.md
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ if err != nil {
"192.168.0.2"
],
"last_ap": "a83a79a947ee",
"last_devuce": "Mac",
"last_device": "Mac",
"last_firmware": "wl0: Jan 20 2024 04:08:41 version 20.103.12.0.8.7.171 FWID 01-e09d2675",
"last_hostname": "hostname-a",
"last_ip": "10.5.23.43",
Expand Down
2 changes: 2 additions & 0 deletions doc/controllers/sites-guests.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,12 @@ siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
guestMac := "0000000000ab"

body := models.Guest{
Authorized: models.ToPointer(true),
AuthorizedExpiringTime: models.ToPointer(float64(1480704955)),
AuthorizedTime: models.ToPointer(float64(1480704355)),
Company: models.ToPointer("abc"),
Email: models.ToPointer("john@abc.com"),
Minutes: models.ToPointer(1440),
Name: models.ToPointer("John Smith"),
Ssid: models.ToPointer("Guest-SSID"),
WlanId: models.ToPointer(uuid.MustParse("6748cfa6-4e12-11e6-9188-0242ac110007")),
Expand Down
4 changes: 2 additions & 2 deletions doc/controllers/sites-stats-wx-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Get Wxlan Rule usage
GetSiteWxRulesUsage(
ctx context.Context,
siteId uuid.UUID) (
models.ApiResponse[[]models.StatsWrule],
models.ApiResponse[[]models.StatsWxrule],
error)
```

Expand All @@ -29,7 +29,7 @@ GetSiteWxRulesUsage(

## Response Type

[`[]models.StatsWrule`](../../doc/models/stats-wrule.md)
[`[]models.StatsWxrule`](../../doc/models/stats-wxrule.md)

## Example Usage

Expand Down
Loading

0 comments on commit c3cb89d

Please sign in to comment.