Skip to content

fix: use investigate/v2 API path for domain tools#13

Open
ymeloch wants to merge 1 commit into
CiscoDevNet:mainfrom
ymeloch:fix/investigate-domain-endpoints
Open

fix: use investigate/v2 API path for domain tools#13
ymeloch wants to merge 1 commit into
CiscoDevNet:mainfrom
ymeloch:fix/investigate-domain-endpoints

Conversation

@ymeloch

@ymeloch ymeloch commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes the get_domain_categorization and investigate_domain tools, which called non-existent security/v1/domains/{domain}/... routes and always failed with 404 "no Route matched".
  • Switches both tools to the correct Cisco Secure Access Investigate API scope (investigate/v2) and path order (resource before domain).
  • URL-encodes the domain argument before interpolating it into the request path, and removes the now-unused SECURITY_SCOPE constant.

Closes #12

Details

Before:

await client.get(SECURITY_SCOPE, f"domains/{domain}/categorization")  # security/v1 -> 404
await client.get(SECURITY_SCOPE, f"domains/{domain}/risk-score")      # security/v1 -> 404

After:

safe_domain = quote(domain, safe="")
await client.get(INVESTIGATE_SCOPE, f"domains/categorization/{safe_domain}")
await client.get(INVESTIGATE_SCOPE, f"domains/risk-score/{safe_domain}")

Endpoints now match the documented Investigate API:

  • GET https://api.sse.cisco.com/investigate/v2/domains/categorization/{domain}
  • GET https://api.sse.cisco.com/investigate/v2/domains/risk-score/{domain}

See the Cisco DevNet Investigate API overview and API changelog.

Test plan

  • get_domain_categorization("example.com") returns {"example.com": {"status": 0, "content_categories": ["54", "188"]}} against a live tenant (previously 404).
  • investigate_domain returns a risk-score payload for a domain (same scope/path-order fix; requires Investigate access tier that exposes risk-score).

Made with Cursor

investigate_domain and get_domain_categorization called the
non-existent security/v1/domains/{domain}/{risk-score,categorization}
routes, which the Cisco Secure Access API gateway rejects with
404 "no Route matched".

Per the Secure Access Investigate API, these live under the
investigate/v2 scope with the resource before the domain:
  GET investigate/v2/domains/risk-score/{domain}
  GET investigate/v2/domains/categorization/{domain}

Also URL-encode the domain before interpolating it into the path,
and drop the now-unused SECURITY_SCOPE constant.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

investigate_domain and get_domain_categorization call non-existent security/v1 routes (404 no Route matched)

1 participant