id: binaryedge
name: BinaryEdge
version: 1.0.0
description: "BinaryEdge (API v2) — internet exposure intelligence: query current and historical open ports/services for an IP, run a search, enumerate a domain's subdomains, check an email against data leaks, and read the subscription quota. API-key authentication; stdlib-only, no extra Python dependencies."
changelog: "1.0.0 — Initial release: host lookup (current/historical), search, domain subdomains, data-leak email check, subscription."
category: enrichment

# Per-instance configuration. The API key is sent as the 'X-Key' header.
config_schema:
  properties:
    api_key:
      type: string
      description: "BinaryEdge API key"
      x-soar-sensitive: true
  required:
    - api_key

commands:
  - id: host
    name: binaryedge-host
    description: "Get the most recent open ports and services for an IP."
    risk: read
    inputs_schema:
      properties:
        ip: { type: string, description: "IP address" }
      required: [ip]
    outputs_schema: { properties: {} }
  - id: host_historical
    name: binaryedge-host-historical
    description: "Get historical open ports and services for an IP."
    risk: read
    inputs_schema:
      properties:
        ip: { type: string, description: "IP address" }
      required: [ip]
    outputs_schema: { properties: {} }
  - id: search
    name: binaryedge-search
    description: "Search hosts/services by a BinaryEdge query."
    risk: read
    inputs_schema:
      properties:
        query: { type: string, description: "BinaryEdge search query (e.g. type:elasticsearch)" }
        page: { type: number, description: "Page number (default 1)" }
      required: [query]
    outputs_schema: { properties: {} }
  - id: domain_subdomains
    name: binaryedge-domain-subdomains
    description: "List a domain's known subdomains."
    risk: read
    inputs_schema:
      properties:
        domain: { type: string, description: "Domain name" }
        page: { type: number, description: "Page number (default 1)" }
      required: [domain]
    outputs_schema: { properties: {} }
  - id: dataleaks_email
    name: binaryedge-dataleaks-email
    description: "Check whether an email appears in known data leaks."
    risk: read
    inputs_schema:
      properties:
        email: { type: string, description: "Email address" }
      required: [email]
    outputs_schema: { properties: {} }

  - id: test_connection
    name: binaryedge-test-connection
    description: "Verify the API key via the subscription endpoint (used by the Test button)."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
