id: netskope
name: Netskope
version: 1.0.0
description: "Netskope (SASE/CASB REST API v2) — web/cloud containment: list and read URL lists, replace a URL list (block list) and deploy it, and list enrolled users/clients. API-token authentication; stdlib-only, no extra Python dependencies."
changelog: "1.0.0 — Initial release: list/get URL lists, replace URL list, deploy URL lists, list users."
category: network

# Per-instance configuration. The token is sent as the 'Netskope-Api-Token' header.
config_schema:
  properties:
    base_url:
      type: string
      description: "Netskope tenant URL (e.g. https://yourtenant.goskope.com)"
    api_token:
      type: string
      description: "Netskope API v2 token"
      x-soar-sensitive: true
  required:
    - base_url
    - api_token

commands:
  - id: list_url_lists
    name: netskope-list-url-lists
    description: "List URL lists."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
  - id: get_url_list
    name: netskope-get-url-list
    description: "Get a single URL list by ID."
    risk: read
    inputs_schema:
      properties:
        list_id: { type: string, description: "URL list ID" }
      required: [list_id]
    outputs_schema: { properties: {} }
  - id: replace_url_list
    name: netskope-replace-url-list
    description: "Replace the URLs of a URL list (e.g. update a block list)."
    inputs_schema:
      properties:
        list_id: { type: string, description: "URL list ID" }
        name: { type: string, description: "URL list name" }
        urls: { type: string, description: "Comma-separated URLs/domains that become the list" }
        list_type: { type: string, description: "exact or regex (default exact)" }
      required: [list_id, name, urls]
    outputs_schema: { properties: {} }
  - id: deploy_url_lists
    name: netskope-deploy-url-lists
    description: "Deploy pending URL-list changes so they take effect."
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
  - id: list_users
    name: netskope-list-users
    description: "List enrolled users (SCIM)."
    risk: read
    inputs_schema:
      properties:
        limit: { type: number, description: "Max users (default 50)" }
      required: []
    outputs_schema: { properties: {} }

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