id: zscaler_zpa
name: Zscaler Private Access
version: 1.0.0
description: "Zscaler Private Access (ZPA config API) — zero-trust inventory and policy visibility: list and read application segments, list servers, server groups and segment groups, and list access policy rules. OAuth2 client-credentials authentication; stdlib-only, no extra Python dependencies."
changelog: "1.0.0 — Initial release: list/get application segments, list servers, server groups, segment groups, access policy rules."
category: network

# Per-instance configuration. Sign in with client_id + client_secret to obtain a
# bearer token; customer_id scopes the config API.
config_schema:
  properties:
    base_url:
      type: string
      description: "ZPA config API base URL"
      default: "https://config.private.zscaler.com"
    client_id:
      type: string
      description: "ZPA API client ID"
    client_secret:
      type: string
      description: "ZPA API client secret"
      x-soar-sensitive: true
    customer_id:
      type: string
      description: "ZPA customer ID"
  required:
    - client_id
    - client_secret
    - customer_id

commands:
  - id: list_application_segments
    name: zpa-list-application-segments
    description: "List application segments."
    risk: read
    inputs_schema:
      properties:
        page: { type: number, description: "Page number (default 1)" }
        page_size: { type: number, description: "Page size (default 20)" }
      required: []
    outputs_schema: { properties: {} }
  - id: get_application_segment
    name: zpa-get-application-segment
    description: "Get a single application segment by ID."
    risk: read
    inputs_schema:
      properties:
        segment_id: { type: string, description: "Application segment ID" }
      required: [segment_id]
    outputs_schema: { properties: {} }
  - id: list_servers
    name: zpa-list-servers
    description: "List application servers."
    risk: read
    inputs_schema:
      properties:
        page: { type: number, description: "Page number (default 1)" }
        page_size: { type: number, description: "Page size (default 20)" }
      required: []
    outputs_schema: { properties: {} }
  - id: list_server_groups
    name: zpa-list-server-groups
    description: "List server groups."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
  - id: list_segment_groups
    name: zpa-list-segment-groups
    description: "List segment groups."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
  - id: list_access_policies
    name: zpa-list-access-policies
    description: "List access policy rules."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }

  - id: test_connection
    name: zpa-test-connection
    description: "Verify the sign-in and API access (used by the Test button)."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
