Skip to content

Commit 2aaada4

Browse files
authored
Merge pull request #18 from CiscoDevNet/sa-sdk-v2.0.202605140830
Update SDK to v2.0.202605140830 with new Secure Access APIs
2 parents d01e78b + 7fb2653 commit 2aaada4

966 files changed

Lines changed: 71597 additions & 15581 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,73 @@ api_client = ApiClient(configuration=configuration)
5959

6060
To disable retry, omit the `retries` parameter or set it to `None`.
6161

62+
### API Base URL Configuration
63+
64+
The Cisco Secure Access API uses different base URLs depending on the endpoint type. The SDK provides three server configurations:
65+
66+
| Server Index | URL | Use Case |
67+
|---|---|---|
68+
| `0` | `https://api.sse.cisco.com` | Admin, Policy, and Management APIs |
69+
| `1` | `https://api.sse.cisco.com/reports.{region}/v2` | Reporting APIs (with region variable) |
70+
| `2` | `https://api.sse.cisco.com/{basePath}` | Reporting APIs (without region, defaults to `reports/v2`) |
71+
72+
#### Reporting APIs (with region)
73+
74+
Reporting endpoints (e.g., Top Identities, Top Destinations, Activity) require a region-specific base URL. You can configure this using either `server_index` with `server_variables`, or by setting the `host` directly.
75+
76+
**Option 1: Using `server_index` and `server_variables`**
77+
78+
```python
79+
configuration = Configuration(
80+
access_token=access_token,
81+
server_index=1,
82+
server_variables={"region": "us"}, # "us" or "eu"
83+
)
84+
```
85+
86+
**Option 2: Using `host` directly**
87+
88+
```python
89+
configuration = Configuration(
90+
access_token=access_token,
91+
host="https://api.sse.cisco.com/reports.us/v2",
92+
)
93+
```
94+
95+
#### Reporting APIs (without region)
96+
97+
If you do not need region-specific routing, use `server_index=2` which defaults to `reports/v2`.
98+
99+
**Option 1: Using `server_index`**
100+
101+
```python
102+
configuration = Configuration(
103+
access_token=access_token,
104+
server_index=2,
105+
)
106+
```
107+
108+
**Option 2: Using `host` directly**
109+
110+
```python
111+
configuration = Configuration(
112+
access_token=access_token,
113+
host="https://api.sse.cisco.com/reports/v2",
114+
)
115+
```
116+
117+
#### Admin / Policy / Management APIs
118+
119+
Non-reporting endpoints (e.g., Access Rules, Destination Lists, Roaming Computers) use the default base URL (`https://api.sse.cisco.com`, server index `0`). No additional configuration is needed — this is the default when `server_index` and `host` are not specified.
120+
121+
```python
122+
configuration = Configuration(
123+
access_token=access_token,
124+
)
125+
```
126+
127+
> **Note:** If you need to use both reporting and non-reporting APIs in the same script, create separate `Configuration` and `ApiClient` instances for each.
128+
62129
## Examples
63130

64131
The `examples/` folder contains sample scripts demonstrating various use cases with the Cisco Secure Access SDK:

0 commit comments

Comments
 (0)