Skip to content

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Jul 9, 2024
1 parent 8942932 commit fb2388f
Show file tree
Hide file tree
Showing 6,112 changed files with 292,506 additions and 1,088,417 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
15 changes: 8 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2024 Thomas Munzer
License:
========
The MIT License (MIT)
http://opensource.org/licenses/MIT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +10,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2,721 changes: 302 additions & 2,419 deletions README.md

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions doc/auth/basic-authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

# Basic Authentication



Documentation for accessing and setting credentials for basicAuth.

## Auth Credentials

| Name | Type | Description | Setter | Getter |
| --- | --- | --- | --- | --- |
| Username | `string` | The username to use with basic authentication | `WithUsername` | `Username` |
| Password | `string` | The password to use with basic authentication | `WithPassword` | `Password` |



**Note:** Required auth credentials can be set using `WithBasicAuthCredentials()` by providing a credentials instance with `NewBasicAuthCredentials()` in the configuration initialization and accessed using the `BasicAuthCredentials()` method in the configuration instance.

## Usage Example

### Client Initialization

You must provide credentials in the client as shown in the following code snippet.

```go
client := mistapi.NewClient(
mistapi.CreateConfiguration(
mistapi.WithBasicAuthCredentials(
mistapi.NewBasicAuthCredentials(
"Username",
"Password",
),
),
),
)
```


34 changes: 34 additions & 0 deletions doc/auth/custom-header-signature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# Custom Header Signature



Documentation for accessing and setting credentials for apiToken.

## Auth Credentials

| Name | Type | Description | Setter | Getter |
| --- | --- | --- | --- | --- |
| Authorization | `string` | Like many other API providers, it’s also possible to generate API Tokens to be used (in HTTP Header) for authentication. An API token ties to a Admin with equal or less privileges.<br><br>**Format**:<br>API Token value format is `Token {apitoken}`<br><br>**Notes**:<br><br>* an API token generated for a specific admin has the same privilege as the user<br>* an API token will be automatically removed if not used for > 90 days<br>* SSO admins cannot generate these API tokens. Refer Org level API tokens which can have privileges of a specific Org/Site for more information. | `WithAuthorization` | `Authorization` |



**Note:** Required auth credentials can be set using `WithApiTokenCredentials()` by providing a credentials instance with `NewApiTokenCredentials()` in the configuration initialization and accessed using the `ApiTokenCredentials()` method in the configuration instance.

## Usage Example

### Client Initialization

You must provide credentials in the client as shown in the following code snippet.

```go
client := mistapi.NewClient(
mistapi.CreateConfiguration(
mistapi.WithApiTokenCredentials(
mistapi.NewApiTokenCredentials("Authorization"),
),
),
)
```


228 changes: 228 additions & 0 deletions doc/client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@

# Client Class Documentation

The following parameters are configurable for the API Client:

