### Getting Started with Zscaler Client Connector API
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zscaler-client-connector/administration.md
This guide explains how to get started with the Zscaler Client Connector API, including initial setup and authentication.
```APIDOC
## GET /zscaler-client-connector/getting-started-client-connector-api
### Description
Provides initial steps and prerequisites for using the Zscaler Client Connector API. This includes obtaining API credentials and understanding basic authentication mechanisms.
### Method
GET
### Endpoint
/zscaler-client-connector/getting-started-client-connector-api
### Parameters
None
### Request Example
None
### Response
#### Success Response (200)
- **content** (string) - Markdown content detailing the getting started guide.
```
--------------------------------
### ZPA API - Getting Started
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/cloud-branch-connector/authentication.md
A guide for new users to begin working with the ZPA API, covering initial setup, authentication, and basic operations.
```APIDOC
## Getting Started with the ZPA API
### Description
This guide covers the essential steps to start using the ZPA API, including prerequisites, authentication methods, and making your first API calls.
### Method
N/A (Informational)
### Endpoint
N/A (Informational)
### Parameters
N/A
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Zscaler Client Connector API: Getting Started Guide
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zpa.md
This guide provides an introduction to the Zscaler Client Connector API, outlining the initial steps required for developers to begin integrating with the API. It may cover setup, authentication, and basic usage patterns.
```text
This section details how to get started with the Zscaler Client Connector API. It includes information on prerequisites, obtaining API credentials, and making your first API call. Dependencies typically involve having a Zscaler account and necessary administrative privileges.
```
--------------------------------
### ZPA API - Getting Started
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zpa/authentication.md
A guide to help you get started with the ZPA API, including prerequisites, authentication methods, and basic usage patterns.
```APIDOC
## ZPA API - Getting Started
### Description
This guide provides the foundational information needed to begin using the ZPA API. It covers essential steps like setting up your environment, understanding authentication, and making your first API calls.
### Method
N/A (Informational)
### Endpoint
N/A (Informational)
### Parameters
N/A
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Microtenant Example GET
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zpa/getting-started-zpa-api.md
Retrieves a list of microtenants with pagination details. This endpoint is useful for fetching all configured microtenants within the Zscaler environment.
```APIDOC
## GET /api/v1/microtenants
### Description
Retrieves a list of microtenants, including pagination information like total pages and count.
### Method
GET
### Endpoint
/api/v1/microtenants
### Query Parameters
- **page** (integer) - Optional - The page number to retrieve.
- **pageSize** (integer) - Optional - The number of items per page.
- **search** (string) - Optional - A search term to filter microtenants by name or description.
### Request Example
```
GET /api/v1/microtenants?page=1&pageSize=20&search=example
```
### Response
#### Success Response (200)
- **totalPages** (string) - The total number of pages available.
- **totalCount** (string) - The total number of microtenants found.
- **list** (array) - An array of microtenant objects.
- **modifiedTime** (string) - The time the microtenant was last modified.
- **creationTime** (string) - The time the microtenant was created.
- **modifiedBy** (string) - The ID of the user who last modified the microtenant.
- **id** (string) - The unique identifier of the microtenant.
- **domainNames** (array) - An array of domain names associated with the microtenant.
- **name** (string) - The name of the microtenant.
- **description** (string) - A description of the microtenant.
- **serverGroups** (array) - An array of server group objects associated with the microtenant.
- **id** (string) - The unique identifier of the server group.
- **modifiedTime** (string) - The time the server group was last modified.
- **creationTime** (string) - The time the server group was created.
- **modifiedBy** (string) - The ID of the user who last modified the server group.
- **name** (string) - The name of the server group.
- **enabled** (boolean) - Indicates if the server group is enabled.
- **description** (string) - A description of the server group.
- **configSpace** (string) - The configuration space of the server group.
- **dynamicDiscovery** (boolean) - Indicates if dynamic discovery is enabled for the server group.
- **enabled** (boolean) - Indicates if the microtenant is enabled.
- **passiveHealthEnabled** (boolean) - Indicates if passive health monitoring is enabled.
- **doubleEncrypt** (boolean) - Indicates if double encryption is enabled.
- **configSpace** (string) - The configuration space of the microtenant.
- **bypassType** (string) - The bypass type for the microtenant.
- **healthCheckType** (string) - The health check type for the microtenant.
- **icmpAccessType** (string) - The ICMP access type for the microtenant.
- **isCnameEnabled** (boolean) - Indicates if CNAME is enabled.
- **ipAnchored** (boolean) - Indicates if IP anchoring is enabled.
- **bypassOnReauth** (boolean) - Indicates if bypass on reauthentication is enabled.
- **inspectTrafficWithZia** (boolean) - Indicates if traffic inspection with ZIA is enabled.
- **healthReporting** (string) - The health reporting method.
- **useInDrMode** (boolean) - Indicates if the microtenant is used in DR mode.
- **tcpKeepAlive** (string) - The TCP keep-alive setting.
- **selectConnectorCloseToApp** (boolean) - Indicates if connector selection is optimized for proximity to the app.
- **isIncompleteDRConfig** (boolean) - Indicates if there is an incomplete DR configuration.
- **adpEnabled** (boolean) - Indicates if ADP is enabled.
- **microtenantName** (string) - The name of the microtenant.
- **segmentGroupId** (string) - The ID of the segment group.
- **segmentGroupName** (string) - The name of the segment group.
#### Response Example
```json
{
"totalPages": "526",
"totalCount": "1",
"list": [
{
"modifiedTime": "1706698881",
"creationTime": "1679251696",
"modifiedBy": "72057594038640698",
"id": "72057594038642786",
"domainNames": [
"es10.com"
],
"name": "10002ADPDemo21",
"description": "example description",
"serverGroups": [
{
"id": "72057594037988579",
"modifiedTime": "1698311146",
"creationTime": "1612438082",
"modifiedBy": "72057594038620086",
"name": "123",
"enabled": true,
"description": "/>
",
"configSpace": "DEFAULT",
"dynamicDiscovery": true
}
],
"enabled": true,
"passiveHealthEnabled": true,
"doubleEncrypt": false,
"configSpace": "DEFAULT",
"bypassType": "ALWAYS",
"healthCheckType": "NONE",
"icmpAccessType": "NONE",
"isCnameEnabled": false,
"ipAnchored": false,
"bypassOnReauth": false,
"inspectTrafficWithZia": false,
"healthReporting": "NONE",
"useInDrMode": false,
"tcpKeepAlive": "1",
"selectConnectorCloseToApp": false,
"isIncompleteDRConfig": false,
"adpEnabled": false,
"microtenantName": "Default",
"segmentGroupId": "72057594038634881",
"segmentGroupName": "1SEG-GRP"
}
]
}
```
```
--------------------------------
### ZPC API GET Request Example
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zpc/getting-started-zpc-api.md
This example shows how to retrieve cloud alerts using a GET request to the ZPC API. It includes the necessary headers, such as the API key and content type, and specifies the host URL.
```http
GET /api/v1/alerts/cloud HTTP/1.1
Host: api.zpccloud.net
Content-Type: application/json
x-api-key: xxxxxxx
Cache-Control: no-cache
```
--------------------------------
### Zscaler Client Connector API - Getting Started
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zpa.md
This section provides instructions on how to get started with the Zscaler Client Connector API.
```APIDOC
## Getting Started
### Description
This guide covers the initial steps required to begin using the Zscaler Client Connector API.
### Method
N/A
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Zscaler Client Connector API - Getting Started
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zpa/authentication.md
This guide provides essential information for developers to begin using the Zscaler Client Connector API.
```APIDOC
## Zscaler Client Connector API - Getting Started
### Description
This document outlines the initial steps and prerequisites for integrating with the Zscaler Client Connector API. It covers setup, authentication, and basic usage patterns to help developers get started quickly.
### Method
N/A (Informational Guide)
### Endpoint
N/A (Informational Guide)
### Parameters
N/A
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Zscaler Client Connector API - Getting Started
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/cloud-branch-connector/authentication.md
This document provides instructions and information to help you get started with the Zscaler Client Connector API.
```APIDOC
## Getting Started with Zscaler Client Connector API
### Description
This guide covers the initial steps and prerequisites for using the Zscaler Client Connector API. It includes information on how to set up your environment and make your first API calls.
### Method
N/A (Informational Guide)
### Endpoint
N/A (Informational Guide)
### Parameters
N/A
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Secure Key Management
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zscaler-client-connector/getting-started-client-connector-api.md
Recommendations for managing API keys securely by creating dedicated users for each script and avoiding concurrent key usage.
```APIDOC
## Secure Key Management
### Description
To enhance security and prevent potential conflicts, it is recommended to create a dedicated API user for each script or application. Avoid using the same API keys in multiple scripts that are running concurrently. This practice helps in isolating access and simplifies key revocation if necessary.
### Method
N/A
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Zscaler API GET Request Example (/ecgroup)
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/cloud-branch-connector/getting-started-cloud-branch-connector-api.md
This example demonstrates how to make a GET request to the /ecgroup endpoint of the Zscaler API. It includes necessary headers such as Content-Type, X-CSRF-Token, Accept, Host, and the JSESSIONID cookie. This request retrieves a list of Cloud & Branch Connector groups.
```http
GET /api/v1/ecgroup HTTP/1.1
Content-Type: application/json
X-CSRF-Token: {{token}}
Accept: */*
Host: connector.zscalertwo.net
Cookie: JSESSIONID=E50F625E715B54BC228F9EE36F93F6E9; ZS_SESSION_CODE=1046360416
```
--------------------------------
### Zscaler Client Connector VDI Installation Command
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/unified/customizing-zscaler-client-connector-install-options-exe.md
Example command for installing Zscaler Client Connector in a VDI environment. It utilizes parameters to configure VDI support, set a configuration timeout for roaming profiles, install the LWF driver, and ensure the LWF driver starts at boot.
```bash
--vdi 1 --configTimeout 300 --installLWFDriver 1 --LWFBootStart 1
```
--------------------------------
### Best Practices for Resource Updates
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zscaler-client-connector/getting-started-client-connector-api.md
Learn how to properly update resources by performing a GET request before a PUT or POST request to avoid data inconsistencies.
```APIDOC
## Best Practices for Resource Updates
### Description
When updating a resource, always send a `GET` request before the `PUT` or `POST` request. This retrieves the current values for the resource before you update the entire resource with new values. After the update, the next `GET` request for that resource returns the new values. By using this practice, you avoid potentially missing updates between `GET` and `PUT` or `POST` calls.
### Method
GET, PUT, POST
### Endpoint
`/resource/{resourceId}` (Example)
### Parameters
N/A
### Request Example
```
// Step 1: Get current resource values
GET /resource/{resourceId}
// Step 2: Update resource with new values
PUT /resource/{resourceId} or POST /resource/{resourceId}
{
"field1": "newValue"
}
// Step 3: Verify updated values
GET /resource/{resourceId}
```
### Response
#### Success Response (200)
- **field1** (type) - Description of the field
- **updatedField** (type) - Description of the updated field
#### Response Example
```json
{
"field1": "currentValue",
"updatedField": "newValue"
}
```
```
--------------------------------
### ZPA API Overview
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zpa.md
Provides a general overview of the ZPA API, including guides on getting started, understanding its functionalities, and configuring development tools.
```APIDOC
## ZPA API
### Description
This section covers the fundamental aspects of the ZPA API, including how to get started, set up development environments, and understand API behavior.
### Endpoints
- **/zpa/understanding-zpa-api**: General understanding of the ZPA API.
- **/zpa/getting-started-zpa-api**: Guide for new users to begin with the ZPA API.
- **/zpa/configuring-postman-rest-api-client**: Instructions for configuring Postman for ZPA API interactions.
- **/zpa/understanding-rate-limiting**: Information on API rate limits and how to manage them.
- **/zpa/api-response-codes-and-error-messages**: Details on API response codes and common error messages.
```
--------------------------------
### Zscaler Client Connector API - Getting Started
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zia.md
Provides an overview and initial steps for using the Zscaler Client Connector API.
```APIDOC
## Zscaler Client Connector API
### Description
This section covers the initial steps and concepts for developers looking to integrate with or utilize the Zscaler Client Connector API.
### Endpoint
N/A (Conceptual Guide)
### Parameters
N/A
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Authenticate ZDX API to get Bearer Token (Python)
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zdx/getting-started-zdx-api.md
This Python example demonstrates how to authenticate with the ZDX API using your API key ID and secret to obtain a bearer token. It sends a POST request to the '/oauth/token' endpoint and requires the 'requests' library.
```python
import requests
import json
key_id = "YOUR_KEY_ID"
key_secret = "YOUR_KEY_SECRET"
url = "https://api.zdxcloud.net/v1/oauth/token"
headers = {
"Content-Type": "application/json",
"Accept": "application/json"
}
data = {
"key_id": key_id,
"key_secret": key_secret
}
response = requests.post(url, headers=headers, data=json.dumps(data))
if response.status_code == 200:
token_data = response.json()
access_token = token_data['token']
print(f"Successfully obtained bearer token: {access_token}")
else:
print(f"Error obtaining token: {response.status_code} - {response.text}")
```
--------------------------------
### Start Zscaler PreLogin Tunnel
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zsdk/zsdk-integration-guide-android.md
Initiates the pre-login tunnel for the Zscaler SDK. Requires application key and device UDID. Errors during tunnel setup are logged.
```kotlin
// Define function to start the PreLogin tunnel
fun startPreLoginTunnel(zdkId: String,
udid : String,
onErrorOccurred: (errorCode: Int) -> Unit) {
viewModelScope.launch(Dispatchers.IO) {
try {
ZscalerSDK.startPreLoginTunnel(appKey = appKey, deviceUdid = udid)
Log.d(TAG, "startPreLoginTunnel completed")
} catch (e: Exception) {
Log.e(TAG, "startPreLoginTunnel() failed with exception :: ${e.message}")
}
}
}
```
--------------------------------
### Get All Application Segments
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zpa/getting-started-zpa-api.md
Retrieves a list of all application segments configured within your ZPA tenant. This endpoint supports pagination and searching.
```APIDOC
## GET /mgmtconfig/v1/admin/customers/{customerId}/application
### Description
Fetches a list of all application segments. You can paginate results using `page` and `pagesize` query parameters and filter results using the `search` parameter.
### Method
GET
### Endpoint
`https://config.private.zscaler.com/mgmtconfig/v1/admin/customers/{customerId}/application`
### Parameters
#### Path Parameters
- **customerId** (string) - Required - The ZPA tenant ID of the customer.
#### Query Parameters
- **page** (integer) - Optional - The page number for paginated results. Defaults to 1.
- **pagesize** (integer) - Optional - The number of results per page. Defaults to 20.
- **search** (string) - Optional - A search term to filter application segments by name or domain.
### Request Example
```python
import requests
customerId = "{your_customer_id}"
url = f"https://config.private.zscaler.com/mgmtconfig/v1/admin/customers/{customerId}/application?page=1&pagesize=20&search="
headers = {
'Authorization': 'Bearer {your_access_token}'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
```
### Response
#### Success Response (200)
- **totalPages** (string) - The total number of pages available for the query.
- **list** (array) - An array of application segment objects.
- **creationTime** (string) - The timestamp when the application segment was created.
- **modifiedBy** (string) - The ID of the user who last modified the application segment.
- **id** (string) - The unique identifier of the application segment.
- **domainNames** (array) - A list of domain names associated with the application segment.
- **name** (string) - The name of the application segment.
- **serverGroups** (array) - A list of server groups associated with the application segment.
- **id** (string) - The ID of the server group.
- **creationTime** (string) - The timestamp when the server group was created.
#### Response Example
```json
{
"totalPages": "1",
"list": [
{
"creationTime": "1617135729",
"modifiedBy": "7207654021241",
"id": "7207654021241",
"domainNames": [
"example.com"
],
"name": "example",
"serverGroups": [
{
"id": "7207654021241",
"creationTime": "1617134731"
}
]
}
]
}
```
```
--------------------------------
### GET /scim/{{userdb}}/{{idpId}}/v2/Groups
Source: https://github.com/nyvqwd22f5-gif/zscaler-api/blob/main/zidentity/scim-api-examples.md
Fetches a list of groups with support for pagination and sorting. You can specify the starting index, the number of items per page, and the sorting criteria.
```APIDOC
## GET /scim/{{userdb}}/{{idpId}}/v2/Groups
### Description
Fetches a list of groups with pagination and sorting capabilities.
### Method
GET
### Endpoint
https://{{hostname}}/scim/{{userdb}}/{{idpId}}/v2/Groups
#### Query Parameters
- **startIndex** (integer) - Optional - The starting index for pagination.
- **count** (integer) - Optional - The number of items to return per page.
- **sortBy** (string) - Optional - The field to sort the results by (e.g., `displayName`).
- **sortOrder** (string) - Optional - The order of sorting (`ascending` or `descending`).
### Request Example
```bash
curl --location --request GET 'https://scim1.private.zscaler.com/scim/1/144118148382065427/v2/Groups?startIndex=1&count=10&sortBy=displayName&sortOrder=descending' \
--header 'Authorization: Bearer '
```
### Response
#### Success Response (200)
- **schemas** (array) - List of schema URIs.
- **startIndex** (integer) - The starting index of the returned results.
- **totalResults** (integer) - The total number of results available.
- **itemsPerPage** (integer) - The number of items returned per page.
- **Resources** (array) - An array of group objects.
- **schemas** (array) - List of schema URIs for the group.
- **id** (string) - The unique identifier for the group.
- **externalId** (string) - An external identifier for the group.
- **displayName** (string) - The display name of the group.
- **meta** (object) - Metadata about the group.
- **created** (string) - The creation timestamp.
- **lastModified** (string) - The last modification timestamp.
- **location** (string) - The URL to access the group resource.
- **resourceType** (string) - The type of resource.
#### Response Example
```json
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"startIndex": 1,
"totalResults": 2,
"itemsPerPage": 10,
"Resources": [
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"id": "205717",
"externalId": "grp100",
"displayName": "Exammple Name",
"meta": {
"created": "2021-05-14T20:59:04Z",
"lastModified": "2021-05-14T20:59:54Z",
"location": "https://scim1.private.zscaler.com/scim/1/144118148382065427/v2/Groups/205717",
"resourceType": "Group"
}
},
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"id": "205808",
"externalId": "grp-3",
"displayName": "Example Name33",
"meta": {
"created": "2021-05-17T16:31:47Z",
"lastModified": "2021-06-03T20:31:02Z",
"location": "https://scim1.private.zscaler.com/scim/1/144118148382065427/v2/Groups/205808",
"resourceType": "Group"
}
}
]
}
```
```