Track which CLI commands should move from GraphQL to the AppSignal v2 REST API.
- Command:
auth login - Current code:
src/commands/auth.rssrc/api.rs(validate_token)
- Previous GraphQL usage:
- GraphQL introspection query:
{ __typename }
- GraphQL introspection query:
- REST replacement:
GET /api/v2/auth
- Why:
- Dedicated auth check exists in REST
- Better fit than probing GraphQL
- Command:
logs search - Current code:
src/commands/logs.rssrc/api.rs(list_log_lines_rest)
- Previous GraphQL usage:
app.logs.lines
- REST replacement:
POST /api/v2/logs/lines
- Why:
- REST is the documented log query API
- GraphQL is capped at 100 results
- CLI currently works around this with
--page-alltime slicing
- Status:
- Done for
logs search
- Done for
- Command:
logs tail - Current code:
src/commands/logs.rssrc/api.rs(list_log_lines_rest)
- Previous GraphQL usage:
app.logs.lines
- REST replacement:
POST /api/v2/logs/lines
- Why:
- REST supports streaming/SSE
- Current implementation uses polling and deduplication because GraphQL is not ideal for tailing
- Status:
- Done for
logs tailusing the REST log query endpoint - Still polling; SSE streaming can be a follow-up improvement
- Done for
These commands still depend on data that is not exposed by the documented v2 REST API.
logs viewslogs sources
Reason: no matching REST endpoints were found for log views or log sources.
apps listapps infoapps findapps resources allapps resources usersapps resources notifiersapps resources namespacesapps resources dashboardsapps resources deploy-markers
Reason: no matching REST endpoints were found for organizations, apps, users, notifiers, namespaces, dashboards, or deploy markers listing.
incidents listincidents list-exceptionsincidents list-performanceincidents list-anomaliesincidents showincidents updateincidents add-note
Reason: no matching REST incident endpoints were found in the documented v2 API.
Relevant REST endpoints:
POST /api/v2/tracing/actionsPOST /api/v2/tracing/traces/performancePOST /api/v2/tracing/trace/performancePOST /api/v2/tracing/traces/errorsPOST /api/v2/tracing/trace/error
The CLI now uses the performance and error trace endpoints for samples / traces commands. These endpoints do not directly replace the current incidents list-performance behavior.
Relevant REST endpoint:
POST /api/v2/deploys/stats
This is not a direct replacement for apps resources deploy-markers.
src/api.rscurrently assumes a GraphQL-first client and normalizes endpoints to/graphql.- Before migrating logs and auth cleanly, split client concerns into:
- base URL handling
- GraphQL request helper
- REST request helper
- Add REST auth validation via
GET /api/v2/auth - Add a REST log query client for
POST /api/v2/logs/lines - Migrate
logs search - Migrate
logs tail - Remove or simplify GraphQL-specific log pagination workarounds if REST pagination/streaming fully replaces them