{"openapi":"3.1.0","info":{"title":"Lovat API","version":"26.0.0","description":"API Documentation for Lovat, a scouting system used to scout teams and matches in the First Robotics Competition. Clients request the shared format using X-Lovat-Error-Format: json-v1. Without that header, direct guard responses retain their legacy formats for installed clients; unexpected failures are still sanitized. Negotiated HTTP error responses (400–599) use application/json and the ApiError schema. message and displayError contain the same safe text. invalidFields and retryAfterSeconds appear only when applicable. Authentication, validation, missing resources, rate limits and unexpected failures share this format. Success responses, including legacy domain messages returned with status 200, retain their documented shapes. Internal exception details and submitted values are not part of the error response."},"servers":[{"url":"https://api.lovat.app"}],"components":{"responses":{"ApiErrorResponse":{"description":"Request failed. The HTTP status describes the failure category; code identifies the error. Unexpected server failures use INTERNAL_SERVER_ERROR and a generic message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Accepts either a JWT token from Auth0 or an API key (prefixed with 'lvt-'). Use format: Authorization: Bearer <token>"},"slackToken":{"type":"apiKey","in":"header","name":"x-slack-signature","description":"Slack signature header (requires accompanying x-slack-request-timestamp)"},"lovatSignature":{"type":"apiKey","in":"header","name":"x-signature","description":"HMAC signature header (requires accompanying x-timestamp)"}},"schemas":{"ApiError":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error identifier. Use the HTTP status and code for program decisions; messages may change.","example":"INVALID_QUERY_PARAMETERS"},"message":{"type":"string","description":"Safe, human-readable explanation.","example":"Invalid team query parameters"},"displayError":{"type":"string","description":"Compatibility alias of message, with the same value, for existing clients.","example":"Invalid team query parameters"},"invalidFields":{"type":"array","items":{"type":"string"},"description":"Optional field names to correct. Submitted values are never included."},"retryAfterSeconds":{"type":"number","description":"Optional retry delay in seconds. Also respect Retry-After when provided."}},"required":["code","message","displayError"]},"Position":{"type":"string","enum":["LEFT_TRENCH","LEFT_BUMP","HUB","RIGHT_TRENCH","RIGHT_BUMP","NEUTRAL_ZONE","DEPOT","OUTPOST","NONE"]},"EventAction":{"type":"string","enum":["START_SCORING","STOP_SCORING","START_MATCH","START_CAMPING","STOP_CAMPING","START_DEFENDING","STOP_DEFENDING","INTAKE","OUTTAKE","DISRUPT","CROSS","CLIMB","START_FEEDING","STOP_FEEDING"]},"FieldTraversal":{"type":"string","enum":["TRENCH","BUMP","BOTH","NONE"]},"Beached":{"type":"string","enum":["ON_FUEL","ON_BUMP","BOTH","NEITHER"]},"EndgameClimb":{"type":"string","enum":["NOT_ATTEMPTED","FAILED","L1","L2","L3"]},"ClimbPosition":{"type":"string","enum":["SIDE","MIDDLE"]},"ClimbSide":{"type":"string","enum":["FRONT","BACK"]},"AutoClimb":{"type":"string","enum":["NOT_ATTEMPTED","FAILED","SUCCEEDED"]},"FeederType":{"type":"string","enum":["CONTINUOUS","STOP_TO_SHOOT","DUMP"]},"IntakeType":{"type":"string","enum":["GROUND","OUTPOST","BOTH","NEITHER"]},"RobotRole":{"type":"string","enum":["CYCLING","SCORING","FEEDING","DEFENDING","IMMOBILE"]},"WarningType":{"type":"string","enum":["BREAK"]},"UserRole":{"type":"string","enum":["ANALYST","SCOUTING_LEAD"]},"MatchType":{"type":"string","enum":["QUALIFICATION","ELIMINATION","PRACTICE"]},"Event":{"type":"object","properties":{"eventUuid":{"type":"string","format":"uuid"},"time":{"type":"number"},"action":{"type":"string","enum":["START_SCORING","STOP_SCORING","START_MATCH","START_CAMPING","STOP_CAMPING","START_DEFENDING","STOP_DEFENDING","INTAKE","OUTTAKE","DISRUPT","CROSS","CLIMB","START_FEEDING","STOP_FEEDING"]},"position":{"type":"string","enum":["LEFT_TRENCH","LEFT_BUMP","HUB","RIGHT_TRENCH","RIGHT_BUMP","NEUTRAL_ZONE","DEPOT","OUTPOST","NONE"]},"points":{"type":"integer"},"quantity":{"type":["integer","null"]},"scoutReportUuid":{"type":"string","format":"uuid"}},"required":["eventUuid","time","action","position","points","scoutReportUuid"]},"FeatureToggle":{"type":"object","properties":{"feature":{"type":"string"},"enabled":{"type":"boolean"}},"required":["feature","enabled"]},"TeamMatchData":{"type":"object","properties":{"key":{"type":"string"},"tournamentKey":{"type":"string"},"matchNumber":{"type":"integer"},"teamNumber":{"type":"integer"},"matchType":{"type":"string","enum":["QUALIFICATION","ELIMINATION","PRACTICE"]}},"required":["key","tournamentKey","matchNumber","teamNumber","matchType"]},"MutablePicklist":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"teams":{"type":"array","items":{"type":"integer"}},"authorId":{"type":"string"},"name":{"type":"string"},"tournamentKey":{"type":["string","null"]}},"required":["uuid","teams","authorId","name"]},"ScoutReport":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"teamMatchKey":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"notes":{"type":"string"},"robotRoles":{"type":"array","items":{"type":"string","enum":["CYCLING","SCORING","FEEDING","DEFENDING","IMMOBILE"]}},"driverAbility":{"type":"integer"},"scouterUuid":{"type":"string","format":"uuid"},"robotBrokeDescription":{"type":["string","null"]},"reliability":{"type":"string","enum":["UNVERIFIED","VERIFIED","FLAGGED","BAD_REPORT"]},"accuracy":{"type":"integer"},"beached":{"type":"string","enum":["ON_FUEL","ON_BUMP","BOTH","NEITHER"]},"climbPosition":{"type":["string","null"],"enum":["SIDE","MIDDLE",null]},"climbSide":{"type":["string","null"],"enum":["FRONT","BACK",null]},"defenseEffectiveness":{"type":"integer"},"feederTypes":{"type":"array","items":{"type":"string","enum":["CONTINUOUS","STOP_TO_SHOOT","DUMP"]}},"intakeType":{"type":"string","enum":["GROUND","OUTPOST","BOTH","NEITHER"]},"fieldTraversal":{"type":"string","enum":["TRENCH","BUMP","BOTH","NONE"]},"scoresWhileMoving":{"type":"boolean"},"disrupts":{"type":"boolean"},"endgameClimb":{"type":"string","enum":["NOT_ATTEMPTED","FAILED","L1","L2","L3"]},"autoClimb":{"type":"string","enum":["NOT_ATTEMPTED","FAILED","SUCCEEDED"]}},"required":["uuid","teamMatchKey","startTime","notes","robotRoles","driverAbility","scouterUuid","reliability","accuracy","beached","defenseEffectiveness","feederTypes","intakeType","fieldTraversal","scoresWhileMoving","disrupts","endgameClimb","autoClimb"]},"ScouterScheduleShift":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"sourceTeamNumber":{"type":"integer"},"tournamentKey":{"type":"string"},"startMatchOrdinalNumber":{"type":"integer"},"endMatchOrdinalNumber":{"type":"integer"}},"required":["uuid","sourceTeamNumber","tournamentKey","startMatchOrdinalNumber","endMatchOrdinalNumber"]},"Scouter":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"sourceTeamNumber":{"type":"integer"},"strikes":{"type":"integer"},"scouterReliability":{"type":"integer"},"archived":{"type":"boolean"}},"required":["uuid","sourceTeamNumber","strikes","scouterReliability","archived"]},"SharedPicklist":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"totalPoints":{"type":"number"},"autoPoints":{"type":"number"},"teleopPoints":{"type":"number"},"authorId":{"type":"string"},"autoClimb":{"type":"number"},"campingDefenseTime":{"type":"number"},"climbResult":{"type":"number"},"contactDefenseTime":{"type":"number"},"driverAbility":{"type":"number"},"defenseEffectiveness":{"type":"number"},"estimatedSuccessfulFuelRate":{"type":"number"},"estimatedTotalFuelScored":{"type":"number"},"feedingRate":{"type":"number"},"scoringRate":{"type":"number"},"totalDefensiveTime":{"type":"number"},"totalFuelFed":{"type":"number"},"totalFuelThroughput":{"type":"number"}},"required":["uuid","name","totalPoints","autoPoints","teleopPoints","authorId","autoClimb","campingDefenseTime","climbResult","contactDefenseTime","driverAbility","defenseEffectiveness","estimatedSuccessfulFuelRate","estimatedTotalFuelScored","feedingRate","scoringRate","totalDefensiveTime","totalFuelFed","totalFuelThroughput"]},"Team":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":"string"}},"required":["number","name"]},"RegisteredTeam":{"type":"object","properties":{"number":{"type":"integer"},"code":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean"},"timeCreated":{"type":"string","format":"date-time"},"teamApproved":{"type":"boolean"},"website":{"type":["string","null"]}},"required":["number","code","email","emailVerified","teamApproved"]},"EmailVerificationRequest":{"type":"object","properties":{"verificationCode":{"type":"string"},"email":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"teamNumber":{"type":"integer"}},"required":["verificationCode","email","expiresAt","teamNumber"]},"SlackWorkspace":{"type":"object","properties":{"workspaceId":{"type":"string"},"owner":{"type":"integer"},"name":{"type":"string"},"botUserId":{"type":"string"},"authUserId":{"type":"string"}},"required":["workspaceId","owner","name","botUserId","authUserId"]},"SlackSubscription":{"type":"object","properties":{"subscriptionId":{"type":"string"},"channelId":{"type":"string"},"workspaceId":{"type":"string"},"subscribedEvent":{"type":"string","enum":["BREAK"]}},"required":["subscriptionId","channelId","workspaceId","subscribedEvent"]},"SlackNotificationThread":{"type":"object","properties":{"messageId":{"type":"string"},"matchNumber":{"type":"integer"},"teamNumber":{"type":"integer"},"subscriptionId":{"type":"string"},"channelId":{"type":"string"}},"required":["messageId","matchNumber","teamNumber","subscriptionId","channelId"]},"Tournament":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"location":{"type":["string","null"]},"date":{"type":["string","null"]}},"required":["key","name"]},"User":{"type":"object","properties":{"id":{"type":"string"},"teamNumber":{"type":["integer","null"]},"email":{"type":"string"},"emailVerified":{"type":"boolean"},"username":{"type":["string","null"]},"role":{"type":"string","enum":["ANALYST","SCOUTING_LEAD"]},"teamSourceRule":{"type":"object","properties":{"mode":{"type":"string","enum":["INCLUDE","EXCLUDE"]},"items":{"type":"array","items":{"type":"number"}}},"required":["mode","items"]},"tournamentSourceRule":{"type":"object","properties":{"mode":{"type":"string","enum":["INCLUDE","EXCLUDE"]},"items":{"type":"array","items":{"type":"string"}}},"required":["mode","items"]}},"required":["id","email","emailVerified","role","teamSourceRule","tournamentSourceRule"]},"ApiKey":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsed":{"type":["string","null"],"format":"date-time"},"requests":{"type":"integer"}},"required":["uuid","name","createdAt","requests"]},"CachedAnalysis":{"type":"object","properties":{"key":{"type":"string"},"teamDependencies":{"type":"array","items":{"type":"integer"},"default":[]},"tournamentDependencies":{"type":"array","items":{"type":"string"},"default":[]}},"required":["key"]}},"parameters":{}},"paths":{"/status":{"get":{"summary":"Health check","description":"Returns a simple message indicating the server is running.","responses":{"200":{"description":"Server is running","content":{"text/plain":{"schema":{"type":"string","example":"Server running"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/slack/add-workspace":{"get":{"tags":["Slack"],"summary":"Add Slack workspace (OAuth flow)","security":[{"slackToken":[]}],"responses":{"200":{"description":"Redirect or JSON"},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/slack/command":{"post":{"tags":["Slack"],"summary":"Slack slash command","security":[{"slackToken":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"command":{"type":"string"},"text":{"type":"string"}},"required":["command"]}}}},"responses":{"200":{"description":"Processed"},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/slack/event":{"post":{"tags":["Slack"],"summary":"Slack event callback","security":[{"slackToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"event":{"type":"object","additionalProperties":{}}},"required":["type","event"]}}}},"responses":{"200":{"description":"Processed"},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/onboarding/verifyemail":{"post":{"tags":["Manager - Onboarding"],"summary":"Approve team email (signed)","security":[{"lovatSignature":[]}],"parameters":[{"schema":{"type":"string","description":"Unix timestamp (seconds) used in HMAC signature generation"},"required":true,"description":"Unix timestamp (seconds) used in HMAC signature generation","name":"x-timestamp","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]}}}},"responses":{"200":{"description":"Approved"},"400":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Code not recognized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/onboarding/username":{"post":{"tags":["Manager - Onboarding"],"summary":"Set username","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"}},"required":["username"]}}}},"responses":{"200":{"description":"Updated"},"400":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/onboarding/teamcode":{"post":{"tags":["Manager - Onboarding"],"summary":"Check team code","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"query"},{"schema":{"type":"string"},"required":true,"name":"code","in":"query"}],"responses":{"200":{"description":"Valid"},"400":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team/code not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/onboarding/team":{"post":{"tags":["Manager - Onboarding"],"summary":"Add registered team","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":"string"}},"required":["number"]}}}},"responses":{"200":{"description":"Added"},"400":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/onboarding/teamwebsite":{"post":{"tags":["Manager - Onboarding"],"summary":"Add team website","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"website":{"type":"string"}},"required":["website"]}}}},"responses":{"200":{"description":"Added"},"400":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/onboarding/resendverificationemail":{"post":{"tags":["Manager - Onboarding"],"summary":"Resend verification email","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Sent"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/picklists":{"post":{"tags":["Manager - Picklists"],"summary":"Create shared picklist","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"totalPoints":{"type":"number","default":0},"autoPoints":{"type":"number","default":0},"teleopPoints":{"type":"number","default":0},"climbResult":{"type":"number","default":0},"autoClimb":{"type":"number","default":0},"defenseEffectiveness":{"type":"number","default":0},"contactDefenseTime":{"type":"number","default":0},"campingDefenseTime":{"type":"number","default":0},"totalDefensiveTime":{"type":"number","default":0},"totalFuelThroughput":{"type":"number","default":0},"totalFuelFed":{"type":"number","default":0},"feedingRate":{"type":"number","default":0},"scoringRate":{"type":"number","default":0},"estimatedSuccessfulFuelRate":{"type":"number","default":0},"estimatedTotalFuelScored":{"type":"number","default":0},"driverAbility":{"type":"number","default":0}},"required":["name"]}}}},"responses":{"200":{"description":"Picklist created","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key, or user is not on a team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"get":{"tags":["Manager - Picklists"],"summary":"List picklists by team","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List of picklists","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"uuid":{"type":"string"},"author":{"type":"object","properties":{"username":{"type":["string","null"]}}}},"required":["name","uuid","author"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"User is not on a team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/picklists/{uuid}":{"get":{"tags":["Manager - Picklists"],"summary":"Get picklist by UUID","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Picklist detail","content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"authorId":{"type":"string"},"driverAbility":{"type":"number"},"totalPoints":{"type":"number"},"autoPoints":{"type":"number"},"teleopPoints":{"type":"number"},"climbResult":{"type":"number"},"autoClimb":{"type":"number"},"defenseEffectiveness":{"type":"number"},"contactDefenseTime":{"type":"number"},"campingDefenseTime":{"type":"number"},"totalDefensiveTime":{"type":"number"},"totalFuelThroughput":{"type":"number"},"totalFuelFed":{"type":"number"},"feedingRate":{"type":"number"},"scoringRate":{"type":"number"},"estimatedSuccessfulFuelRate":{"type":"number"},"estimatedTotalFuelScored":{"type":"number"}},"required":["uuid","name","authorId","driverAbility","totalPoints","autoPoints","teleopPoints","climbResult","autoClimb","defenseEffectiveness","contactDefenseTime","campingDefenseTime","totalDefensiveTime","totalFuelThroughput","totalFuelFed","feedingRate","scoringRate","estimatedSuccessfulFuelRate","estimatedTotalFuelScored"]}}}},"400":{"description":"Invalid UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Picklist not found or not on same team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"put":{"tags":["Manager - Picklists"],"summary":"Update picklist","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"totalPoints":{"type":"number","default":0},"autoPoints":{"type":"number","default":0},"teleopPoints":{"type":"number","default":0},"climbResult":{"type":"number","default":0},"autoClimb":{"type":"number","default":0},"defenseEffectiveness":{"type":"number","default":0},"contactDefenseTime":{"type":"number","default":0},"campingDefenseTime":{"type":"number","default":0},"totalDefensiveTime":{"type":"number","default":0},"totalFuelThroughput":{"type":"number","default":0},"totalFuelFed":{"type":"number","default":0},"feedingRate":{"type":"number","default":0},"scoringRate":{"type":"number","default":0},"estimatedSuccessfulFuelRate":{"type":"number","default":0},"estimatedTotalFuelScored":{"type":"number","default":0},"driverAbility":{"type":"number","default":0}},"required":["name"]}}}},"responses":{"200":{"description":"Picklist updated","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key, or not authorized to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Picklist not found or not on same team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"delete":{"tags":["Manager - Picklists"],"summary":"Delete picklist","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key, or unauthorized to delete this picklist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/mutablepicklists":{"post":{"tags":["Manager - Mutable Picklists"],"summary":"Create mutable picklist","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"teams":{"type":"array","items":{"type":"integer"}},"tournamentKey":{"type":"string"}},"required":["name","teams"]}}}},"responses":{"200":{"description":"Created","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key, or user is not on a team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"get":{"tags":["Manager - Mutable Picklists"],"summary":"List mutable picklists","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"tournamentKey":{"type":["string","null"]},"author":{"type":"object","properties":{"username":{"type":["string","null"]}}}},"required":["uuid","name","author"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"User is not on a team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/mutablepicklists/{uuid}":{"get":{"tags":["Manager - Mutable Picklists"],"summary":"Get mutable picklist","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Detail","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"uuid":{"type":"string","format":"uuid"},"teams":{"type":"array","items":{"type":"integer"}},"authorId":{"type":"string"},"name":{"type":"string"},"tournamentKey":{"type":["string","null"]}},"required":["uuid","teams","authorId","name"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"put":{"tags":["Manager - Mutable Picklists"],"summary":"Update mutable picklist","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"teams":{"type":"array","items":{"type":"integer"}}},"required":["name","teams"]}}}},"responses":{"200":{"description":"Updated","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key, or not authorized to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Picklist not found or not on same team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"delete":{"tags":["Manager - Mutable Picklists"],"summary":"Delete mutable picklist","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key, or not authorized to delete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/registeredteams/{team}/registrationstatus":{"get":{"tags":["Manager - Registered Teams"],"summary":"Check team registration status","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"path"}],"responses":{"200":{"description":"Registration status","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["NOT_STARTED"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["PENDING_EMAIL_VERIFICATION"]},"email":{"type":"string"}},"required":["status","email"]},{"type":"object","properties":{"status":{"type":"string","enum":["PENDING_WEBSITE"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["PENDING_TEAM_VERIFICATION"]},"teamEmail":{"type":"string"}},"required":["status","teamEmail"]},{"type":"object","properties":{"status":{"type":"string","enum":["REGISTERED_ON_TEAM"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["REGISTERED_OFF_TEAM"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["PENDING"]}},"required":["status"]}]}}}},"400":{"description":"Invalid team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/registeredteams/{team}/approve":{"post":{"tags":["Manager - Registered Teams"],"summary":"Approve team","description":"Requires `x-signature` and `x-timestamp` headers. Signs request body, method, path.","security":[{"lovatSignature":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"path"},{"schema":{"type":"string","description":"Unix timestamp (seconds) used in HMAC signature generation"},"required":true,"description":"Unix timestamp (seconds) used in HMAC signature generation","name":"x-timestamp","in":"header"}],"responses":{"200":{"description":"Approved registered team row","content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"integer"},"code":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean"},"timeCreated":{"type":"string","format":"date-time"},"teamApproved":{"type":"boolean"},"website":{"type":["string","null"]}},"required":["number","code","email","emailVerified","teamApproved"]}}}},"400":{"description":"Invalid team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized or signature expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/registeredteams/{team}/reject":{"post":{"tags":["Manager - Registered Teams"],"summary":"Reject team","description":"Requires `x-signature` and `x-timestamp` headers. Signs request body, method, path.","security":[{"lovatSignature":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"path"},{"schema":{"type":"string","description":"Unix timestamp (seconds) used in HMAC signature generation"},"required":true,"description":"Unix timestamp (seconds) used in HMAC signature generation","name":"x-timestamp","in":"header"}],"responses":{"200":{"description":"Rejection message","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized or signature expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/emailTeamCode":{"post":{"tags":["Manager - Scouters (Public)"],"summary":"Email team code to registered address","parameters":[{"schema":{"type":"integer"},"required":true,"name":"teamNumber","in":"query"}],"responses":{"200":{"description":"Email sent","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouter/checkcode":{"get":{"tags":["Manager - Scouters (Public)"],"summary":"Check team code","parameters":[{"schema":{"type":"string"},"required":true,"name":"code","in":"query"}],"responses":{"200":{"description":"Valid or team row","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/name/uuid/{uuid}":{"post":{"tags":["Manager - Scouters (Public)"],"summary":"Change scouter name by UUID","parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Updated"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouters":{"get":{"tags":["Manager - Scouters (Public)"],"summary":"List active scouters for team code","parameters":[{"schema":{"type":"string"},"required":true,"name":"x-team-code","in":"header"}],"responses":{"200":{"description":"Scouters","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"sourceTeamNumber":{"type":"integer"},"strikes":{"type":"integer"},"scouterReliability":{"type":"integer"},"archived":{"type":"boolean"}},"required":["uuid","sourceTeamNumber","strikes","scouterReliability","archived"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team code not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouter":{"post":{"tags":["Manager - Scouters (Public)"],"summary":"Create scouter","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"teamNumber":{"type":"integer"},"name":{"type":"string"}},"required":["teamNumber","name"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouters/{uuid}/tournaments":{"get":{"tags":["Manager - Scouters (Public)"],"summary":"List tournaments","parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Tournaments","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouterschedules/{tournament}":{"get":{"tags":["Manager - Scouters (Public)"],"summary":"Get scouter schedule","parameters":[{"schema":{"type":"string"},"required":true,"name":"tournament","in":"path"},{"schema":{"type":"string"},"required":true,"name":"x-team-code","in":"header"}],"responses":{"200":{"description":"Schedule","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouter/tournaments":{"get":{"tags":["Manager - Scouters (Public)"],"summary":"List scouter tournaments with schedule","parameters":[{"schema":{"type":"string"},"required":true,"name":"x-team-code","in":"header"}],"responses":{"200":{"description":"Tournaments","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/unarchive/uuid/{uuid}":{"post":{"tags":["Manager - Scouters"],"summary":"Unarchive scouter","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Unarchived"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/archive/uuid/{uuid}":{"post":{"tags":["Manager - Scouters"],"summary":"Archive scouter","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Archived"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scoutername":{"put":{"tags":["Manager - Scouters"],"summary":"Update scouter name","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Updated"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouterdashboard":{"delete":{"tags":["Manager - Scouters"],"summary":"Delete scouter from dashboard","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"post":{"tags":["Manager - Scouters"],"summary":"Add scouter on dashboard","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scouterId":{"type":"string"},"tournament":{"type":"string"}},"required":["scouterId"]}}}},"responses":{"200":{"description":"Created"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouterspage":{"get":{"tags":["Manager - Scouters"],"summary":"Scouting lead progress page","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Page data","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scouterreports":{"get":{"tags":["Manager - Scouters"],"summary":"List scouter reports","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Reports","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/tournament/{tournament}/teams":{"get":{"tags":["Manager - Tournaments"],"summary":"List teams in tournament","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tournament","in":"path"}],"responses":{"200":{"description":"Teams","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":"string"}},"required":["number","name"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/tournament/{tournament}/rankedTeams":{"get":{"tags":["Manager - Tournaments"],"summary":"Ranked teams","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tournament","in":"path"}],"responses":{"200":{"description":"Rankings","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":"string"},"rank":{"type":["integer","null"]},"rankingPoints":{"type":["integer","null"]},"matchesPlayed":{"type":["integer","null"]},"avatar":{"type":["string","null"]}},"required":["number","name","rank","rankingPoints","matchesPlayed","avatar"]}}}}},"404":{"description":"Tournament or teams not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/tournament/{tournament}/scoutershifts":{"post":{"tags":["Manager - Tournaments"],"summary":"Create scouter shift","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tournament","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startMatchOrdinalNumber":{"type":"integer"},"endMatchOrdinalNumber":{"type":"integer"},"team1":{"type":"array","items":{"type":"string"}},"team2":{"type":"array","items":{"type":"string"}},"team3":{"type":"array","items":{"type":"string"}},"team4":{"type":"array","items":{"type":"string"}},"team5":{"type":"array","items":{"type":"string"}},"team6":{"type":"array","items":{"type":"string"}}},"required":["startMatchOrdinalNumber","endMatchOrdinalNumber","team1","team2","team3","team4","team5","team6"]}}}},"responses":{"200":{"description":"Created"},"400":{"description":"Invalid request, overlapping scouters, or overlapping shift matches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key forbidden or user role not SCOUTING_LEAD","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"get":{"tags":["Manager - Tournaments"],"summary":"List scouter shifts","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tournament","in":"path"}],"responses":{"200":{"description":"Shifts","content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"sourceTeamNumber":{"type":"integer"},"tournamentKey":{"type":"string"},"startMatchOrdinalNumber":{"type":"integer"},"endMatchOrdinalNumber":{"type":"integer"},"team1":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"uuid":{"type":"string"}},"required":["name","uuid"]},"team2":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"uuid":{"type":"string"}},"required":["name","uuid"]},"team3":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"uuid":{"type":"string"}},"required":["name","uuid"]},"team4":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"uuid":{"type":"string"}},"required":["name","uuid"]},"team5":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"uuid":{"type":"string"}},"required":["name","uuid"]},"team6":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"uuid":{"type":"string"}},"required":["name","uuid"]}},"required":["uuid","sourceTeamNumber","tournamentKey","startMatchOrdinalNumber","endMatchOrdinalNumber","team1","team2","team3","team4","team5","team6"]}}},"required":["hash","data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"User not affiliated with a team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scoutreports":{"post":{"tags":["Manager - Scout Reports"],"summary":"Create scout report","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string"},"tournamentKey":{"type":"string"},"matchType":{"type":"string","enum":["QUALIFICATION","ELIMINATION","PRACTICE"]},"matchNumber":{"type":"integer"},"startTime":{"type":"integer"},"notes":{"type":"string"},"robotRoles":{"type":"array","items":{"type":"string","enum":["CYCLING","SCORING","FEEDING","DEFENDING","IMMOBILE"]}},"mobility":{"type":"string","enum":["TRENCH","BUMP","BOTH","NONE"]},"climbPosition":{"type":"string","enum":["SIDE","MIDDLE"]},"climbSide":{"type":"string","enum":["FRONT","BACK"]},"beached":{"type":"string","enum":["ON_FUEL","ON_BUMP","BOTH","NEITHER"]},"feederTypes":{"type":"array","items":{"type":"string","enum":["CONTINUOUS","STOP_TO_SHOOT","DUMP"]}},"intakeType":{"type":"string","enum":["GROUND","OUTPOST","BOTH","NEITHER"]},"robotBrokeDescription":{"type":["string","null"]},"driverAbility":{"type":"integer"},"accuracy":{"type":"integer"},"disrupts":{"type":"boolean"},"defenseEffectiveness":{"type":"integer"},"scoresWhileMoving":{"type":"boolean"},"autoClimb":{"type":"string","enum":["NOT_ATTEMPTED","FAILED","SUCCEEDED"]},"endgameClimb":{"type":"string","enum":["NOT_ATTEMPTED","FAILED","L1","L2","L3"]},"scouterUuid":{"type":"string"},"teamNumber":{"type":"integer"},"events":{"type":"array","items":{"type":"array","prefixItems":[{"type":"integer"},{"type":"integer"},{"type":"integer"},{"type":"integer"}]}}},"required":["uuid","tournamentKey","matchType","matchNumber","startTime","notes","robotRoles","mobility","beached","feederTypes","intakeType","driverAbility","disrupts","defenseEffectiveness","scoresWhileMoving","autoClimb","endgameClimb","scouterUuid","teamNumber","events"]}}}},"responses":{"200":{"description":"Created","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Match not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scoutreports/{uuid}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Manager - Scout Reports"],"summary":"Get scout report","parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Scout report and events","content":{"application/json":{"schema":{"type":"object","properties":{"scoutReport":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"teamMatchKey":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"notes":{"type":"string"},"robotRoles":{"type":"array","items":{"type":"string","enum":["CYCLING","SCORING","FEEDING","DEFENDING","IMMOBILE"]}},"driverAbility":{"type":"integer"},"scouterUuid":{"type":"string","format":"uuid"},"robotBrokeDescription":{"type":["string","null"]},"reliability":{"type":"string","enum":["UNVERIFIED","VERIFIED","FLAGGED","BAD_REPORT"]},"accuracy":{"type":"integer"},"beached":{"type":"string","enum":["ON_FUEL","ON_BUMP","BOTH","NEITHER"]},"climbPosition":{"type":["string","null"],"enum":["SIDE","MIDDLE",null]},"climbSide":{"type":["string","null"],"enum":["FRONT","BACK",null]},"defenseEffectiveness":{"type":"integer"},"feederTypes":{"type":"array","items":{"type":"string","enum":["CONTINUOUS","STOP_TO_SHOOT","DUMP"]}},"intakeType":{"type":"string","enum":["GROUND","OUTPOST","BOTH","NEITHER"]},"fieldTraversal":{"type":"string","enum":["TRENCH","BUMP","BOTH","NONE"]},"scoresWhileMoving":{"type":"boolean"},"disrupts":{"type":"boolean"},"endgameClimb":{"type":"string","enum":["NOT_ATTEMPTED","FAILED","L1","L2","L3"]},"autoClimb":{"type":"string","enum":["NOT_ATTEMPTED","FAILED","SUCCEEDED"]}},"required":["uuid","teamMatchKey","startTime","notes","robotRoles","driverAbility","scouterUuid","reliability","accuracy","beached","defenseEffectiveness","feederTypes","intakeType","fieldTraversal","scoresWhileMoving","disrupts","endgameClimb","autoClimb"]},"events":{"type":"array","items":{"type":"object","properties":{"eventUuid":{"type":"string","format":"uuid"},"time":{"type":"number"},"action":{"type":"string","enum":["START_SCORING","STOP_SCORING","START_MATCH","START_CAMPING","STOP_CAMPING","START_DEFENDING","STOP_DEFENDING","INTAKE","OUTTAKE","DISRUPT","CROSS","CLIMB","START_FEEDING","STOP_FEEDING"]},"position":{"type":"string","enum":["LEFT_TRENCH","LEFT_BUMP","HUB","RIGHT_TRENCH","RIGHT_BUMP","NEUTRAL_ZONE","DEPOT","OUTPOST","NONE"]},"points":{"type":"integer"},"quantity":{"type":["integer","null"]},"scoutReportUuid":{"type":"string","format":"uuid"}},"required":["eventUuid","time","action","position","points","scoutReportUuid"]}}},"required":["scoutReport","events"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"delete":{"security":[{"bearerAuth":[]}],"tags":["Manager - Scout Reports"],"summary":"Delete scout report","parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scoutreports/setflag/{report}":{"post":{"security":[{"bearerAuth":[]}],"tags":["Manager - Scout Reports"],"summary":"Set or remove your flag on a scout report","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"report","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":true,"name":"flag","in":"query"}],"responses":{"200":{"description":"Flag updated","content":{"application/json":{"schema":{"type":"object","properties":{"flagged":{"type":"boolean"},"flagCount":{"type":"integer","minimum":0}},"required":["flagged","flagCount"]}}}},"400":{"description":"Invalid report parameter or flag value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Authentication required or no team assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Team is not verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Report not found or outside allowed sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scoutershifts/{uuid}":{"post":{"tags":["Manager - Scouter Shifts"],"summary":"Update scouter shift","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startMatchOrdinalNumber":{"type":"integer"},"endMatchOrdinalNumber":{"type":"integer"},"team1":{"type":"array","items":{"type":"string"}},"team2":{"type":"array","items":{"type":"string"}},"team3":{"type":"array","items":{"type":"string"}},"team4":{"type":"array","items":{"type":"string"}},"team5":{"type":"array","items":{"type":"string"}},"team6":{"type":"array","items":{"type":"string"}}},"required":["startMatchOrdinalNumber","endMatchOrdinalNumber","team1","team2","team3","team4","team5","team6"]}}}},"responses":{"200":{"description":"Updated"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key, or not a scouting lead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Shift not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"delete":{"tags":["Manager - Scouter Shifts"],"summary":"Delete scouter shift","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/settings":{"put":{"tags":["Manager - Settings"],"summary":"Update sources","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"teamSource":{"type":"array","items":{"type":"integer"}},"tournamentSource":{"type":"array","items":{"type":"string"}}},"required":["teamSource","tournamentSource"]}}}},"responses":{"200":{"description":"Updated","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/settings/teamsource":{"get":{"tags":["Manager - Settings"],"summary":"Get team source","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Team source","content":{"application/json":{"schema":{"anyOf":[{"type":"string","enum":["THIS_TEAM"]},{"type":"string","enum":["ALL_TEAMS"]},{"type":"array","items":{"type":"integer"}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"post":{"tags":["Manager - Settings"],"summary":"Add team source","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["ALL_TEAMS"]}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["THIS_TEAM"]}},"required":["mode"]},{"type":"object","properties":{"teams":{"type":"array","items":{"type":"integer"}}},"required":["teams"]}]}}}},"responses":{"200":{"description":"Added","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Not affiliated with a team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/settings/tournamentsource":{"get":{"tags":["Manager - Settings"],"summary":"Get tournament source","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Tournament source","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"post":{"tags":["Manager - Settings"],"summary":"Add tournament source","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tournaments":{"type":"array","items":{"type":"string"}}},"required":["tournaments"]}}}},"responses":{"200":{"description":"Added","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/settings/teamemail":{"get":{"tags":["Manager - Settings"],"summary":"Get team email","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Team email","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"put":{"tags":["Manager - Settings"],"summary":"Update team email","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"email"},"required":true,"name":"email","in":"query"}],"responses":{"200":{"description":"Verification sent","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/apikey":{"post":{"tags":["Manager - API Keys"],"summary":"Create a new API key","description":"JWT required; API keys (lvt-...) are not permitted for this endpoint.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"name","in":"query"}],"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"}},"required":["apiKey"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden for API key auth","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"delete":{"tags":["Manager - API Keys"],"summary":"Revoke an API key","description":"JWT required; API keys (lvt-...) are not permitted for this endpoint.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"query"}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden for API key auth","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"patch":{"tags":["Manager - API Keys"],"summary":"Rename an API key","description":"JWT required; API keys (lvt-...) are not permitted for this endpoint.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"query"},{"schema":{"type":"string"},"required":true,"name":"newName","in":"query"}],"responses":{"200":{"description":"Renamed","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden for API key auth","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}},"get":{"tags":["Manager - API Keys"],"summary":"List API keys","description":"Returns current user's API keys. Accepts JWT or API keys.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Keys","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsed":{"type":["string","null"],"format":"date-time"},"requests":{"type":"integer"},"user":{"type":"object","properties":{"username":{"type":["string","null"]}},"required":["username"]}},"required":["uuid","name","createdAt","lastUsed","requests","user"]}}},"required":["apiKeys"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/upcoming-entered-tournaments":{"get":{"tags":["Manager - Tournaments"],"summary":"Next two future Blue Alliance events for the signed-in user's team","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Events in start-date order; week numbers start at one"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"502":{"description":"Blue Alliance event data unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/teams":{"get":{"tags":["Manager - Teams"],"summary":"List teams with optional pagination and filter","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"take","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"filter","in":"query"}],"responses":{"200":{"description":"Teams and total count","content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":"string"}},"required":["number","name"]}},"count":{"type":"number"}},"required":["teams","count"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/tournaments":{"get":{"tags":["Manager - Tournaments"],"summary":"List tournaments with optional pagination and filter","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"take","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"filter","in":"query"}],"responses":{"200":{"description":"Tournaments and total count","content":{"application/json":{"schema":{"type":"object","properties":{"tournaments":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"location":{"type":["string","null"]},"date":{"type":["string","null"]}},"required":["key","name"]}},"count":{"type":"number"}},"required":["tournaments","count"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/matches/{tournament}":{"get":{"tags":["Manager - Matches"],"summary":"List matches for a tournament","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tournament","in":"path"},{"schema":{"type":"string"},"required":false,"name":"teams","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Defaults to false. When true, append practice matches (matchType 2) with a teams array instead of team1–team6. Official scouting-shift numbering is unchanged."},"required":false,"description":"Defaults to false. When true, append practice matches (matchType 2) with a teams array instead of team1–team6. Official scouting-shift numbering is unchanged.","name":"includePractice","in":"query"}],"responses":{"200":{"description":"Formatted match list","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"matchNumber":{"type":"integer"},"matchType":{"type":"integer"},"scouted":{"type":"boolean"},"finished":{"type":"boolean"},"team1":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team2":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team3":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team4":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team5":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team6":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]}},"required":["matchNumber","matchType","scouted","finished","team1","team2","team3","team4","team5","team6"]},{"type":"object","properties":{"matchNumber":{"type":"integer"},"matchType":{"type":"number","enum":[2]},"scouted":{"type":"boolean"},"finished":{"type":"boolean","enum":[false]},"teams":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"description":"Publicly scheduled or visibly reported practice teams, sorted by team number; no alliance slots"}},"required":["matchNumber","matchType","scouted","finished","teams"]}]}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/checkmatch":{"get":{"tags":["Manager - Matches"],"summary":"Check if a match exists and if a team is in the match","security":[],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tournamentKey","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"teamNumber","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"matchNumber","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["true"]},{"type":"string","enum":["false"]},{"type":"boolean"}],"description":"Legacy match selector; provide this or matchType."},"required":false,"description":"Legacy match selector; provide this or matchType.","name":"isElim","in":"query"},{"schema":{"type":"string","enum":["QUALIFICATION","ELIMINATION","PRACTICE"]},"required":false,"name":"matchType","in":"query"}],"responses":{"200":{"description":"Match data row and alliance","content":{"application/json":{"schema":{"type":"object","properties":{"match":{"type":"object","properties":{"key":{"type":"string"},"tournamentKey":{"type":"string"},"matchNumber":{"type":"integer"},"teamNumber":{"type":"integer"},"matchType":{"type":"string","enum":["QUALIFICATION","ELIMINATION","PRACTICE"]}},"required":["key","tournamentKey","matchNumber","teamNumber","matchType"]},"alliance":{"type":["string","null"],"enum":["red","blue",null]}},"required":["match","alliance"]}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Match not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/matchschedule/{tournament}":{"get":{"tags":["Manager - Matches"],"summary":"Fetch public match assignments for Collection, including scheduled practice matches","security":[],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"tournament","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"x-team-code","in":"header"}],"responses":{"200":{"description":"Official and publicly scheduled practice assignments, without private scouting data","content":{"application/json":{"schema":{"type":"object","properties":{"tournamentKey":{"type":"string"},"matches":{"type":"array","items":{"type":"object","properties":{"matchNumber":{"type":"integer"},"matchType":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"teams":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer"},"alliance":{"type":["string","null"],"enum":["red","blue",null]}},"required":["number","alliance"]}}},"required":["matchNumber","matchType","teams"]}}},"required":["tournamentKey","matches"]}}}},"400":{"description":"Missing team code or tournament","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Invalid team code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unable to fetch schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/profile":{"get":{"tags":["Manager - Account"],"summary":"Get current user profile","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"id":{"type":"string"},"username":{"type":["string","null"]},"email":{"type":"string","format":"email"},"role":{"type":"string"},"team":{"type":["object","null"],"properties":{"team":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":["string","null"]}},"required":["number","name"]}},"required":["team"]}},"required":["id","username","email","role","team"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/users":{"get":{"tags":["Manager - Users"],"summary":"List users","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Users","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"username":{"type":["string","null"]},"role":{"type":"string"}},"required":["id","email","username","role"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/user":{"delete":{"tags":["Manager - Users"],"summary":"Delete the current user","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/upgradeuser":{"post":{"tags":["Manager - Users"],"summary":"Upgrade current user to Scouting Lead","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Upgraded"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/analysts":{"get":{"tags":["Manager - Users"],"summary":"List analysts","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Analysts","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":["string","null"]}},"required":["id","username"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Not a scouting lead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/code":{"get":{"tags":["Manager - Teams"],"summary":"Get team code for current user","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Team code","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Not authorized to get the team code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/dashboard/scoutreport":{"post":{"tags":["Manager - Scout Reports"],"summary":"Create scout report from dashboard","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"match":{"type":"integer"},"team":{"type":"integer"},"notes":{"type":"string"}},"required":["match","team"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string"}},"required":["uuid"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/team-tournament-status":{"get":{"tags":["Manager - Tournaments"],"summary":"Get status of current team in tournaments","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object","properties":{"tournaments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"status":{"type":"string"}},"required":["id","code","status"]}}},"required":["tournaments"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/match-results-page":{"get":{"tags":["Manager - Matches"],"summary":"Get match results page data","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Results","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"matchNumber":{"type":"integer"},"matchType":{"type":"integer"},"scouted":{"type":"boolean"},"finished":{"type":"boolean"},"team1":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team2":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team3":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team4":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team5":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]},"team6":{"type":"object","properties":{"number":{"type":"integer"},"scouters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scouted":{"type":"boolean"}},"required":["name","scouted"]}},"externalReports":{"type":"integer"}},"required":["number","scouters","externalReports"]}},"required":["matchNumber","matchType","scouted","finished","team1","team2","team3","team4","team5","team6"]}}},"required":["matches"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/notes/{uuid}":{"put":{"tags":["Manager - Notes"],"summary":"Update scout report notes (SCOUTING_LEAD)","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}},"required":["note"]}}}},"responses":{"200":{"description":"Note updated"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/scoutershift/scouters":{"get":{"tags":["Manager - Scouters"],"summary":"List scouters for current team","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"archived","in":"query"}],"responses":{"200":{"description":"Scouters","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":["string","null"]}},"required":["uuid","name"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"User not affiliated with a team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/manager/noteam":{"post":{"tags":["Manager - Users"],"summary":"Set current user to ANALYST and remove team","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"teamNumber":{"type":["number","null"]}},"required":["id","role","teamNumber"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Cannot be performed using an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/metric/{metric}/team/{team}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Team Lookup"],"summary":"Metric details for team","parameters":[{"schema":{"type":"string"},"required":true,"name":"metric","in":"path"},{"schema":{"type":"string"},"required":true,"name":"team","in":"path"}],"responses":{"200":{"description":"Details","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/category/team/{team}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Team Lookup"],"summary":"Category metrics for team","parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"path"}],"responses":{"200":{"description":"Categories","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/breakdown/team/{team}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Team Lookup"],"summary":"Breakdown metrics for team","parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"path"}],"responses":{"200":{"description":"Breakdown","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/breakdown/team/{team}/{breakdown}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Team Lookup"],"summary":"Specific breakdown details","parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"path"},{"schema":{"type":"string"},"required":true,"name":"breakdown","in":"path"}],"responses":{"200":{"description":"Details","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/notes/team/{team}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Team Lookup"],"summary":"Notes for team","parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"path"}],"responses":{"200":{"description":"Notes","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"note":{"type":"string"}},"required":["note"]}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/flag/team/{team}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Team Lookup"],"summary":"Flags for team","parameters":[{"schema":{"type":"string"},"required":true,"name":"team","in":"path"}],"responses":{"200":{"description":"Flags","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"flag":{"type":"string"}},"required":["flag"]}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/csvplain":{"get":{"tags":["Analysis - CSV"],"summary":"Team CSV","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"team","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tournamentKey","in":"query"}],"responses":{"200":{"description":"CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters or not enough scouting data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/reportcsv":{"get":{"tags":["Analysis - CSV"],"summary":"Report CSV","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tournamentKey","in":"query"}],"responses":{"200":{"description":"CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters or not enough scouting data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/metrics/scoutreport/{uuid}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Scout Report"],"summary":"Metrics for specific scout report","parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Metrics","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/scoutreports/match/{match}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Scout Report"],"summary":"All scout reports for a match","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"match","in":"path"}],"responses":{"200":{"description":"Reports","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error or not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/timeline/scoutreport/{uuid}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Analysis - Scout Report"],"summary":"Timeline data for scout report","parameters":[{"schema":{"type":"string"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"Timeline","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/pitdisplay":{"get":{"tags":["Analysis"],"summary":"Public pit display data for a team/event","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"team","in":"query"},{"schema":{"type":"string"},"required":true,"name":"tournamentKey","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"topTeamCount","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"teamsAboveCount","in":"query"}],"responses":{"200":{"description":"Pit display payload","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Error generating display","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/alliance":{"get":{"tags":["Analysis"],"summary":"Alliance analysis for three teams","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"teamOne","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"teamTwo","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"teamThree","in":"query"}],"responses":{"200":{"description":"Alliance composition and metrics","content":{"application/json":{"schema":{"type":"object","properties":{"totalPoints":{"type":"number"},"teams":{"type":"array","items":{"type":"object","properties":{"team":{"type":"number"},"role":{"type":"number"},"averagePoints":{"type":"number"},"paths":{"type":"array","items":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"location":{"type":"number"},"event":{"type":"number"},"time":{"type":"number"}},"required":["location","event"]}},"matches":{"type":"array","items":{"type":"object","properties":{"matchKey":{"type":"string"},"tournamentName":{"type":"string"}},"required":["matchKey","tournamentName"]}},"score":{"type":"array","items":{"type":"number"}},"frequency":{"type":"number"},"maxScore":{"type":"number"}},"required":["positions","matches","score","frequency","maxScore"]}}},"required":["team","role","averagePoints","paths"]}},"l1StartTime":{"type":"array","items":{"type":["number","null"]}},"l2StartTime":{"type":"array","items":{"type":["number","null"]}},"l3StartTime":{"type":"array","items":{"type":["number","null"]}},"totalFuelOutputted":{"type":"number"},"totalBallThroughput":{"type":"number"}},"required":["totalPoints","teams","l1StartTime","l2StartTime","l3StartTime","totalFuelOutputted","totalBallThroughput"]}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/matchprediction":{"get":{"tags":["Analysis"],"summary":"Predict match outcome for two alliances","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"red1","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"red2","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"red3","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"blue1","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"blue2","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"blue3","in":"query"}],"responses":{"200":{"description":"Prediction and alliance details","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"red1":{"type":"number"},"red2":{"type":"number"},"red3":{"type":"number"},"blue1":{"type":"number"},"blue2":{"type":"number"},"blue3":{"type":"number"},"redWinning":{"type":"number"},"blueWinning":{"type":"number"},"winningAlliance":{"type":"number"},"redAlliance":{"type":"object","properties":{"totalPoints":{"type":"number"},"teams":{"type":"array","items":{"type":"object","properties":{"team":{"type":"number"},"role":{"type":"number"},"averagePoints":{"type":"number"},"paths":{"type":"array","items":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"location":{"type":"number"},"event":{"type":"number"},"time":{"type":"number"}},"required":["location","event"]}},"matches":{"type":"array","items":{"type":"object","properties":{"matchKey":{"type":"string"},"tournamentName":{"type":"string"}},"required":["matchKey","tournamentName"]}},"score":{"type":"array","items":{"type":"number"}},"frequency":{"type":"number"},"maxScore":{"type":"number"}},"required":["positions","matches","score","frequency","maxScore"]}}},"required":["team","role","averagePoints","paths"]}},"l1StartTime":{"type":"array","items":{"type":["number","null"]}},"l2StartTime":{"type":"array","items":{"type":["number","null"]}},"l3StartTime":{"type":"array","items":{"type":["number","null"]}},"totalFuelOutputted":{"type":"number"},"totalBallThroughput":{"type":"number"}},"required":["totalPoints","teams","l1StartTime","l2StartTime","l3StartTime","totalFuelOutputted","totalBallThroughput"]},"blueAlliance":{"type":"object","properties":{"totalPoints":{"type":"number"},"teams":{"type":"array","items":{"type":"object","properties":{"team":{"type":"number"},"role":{"type":"number"},"averagePoints":{"type":"number"},"paths":{"type":"array","items":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"location":{"type":"number"},"event":{"type":"number"},"time":{"type":"number"}},"required":["location","event"]}},"matches":{"type":"array","items":{"type":"object","properties":{"matchKey":{"type":"string"},"tournamentName":{"type":"string"}},"required":["matchKey","tournamentName"]}},"score":{"type":"array","items":{"type":"number"}},"frequency":{"type":"number"},"maxScore":{"type":"number"}},"required":["positions","matches","score","frequency","maxScore"]}}},"required":["team","role","averagePoints","paths"]}},"l1StartTime":{"type":"array","items":{"type":["number","null"]}},"l2StartTime":{"type":"array","items":{"type":["number","null"]}},"l3StartTime":{"type":"array","items":{"type":["number","null"]}},"totalFuelOutputted":{"type":"number"},"totalBallThroughput":{"type":"number"}},"required":["totalPoints","teams","l1StartTime","l2StartTime","l3StartTime","totalFuelOutputted","totalBallThroughput"]}},"required":["red1","red2","red3","blue1","blue2","blue3","redWinning","blueWinning","winningAlliance","redAlliance","blueAlliance"]},{"type":"object","properties":{"error":{"type":"string","enum":["not enough data"]}},"required":["error"]}]}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/qualrankingprediction":{"get":{"tags":["Analysis"],"summary":"Predict qual ranking for a tournament","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tournamentKey","in":"query"}],"responses":{"200":{"description":"Qual ranking prediction","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}},"/v1/analysis/picklist":{"get":{"tags":["Analysis"],"summary":"Compute picklist rankings for a tournament","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"tournamentKey","in":"query"},{"schema":{"type":"string"},"required":false,"name":"flags","in":"query"},{"schema":{"type":"string"},"required":false,"name":"stage","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"totalPoints","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"autoPoints","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"teleopPoints","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"driverAbility","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"climbResult","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"autoClimb","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"defenseEffectiveness","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"contactDefenseTime","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"campingDefenseTime","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"totalDefensiveTime","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"totalFuelThroughput","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"totalFuelFed","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"feedingRate","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"scoringRate","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"estimatedSuccessfulFuelRate","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"estimatedTotalFuelScored","in":"query"}],"responses":{"200":{"description":"Picklist ranking results","content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"object","properties":{"team":{"type":"number"},"result":{"type":"number"},"breakdown":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"result":{"type":"number"}},"required":["type","result"]}},"unweighted":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"result":{"type":"number"}},"required":["type","result"]}},"flags":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"result":{"type":"number"}},"required":["type","result"]}}},"required":["team","result","breakdown","unweighted","flags"]}}},"required":["teams"]}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"$ref":"#/components/responses/ApiErrorResponse"}}}}},"webhooks":{}}