| Parameter | Type | Description |
| --- | --- | --- |
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.MIST_GLOBAL_01`** |
| `httpConfiguration` | [`HttpConfiguration`](http-configuration.md) | Configurable http client options like timeout and retries. |
| `loggerConfiguration` | [`LoggerConfiguration`](logger-configuration.md) | Represents the logger configurations for API calls |
| `apiTokenCredentials` | [`ApiTokenCredentials`](auth/custom-header-signature.md) | The Credentials Setter for Custom Header Signature |
| `basicAuthCredentials` | [`BasicAuthCredentials`](auth/basic-authentication.md) | The Credentials Setter for Basic Authentication |

The API client can be initialized as follows:

```go
client := mistapi.NewClient(
mistapi.CreateConfiguration(
mistapi.WithHttpConfiguration(
mistapi.CreateHttpConfiguration(
mistapi.WithTimeout(0),
),
),
mistapi.WithEnvironment(mistapi.MIST_GLOBAL_01),
mistapi.WithApiTokenCredentials(
mistapi.NewApiTokenCredentials("Authorization"),
),
mistapi.WithBasicAuthCredentials(
mistapi.NewBasicAuthCredentials(
"Username",
"Password",
),
),
mistapi.WithLoggerConfiguration(
mistapi.WithLevel("info"),
mistapi.WithRequestConfiguration(
mistapi.WithRequestBody(true),
),
mistapi.WithResponseConfiguration(
mistapi.WithResponseHeaders(true),
),
),
),
)
```

## Mist API Client

The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK.

## Controllers

| Name | Description |
| --- | --- |
| orgs | Gets Orgs |
| orgsAPTemplates | Gets OrgsAPTemplates |
| orgsAPITokens | Gets OrgsAPITokens |
| orgsAdmins | Gets OrgsAdmins |
| orgsAlarmTemplates | Gets OrgsAlarmTemplates |
| orgsAlarms | Gets OrgsAlarms |
| orgsAssetFilters | Gets OrgsAssetFilters |
| orgsAssets | Gets OrgsAssets |
| orgsCRL | Gets OrgsCRL |
| orgsCert | Gets OrgsCert |
| orgsClientsMarvis | Gets OrgsClientsMarvis |
| orgsClientsNAC | Gets OrgsClientsNAC |
| orgsClientsSDK | Gets OrgsClientsSDK |
| orgsClientsWan | Gets OrgsClientsWan |
| orgsClientsWired | Gets OrgsClientsWired |
| orgsClientsWireless | Gets OrgsClientsWireless |
| orgsCradlepoint | Gets OrgsCradlepoint |
| orgsDeviceProfiles | Gets OrgsDeviceProfiles |
| orgsDevices | Gets OrgsDevices |
| orgsDevicesOthers | Gets OrgsDevicesOthers |
| orgsDevicesSSR | Gets OrgsDevicesSSR |
| orgsDevicesWANCluster | Gets OrgsDevicesWANCluster |
| orgsDevicesStats | Gets OrgsDevicesStats |
| orgsDevicesZscaler | Gets OrgsDevicesZscaler |
| orgsEVPNTopologies | Gets OrgsEVPNTopologies |
| orgsGatewayTemplates | Gets OrgsGatewayTemplates |
| orgsGuests | Gets OrgsGuests |
| orgsIDPProfiles | Gets OrgsIDPProfiles |
| orgsInventory | Gets OrgsInventory |
| orgsJSE | Gets OrgsJSE |
| orgsJSI | Gets OrgsJSI |
| orgsLicenses | Gets OrgsLicenses |
| orgsLinkedApplications | Gets OrgsLinkedApplications |
| orgsLogs | Gets OrgsLogs |
| orgsMaps | Gets OrgsMaps |
| orgsMarvis | Gets OrgsMarvis |
| orgsMxClusters | Gets OrgsMxClusters |
| orgsMxEdges | Gets OrgsMxEdges |
| orgsMxTunnels | Gets OrgsMxTunnels |
| orgsNACCRL | Gets OrgsNACCRL |
| orgsNACIDP | Gets OrgsNACIDP |
| orgsNACPortals | Gets OrgsNACPortals |
| orgsNACRules | Gets OrgsNACRules |
| orgsNACTags | Gets OrgsNACTags |
| orgsNetworkTemplates | Gets OrgsNetworkTemplates |
| orgsNetworks | Gets OrgsNetworks |
| orgsPremiumAnalytics | Gets OrgsPremiumAnalytics |
| orgsPskPortals | Gets OrgsPskPortals |
| orgsPsks | Gets OrgsPsks |
| orgsRFTemplates | Gets OrgsRFTemplates |
| orgsSDKInvites | Gets OrgsSDKInvites |
| orgsSDKTemplates | Gets OrgsSDKTemplates |
| orgsSLEs | Gets OrgsSLEs |
| orgsSSO | Gets OrgsSSO |
| orgsSSORoles | Gets OrgsSSORoles |
| orgsSecPolicies | Gets OrgsSecPolicies |
| orgsServicePolicies | Gets OrgsServicePolicies |
| orgsServices | Gets OrgsServices |
| orgsSetting | Gets OrgsSetting |
| orgsSiteTemplates | Gets OrgsSiteTemplates |
| orgsSitegroups | Gets OrgsSitegroups |
| orgsSites | Gets OrgsSites |
| orgsSubscriptions | Gets OrgsSubscriptions |
| orgsTickets | Gets OrgsTickets |
| orgsTunnels | Gets OrgsTunnels |
| orgsUserMACs | Gets OrgsUserMACs |
| orgsVPNs | Gets OrgsVPNs |
| orgsVars | Gets OrgsVars |
| orgsWLANTemplates | Gets OrgsWLANTemplates |
| orgsWebhooks | Gets OrgsWebhooks |
| orgsWlans | Gets OrgsWlans |
| orgsWxRules | Gets OrgsWxRules |
| orgsWxTags | Gets OrgsWxTags |
| orgsWxTunnels | Gets OrgsWxTunnels |
| utilitiesPCAPs | Gets UtilitiesPCAPs |
| utilitiesUpgrade | Gets UtilitiesUpgrade |
| utilitiesWiFi | Gets UtilitiesWiFi |
| installer | Gets Installer |
| admins | Gets Admins |
| adminsLogin | Gets AdminsLogin |
| adminsLoginOAuth2 | Gets AdminsLoginOAuth2 |
| adminsLogout | Gets AdminsLogout |
| adminsLookup | Gets AdminsLookup |
| adminsRecoverPassword | Gets AdminsRecoverPassword |
| constantsDefinitions | Gets ConstantsDefinitions |
| constantsEvents | Gets ConstantsEvents |
| constantsMisc | Gets ConstantsMisc |
| constantsModels | Gets ConstantsModels |
| samplesWebhook | Gets SamplesWebhook |
| selfAPIToken | Gets SelfAPIToken |
| selfAccount | Gets SelfAccount |
| selfAlarms | Gets SelfAlarms |
| selfAuditLogs | Gets SelfAuditLogs |
| selfMFA | Gets SelfMFA |
| selfOAuth2 | Gets SelfOAuth2 |
| mSPs | Gets MSPs |
| mSPsAdmins | Gets MSPsAdmins |
| mSPsInventory | Gets MSPsInventory |
| mSPsLicenses | Gets MSPsLicenses |
| mSPsLogo | Gets MSPsLogo |
| mSPsLogs | Gets MSPsLogs |
| mSPsMarvis | Gets MSPsMarvis |
| mSPsOrgGroups | Gets MSPsOrgGroups |
| mSPsOrgs | Gets MSPsOrgs |
| mSPsSLEs | Gets MSPsSLEs |
| mSPsSSO | Gets MSPsSSO |
| mSPsSSORoles | Gets MSPsSSORoles |
| mSPsTickets | Gets MSPsTickets |
| sites | Gets Sites |
| sitesAPTemplates | Gets SitesAPTemplates |
| sitesAlarms | Gets SitesAlarms |
| sitesAnomaly | Gets SitesAnomaly |
| sitesApplications | Gets SitesApplications |
| sitesAssetFilters | Gets SitesAssetFilters |
| sitesAssets | Gets SitesAssets |
| sitesBeacons | Gets SitesBeacons |
| sitesCalls | Gets SitesCalls |
| sitesClientsNAC | Gets SitesClientsNAC |
| sitesClientsSDK | Gets SitesClientsSDK |
| sitesClientsWan | Gets SitesClientsWan |
| sitesClientsWired | Gets SitesClientsWired |
| sitesClientsWireless | Gets SitesClientsWireless |
| sitesDeviceProfiles | Gets SitesDeviceProfiles |
| sitesDevices | Gets SitesDevices |
| sitesDevicesDiscoveredSwitches | Gets SitesDevicesDiscoveredSwitches |
| sitesDevicesOthers | Gets SitesDevicesOthers |
| sitesDevicesWANCluster | Gets SitesDevicesWANCluster |
| sitesDevicesWired | Gets SitesDevicesWired |
| sitesDevicesWiredVirtualChassis | Gets SitesDevicesWiredVirtualChassis |
| sitesDevicesWireless | Gets SitesDevicesWireless |
| sitesDevicesStats | Gets SitesDevicesStats |
| sitesEVPNTopologies | Gets SitesEVPNTopologies |
| sitesEvents | Gets SitesEvents |
| sitesGatewayTemplates | Gets SitesGatewayTemplates |
| sitesGuests | Gets SitesGuests |
| sitesInsights | Gets SitesInsights |
| sitesJSE | Gets SitesJSE |
| sitesLicenses | Gets SitesLicenses |
| sitesLocation | Gets SitesLocation |
| sitesMaps | Gets SitesMaps |
| sitesMapsAutoOrientation | Gets SitesMapsAutoOrientation |
| sitesMapsAutoPlacement | Gets SitesMapsAutoPlacement |
| sitesMxEdges | Gets SitesMxEdges |
| sitesNetworkTemplates | Gets SitesNetworkTemplates |
| sitesNetworks | Gets SitesNetworks |
| sitesPsks | Gets SitesPsks |
| sitesRFTemplates | Gets SitesRFTemplates |
| sitesRRM | Gets SitesRRM |
| sitesRSSIZones | Gets SitesRSSIZones |
| sitesRfdiags | Gets SitesRfdiags |
| sitesRogues | Gets SitesRogues |
| sitesSLEs | Gets SitesSLEs |
| sitesServicePolicies | Gets SitesServicePolicies |
| sitesServices | Gets SitesServices |
| sitesSetting | Gets SitesSetting |
| sitesSiteTemplates | Gets SitesSiteTemplates |
| sitesSkyatp | Gets SitesSkyatp |
| sitesSyntheticTests | Gets SitesSyntheticTests |
| sitesUISettings | Gets SitesUISettings |
| sitesVPNs | Gets SitesVPNs |
| sitesWANUsages | Gets SitesWANUsages |
| sitesWebhooks | Gets SitesWebhooks |
| sitesWlans | Gets SitesWlans |
| sitesWxRules | Gets SitesWxRules |
| sitesWxTags | Gets SitesWxTags |
| sitesWxTunnels | Gets SitesWxTunnels |
| sitesZones | Gets SitesZones |
| sitesVBeacons | Gets SitesVBeacons |
| utilitiesCommon | Gets UtilitiesCommon |
| utilitiesLAN | Gets UtilitiesLAN |
| utilitiesLocation | Gets UtilitiesLocation |
| utilitiesMxEdge | Gets UtilitiesMxEdge |
| utilitiesWAN | Gets UtilitiesWAN |

Loading

0 comments on commit fb2388f

Please sign in to comment.