HTTP API
బేస్ URL https://addtothese.com/api/v1. Authorization: Bearer att_... (API టోకెన్) తో, లేదా బ్రౌజర్ సెషన్ మరియు X-CSRF-Token తో ధృవీకరించండి. అన్ని బాడీలు JSON; లోపాలు {"error": "...", "code": "..."} రూపంలో ఉంటాయి.
| మెథడ్ | పాత్ | ఉద్దేశం |
|---|---|---|
| POST | /auth/register | {email, password, name} |
| POST | /auth/login | {email, password}; {mfa_required: true} అని సమాధానం ఇవ్వవచ్చు |
| POST | /auth/totp/verify | {code} |
| POST | /auth/logout | |
| POST | /auth/password/forgot | /auth/password/reset | {email} | {token, password} |
| GET | /auth/oauth/{google|github} | OAuth ప్రారంభిస్తుంది |
| GET/PATCH | /me | ఖాతా; PATCH {name} |
| POST | /me/totp/setup | enable | disable | టూ-ఫ్యాక్టర్ |
| POST | /me/password | {current_password, new_password} |
| GET/POST/DELETE | /tokens[/{id}] | API టోకెన్లు; POST {name} సీక్రెట్ను ఒక్కసారి మాత్రమే ఇస్తుంది |
| GET/POST/DELETE | /endpoints[/{id}] | POST {subdomain, protocol} |
| POST | /endpoints/ephemeral | {protocol} రాండమ్ పేరు |
| GET/POST/DELETE | /domains[/{id}] | POST {domain, endpoint_id} |
| POST | /domains/{id}/verify | DNS తనిఖీ |
| POST | /agent-token | {endpoints: []} {token, upstream_url, endpoints, expires_at} ఇస్తుంది |
| GET | /usage | ప్రస్తుత వ్యవధి మరియు చరిత్ర |
| GET | /tunnels | కనెక్ట్ అయిన ఏజెంట్లు |
| GET | /billing/prices | ప్లాన్లు మరియు Stripe ధరలు |
| POST | /billing/checkout | /billing/portal | {price} {url} ఇస్తుంది |