Description
Discover web API requests from an authorized browser session and characterize their method, endpoint, parameters, and response contract.
When to Use
Use only within an authorized web scope with explicit URL, session, data, and action boundaries.
Inputs / Outputs / Failure Modes
| Area |
Contract |
| Inputs |
authorized site/session, observed network requests, and discovery scope. |
| Outputs |
candidate endpoint records with provenance and authorization context. |
| Failure modes |
Wrong origin, stale page state, authentication leakage, anti-automation controls, malformed content, unbounded crawling, or unverified postconditions. |
Procedure
- Establish the authorized origin, session scope, and target resource.
- Validate the requested URL, selector, payload, or content against that scope.
- Execute with bounded requests, pages, scripts, redirects, or data volume.
- Preserve source URLs, timestamps, and relevant request/response provenance.
- Validate the result and expected postcondition before continuing.
- Stop on authorization, anti-automation, or ambiguity boundaries rather than bypassing them.
Runnable Example
task = {"capability": "api-discovery", "authorized": True, "budget": 4}
assert task["authorized"] and task["budget"] > 0
print({"status": "bounded_web_operation", "capability": task["capability"]})
Failure Modes
- Target origin or authorization cannot be verified.
- Page state changes between observation and action.
- Session tokens or personal data are exposed.
- Anti-bot, CAPTCHA, robots, or access controls are bypassed.
- Redirects, recursion, or data volume exceed the declared bounds.
- Output is accepted without validation.
Safety Boundary
Do not bypass authentication, paywalls, CAPTCHA/anti-bot controls, rate limits, robots restrictions, or other access controls. Use only authorized sites and data, and never log credentials, session tokens, or sensitive cookies.
Evidence
Canonical repository skill: this file. Structural conformance is governed by the repository schema, validation workflows, Agent Skills contract, and security gates. Web-specific claims require reproducible implementation evidence or authoritative primary documentation.
Related
- 11-web
- input-guardrails
- output-guardrails
1---2name: api-discovery3description: Discover web API requests from an authorized browser session and characterize their method, endpoint, parameters, and response contract.4metadata:5 source: https://skillmd.com/skills/samotech/api-discovery6 upstream: skills/11-web/api-discovery.md7 category: 11-web8---910## Description1112Discover web API requests from an authorized browser session and characterize their method, endpoint, parameters, and response contract.1314## When to Use1516Use only within an authorized web scope with explicit URL, session, data, and action boundaries.1718## Inputs / Outputs / Failure Modes1920| Area | Contract |21|---|---|22| Inputs | authorized site/session, observed network requests, and discovery scope. |23| Outputs | candidate endpoint records with provenance and authorization context. |24| Failure modes | Wrong origin, stale page state, authentication leakage, anti-automation controls, malformed content, unbounded crawling, or unverified postconditions. |2526## Procedure27281. Establish the authorized origin, session scope, and target resource.292. Validate the requested URL, selector, payload, or content against that scope.303. Execute with bounded requests, pages, scripts, redirects, or data volume.314. Preserve source URLs, timestamps, and relevant request/response provenance.325. Validate the result and expected postcondition before continuing.336. Stop on authorization, anti-automation, or ambiguity boundaries rather than bypassing them.3435## Runnable Example3637```python38task = {"capability": "api-discovery", "authorized": True, "budget": 4}39assert task["authorized"] and task["budget"] > 040print({"status": "bounded_web_operation", "capability": task["capability"]})41```4243## Failure Modes4445- Target origin or authorization cannot be verified.46- Page state changes between observation and action.47- Session tokens or personal data are exposed.48- Anti-bot, CAPTCHA, robots, or access controls are bypassed.49- Redirects, recursion, or data volume exceed the declared bounds.50- Output is accepted without validation.5152## Safety Boundary5354Do not bypass authentication, paywalls, CAPTCHA/anti-bot controls, rate limits, robots restrictions, or other access controls. Use only authorized sites and data, and never log credentials, session tokens, or sensitive cookies.5556## Evidence5758Canonical repository skill: this file. Structural conformance is governed by the repository schema, validation workflows, Agent Skills contract, and security gates. Web-specific claims require reproducible implementation evidence or authoritative primary documentation.5960## Related6162- 11-web63- input-guardrails64- output-guardrails