Skip to content

API reference ​

Ascendly’s backend is a FastAPI application. Interactive API documentation is generated automatically from route definitions and Pydantic schemas.

Interactive docs (Swagger UI) ​

On the staff network (or local development), open:

  • Swagger UI: /docs
  • ReDoc: /redoc
  • OpenAPI JSON: /openapi.json

Local development ​

When running the API locally on the default port:

ResourceURL
Swagger UIhttp://localhost:8000/docs
Health checkhttp://localhost:8000/health

Production / staging ​

Production and staging base URLs depend on your organization’s deployment. Ask your system administrator for the API hostname, then append /docs.

Authentication

Most endpoints require a valid JWT from Google sign-in. The access token lasts 7 days (JWT_EXPIRE_MINUTES=10080). Use the Authorize button in Swagger after obtaining a token from the web app, or call endpoints from the authenticated web client. Desktop clients also use a 365-day refresh token — see Platform & admin § Session length.

Base paths ​

PrefixDomain
/v1/publicUnauthenticated app status (maintenance flag)
/v1/authGoogle OAuth, JWT refresh, permissions, activity heartbeat
/v1/scorecardScorecard CRUD, configurations, schedules, task delivery, weekly kudos
/v1/atw-entry-requestsEmployee ATW submit; manager approve/reject
/v1/dashboardNews, BSC rollups, cycle performance, sync jobs, finalize/reopen
/v1/notificationsIn-app inbox, delivery preferences
/v1/systemOperational status (level 5)
/v1/system/notificationsNotification type catalog, email test (level 5)
/v1/system/emailAdmin broadcast compose (level 5)
/v1/system/teamsTeams channel connection, test, compose, post history (level 5)
/v1/system/visibilityPage visibility catalog and toggles (level 5)
/v1/visibilityEffective page visibility for clients
/v1/employeesDirectory CRUD, welcome email, create requests
/v1/organizationOrg tree (GET /tree)
/v1/learningModules, units, player, enrollments, file upload
/v1/assistantRead-only explain/rank capabilities (no chat UI)

Dashboard (notable routes) ​

MethodPathPurpose
GET/v1/dashboard/newsNews stories payload (BSC Passers, etc.)
GET/v1/dashboard/news/bonus-qualifiersCompany-wide bonus-qualified employees for a finalized month
GET/v1/dashboard/news/my-birthdayWhether the signed-in employee is a celebrant today
GET/v1/dashboard/bsc/month-snapshotSingle-month BSC snapshot
GET/v1/dashboard/bsc/available-monthsMonth picker options (BQ + entries + month reports)
GET/v1/dashboard/bsc/performanceFull-cycle performance (cycle_id query)
GET/v1/dashboard/bsc/comparison-accessWhether the current user can view Performance comparison
POST/v1/dashboard/bsc/syncManual / rolling sync (level 5); async=true queues background job
GET/v1/dashboard/bsc/sync-jobs/activeIn-progress sync job for a month
GET/v1/dashboard/bsc/sync-jobs/{job_id}Poll sync/finalize job progress
POST/v1/dashboard/bsc/refresh-employee-cycleRe-sync one employee across a fiscal cycle (level 5)
POST/v1/dashboard/bsc/finalizeGenerate Final Report (background job)
POST/v1/dashboard/bsc/reopenReopen finalized month (level 5)

Public ​

MethodPathPurpose
GET/v1/public/app-statusMaintenance flag; optional Authorization: Bearer to check bypass access

Auth & platform ​

MethodPathPurpose
POST/v1/auth/googleExchange Google code for JWT (+ refresh token when client: desktop)
POST/v1/auth/dev-loginDevelopment-only email login helper (requires env flag + allowlisted email)
POST/v1/auth/refreshRotate refresh token → new JWT + refresh token
POST/v1/auth/logoutRevoke refresh token
GET/v1/auth/permissionsCurrent user permissions
GET/v1/auth/permissions/matrixFull access-level matrix (level 5)
POST/v1/auth/activity-heartbeatRecord active minute + client last active (client: web | desktop); visible-on-screen only
GET/v1/auth/activity-summarySelf activity summary (today + 7-day rolling, split by client)
GET/v1/employees/activity-exportManager CSV: last login, last active (web/desktop/latest), active minutes
GET/v1/system/statusMongo, BQ, S3, worker health (level 5)
POST/v1/system/email/sendAdmin broadcast email (level 5)
GET/v1/system/teams/connectionTeams webhook connection status (level 5; URL masked)
PUT/v1/system/teams/connectionSave Teams Workflows webhook URL (level 5)
PATCH/v1/system/teams/connectionEnable or disable automated Teams posts (level 5; default off)
DELETE/v1/system/teams/connectionDisconnect Teams webhook (level 5)
POST/v1/system/teams/testSend a test Adaptive Card (level 5)
POST/v1/system/teams/composePost subject + body to the channel (level 5)
GET/v1/system/teams/postsRecent channel posts and failures (level 5)
POST/v1/employees/welcome-emailSend welcome email to selected employees

Organization ​

MethodPathPurpose
GET/v1/organization/treeClusters, departments, managers, members, and directory (includes hire_date on employee nodes)

Guide: Organization.

ATW entry requests ​

MethodPathPurpose
GET/v1/atw-entry-requestsList (scope=mine | approval)
GET/v1/atw-entry-requests/pending-countManager pending badge count
POST/v1/atw-entry-requestsSubmit (multipart + optional proof)
POST/v1/atw-entry-requests/{id}/approveApprove → creates ATW entry
POST/v1/atw-entry-requests/{id}/rejectReject with review note
DELETE/v1/atw-entry-requests/{id}Employee cancel pending request

Assistant ​

Users type free-form questions in the Ask Nella panel. The model may call scoped tools; it cannot query Mongo/BigQuery itself or change data. Set ASSISTANT_CHAT_ENABLED=false on the API to hide the chip and refuse chat. ASSISTANT_CAPABILITIES_ENABLED=false also disables explain/rank tools. Chat needs at least one of ASSISTANT_LLM_API_KEY / OPENAI_API_KEY, GEMINI_API_KEY, or Vertex Grok (GCP_PROJECT_ID). Super admins choose the active model at /system/nella (default try-order Grok 4.6 → Gemini 3.7 Flash → OpenAI).

MethodPathPurpose
GET/v1/assistant/statusWhether chat is available for this environment
POST/v1/assistant/chatFree-form prompt; server-side tool loop; saves into the asker's thread
GET/v1/assistant/threadsList the asker's saved chats (pinned first)
GET/v1/assistant/threads/{id}Load one owned chat
PATCH/v1/assistant/threads/{id}Rename or pin/unpin an owned chat
DELETE/v1/assistant/threads/{id}Soft-delete one owned chat (hidden from the asker; quality review can still open it until the 90-day TTL)
GET/v1/assistant/capabilitiesInternal tool catalog (not the user UI)
GET/v1/assistant/explain/tenureInternal tenure tool
GET/v1/assistant/rank/employeesInternal ranking tool
GET/v1/assistant/summarize/bscInternal month BSC summary
GET/v1/assistant/explain/bonusInternal bonus-gate explain
GET/v1/assistant/explain/scheduled-lockingInternal live weekly/monthly lock settings

Guide citation paths (/guide/…) are pages on the VitePress docs site (VITE_DOCS_URL), not routes in the web app.

Detailed route lists, request bodies, and response schemas are in Swagger — they stay in sync with the codebase.