openapi: 3.1.0 info: title: Tournament activity zzz-admin API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: zzz-admin paths: /v1/admin/users: x-service-id: account-service get: tags: - zzz-admin summary: Search users. operationId: search parameters: - name: query in: query required: false style: form explode: true schema: type: string - name: deleted in: query required: false style: form explode: true schema: type: boolean - name: sort in: query description: 'Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.' required: false style: form explode: true schema: type: string enum: - EARLIEST_CREATED - RECENTLY_CREATED - name: page in: query description: Zero-based page index (0..N) required: false style: form explode: true schema: type: integer default: 0 minimum: 0 - name: size in: query description: The size of the page to be returned required: false style: form explode: true schema: type: integer default: 20 minimum: 1 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Page' /v1/competitions/{competitionIdentifier}/admin/predictions/compute: x-service-id: competition-service post: tags: - zzz-admin summary: Compute predictions. operationId: compute parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PredictionComputeAdminForm' required: true responses: '200': description: OK /admin/runs/{runId}/logs/archive: x-service-id: competition-service post: tags: - zzz-admin summary: Archive a run's logs. operationId: archiveLogs parameters: - name: runId in: path required: true style: simple explode: false schema: type: integer format: int64 responses: '200': description: OK security: - accessToken: [] - apiKey: [] /admin/runs/try-map-lost-logs: x-service-id: competition-service post: tags: - zzz-admin summary: Try to map lost logs to their original runs. operationId: tryMapLostLogs requestBody: content: application/json: schema: $ref: '#/components/schemas/TryMapLostLogsForm' required: true responses: '200': description: OK security: - accessToken: [] - apiKey: [] /admin/runs/archive-old-runs: x-service-id: competition-service post: tags: - zzz-admin summary: Archive old runs. operationId: archiveOldRuns responses: '200': description: OK security: - accessToken: [] - apiKey: [] /admin/out-of-sample/selections/freeze: x-service-id: competition-service post: tags: - zzz-admin summary: Freeze project parameters selection. operationId: adminFreezeOutOfSampleSelections requestBody: content: application/json: schema: $ref: '#/components/schemas/OutOfSampleProjectFreezeForm' required: true responses: '200': description: OK security: - accessToken: [] - apiKey: [] /admin/out-of-sample/runs: x-service-id: competition-service post: tags: - zzz-admin summary: Create all runs. operationId: adminCreateAllOutOfSampleRuns requestBody: content: application/json: schema: $ref: '#/components/schemas/OutOfSampleRunCreateForm' required: true responses: '200': description: OK security: - accessToken: [] - apiKey: [] /admin/runs: x-service-id: competition-service get: tags: - zzz-admin summary: List all runs. operationId: list_1 parameters: - name: roundId in: query required: false style: form explode: true schema: type: integer format: int64 - name: crunchId in: query required: false style: form explode: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Run' security: - accessToken: [] - apiKey: [] delete: tags: - zzz-admin summary: Terminate all runs. operationId: terminateAll parameters: - name: roundId in: query required: false style: form explode: true schema: type: integer format: int64 - name: crunchId in: query required: false style: form explode: true schema: type: integer format: int64 responses: '200': description: OK security: - accessToken: [] - apiKey: [] /admin/runs/summary: x-service-id: competition-service get: tags: - zzz-admin summary: Get a summary of all runs. operationId: showSummary parameters: - name: roundId in: query required: false style: form explode: true schema: type: integer format: int64 - name: crunchId in: query required: false style: form explode: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: type: object additionalProperties: type: integer format: int64 security: - accessToken: [] - apiKey: [] /admin/out-of-sample/selections: x-service-id: competition-service get: tags: - zzz-admin summary: List selections. operationId: adminListOutOfSampleSelections parameters: - name: roundId in: query required: true style: form explode: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/ProjectSelection' security: - accessToken: [] - apiKey: [] /admin/out-of-sample/runs/execution-parameters: x-service-id: competition-service get: tags: - zzz-admin summary: Preview execution parameters operationId: adminPreviewOutofSampleExecutionParameters parameters: - name: crunchId in: query required: true style: form explode: true schema: type: integer format: int64 - name: dataReleaseId in: query required: false style: form explode: true schema: type: integer format: int64 - name: test in: query required: true style: form explode: true schema: type: boolean - name: userIds in: query required: false style: form explode: true schema: type: array items: type: integer format: int64 - name: all in: query description: Include ALL runs, not only thoses who failed or don't have a score. required: true style: form explode: true schema: type: boolean description: Include ALL runs, not only thoses who failed or don't have a score. - name: forceFirstTrainMode in: query required: true style: form explode: true schema: type: string enum: - IGNORE - FORCE - RESPECT - AUTOMATIC - name: determinismCheckEnabled in: query required: false style: form explode: true schema: type: boolean responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/ExecutionParameters' security: - accessToken: [] - apiKey: [] /admin/runs/{runId}: x-service-id: competition-service delete: tags: - zzz-admin summary: Delete a run. operationId: delete_1 parameters: - name: runId in: path required: true style: simple explode: false schema: type: integer format: int64 responses: '200': description: OK security: - accessToken: [] - apiKey: [] components: schemas: SubmissionFile: type: object properties: name: type: string size: type: integer format: int64 encrypted: type: boolean mimeType: type: string foundHardcodedString: type: boolean deprecated: true Competition: type: object properties: id: type: integer format: int64 name: type: string description: Slug-like name. displayName: type: string description: Display name for cards. fullName: type: string description: Full name for the overview. shortDescription: type: string description: Short description for cards. type: $ref: '#/components/schemas/CompetitionType' format: $ref: '#/components/schemas/CompetitionFormat' mode: $ref: '#/components/schemas/CompetitionMode' status: $ref: '#/components/schemas/CompetitionStatus' splitKeyType: $ref: '#/components/schemas/DataReleaseSplitKey' start: type: string format: date-time description: Start of competition. end: type: string format: date-time description: End of competition. (specified if not continuous) continuous: type: boolean description: Will the competition never end? external: type: boolean description: Is the competition external? If so, redirect to `url`. featured: type: boolean description: Is the competition featured? visibility: $ref: '#/components/schemas/CompetitionVisibility' url: type: string description: URL where the competition takes place. onChainId: type: string description: On-Chain ID where the competition takes place. Only if `mode` is `REAL_TIME`. cardImageUrl: type: string description: Image URL used for cards. bannerImageUrl: type: string description: Image URL used for the overview. documentationUrl: type: string description: External documentation URL. notebookUrl: type: string description: External baseline notebook URL. advancedNotebookUrl: type: string description: External advanced notebook URL. discussionUrl: type: string description: External discussion platform URL. (either discord or the forum) codeUrl: type: string description: External GitHub URL where the code is located. hostedByName: type: string description: Name of the competition organizer/host. prizePoolText: type: string description: Prize pool in a text form. prizePoolShortText: type: string description: Prize pool in a short text form. prizePoolUsd: type: number format: double description: Prize pool in USD. projectNameFormat: type: string description: Default project name format, use `{n}` for incremental. teamBased: type: boolean description: Are the teams enabled? onlyTeamLeader: type: boolean description: Does only the team leader appear on the leaderboard? maxTeamSize: type: integer format: int64 description: Maximum size for a team. projectCreationLimit: type: integer format: int64 description: Maximum number of projects per user, if one, a default project is always created when the rules are accepted. projectSelectionLimit: type: integer format: int64 description: If multiple project can be created, how many should appear on the leaderboard? allowPredictions: type: boolean description: Are direct prediction file accepted for submission? encryptSubmissions: type: boolean description: Should the predictions be encrypted? phalaKeyUrl: type: string description: If the prediction should be encrypted, which URL to use to fetch the public key? hideDashboard: type: boolean description: Is the dashboard tab hidden? hideChanges: type: boolean description: Are the dashboard change cards hidden? hidePerformance: type: boolean description: Is the dashboard performance graph hidden? hideRunPerformance: type: boolean description: Is the dashboard run performance graph hidden? hideStatistics: type: boolean description: Is the statistics card hidden? hideNotebookSetupCommand: type: boolean description: Should the setup command for the notebook be hidden? Only useful for Real Time competitions. hideTrainFrequency: type: boolean description: Should the train frequency field be hidden? hideForceFirstTrain: type: boolean description: Should the train field be hidden? web3: type: boolean description: Are the web3 integrations enabled for the competitions? (e.g. team referendums) order: type: integer format: int64 description: Sorting order of the competition. (descending) statistics: $ref: '#/components/schemas/CompetitionStatistics' description: Competition submission statistics. session: $ref: '#/components/schemas/CompetitionSession' description: Competition current session. No session if `null`. createdAt: type: string format: date-time description: Competition creation timestamp. updatedAt: type: string format: date-time description: Competition update timestamp. tags: type: array description: Tags that describe the competition. items: $ref: '#/components/schemas/CompetitionTag' timelineEvents: type: array description: Non-detailed timeline events. items: $ref: '#/components/schemas/TimelineEvent' Submission: type: object properties: id: type: integer format: int64 project: $ref: '#/components/schemas/Project' number: type: integer format: int64 type: $ref: '#/components/schemas/SubmissionType' message: type: string valid: type: boolean mainFilePath: type: string modelDirectoryPath: type: string gpuRequirement: $ref: '#/components/schemas/GpuRequirement' model: $ref: '#/components/schemas/Model' totalSize: type: integer format: int64 librariesVerified: type: boolean encrypted: type: boolean encryptionId: type: string createdAt: type: string format: date-time files: type: array items: $ref: '#/components/schemas/SubmissionFile' ProjectSelection: type: object properties: project: $ref: '#/components/schemas/Project' submission: $ref: '#/components/schemas/ProjectSelectionSubmission' trainFrequency: type: integer format: int64 forceFirstTrain: type: boolean runtimeType: $ref: '#/components/schemas/RuntimeType' runId: type: integer format: int64 runnable: type: boolean origin: $ref: '#/components/schemas/ProjectSelectionOrigin' createdAt: type: string format: date-time updatedAt: type: string format: date-time submissionId: type: integer format: int64 deprecated: true Crunch: type: object properties: id: type: integer format: int64 phase: $ref: '#/components/schemas/Phase' number: type: integer format: int64 start: type: string format: date-time end: type: string format: date-time showRuns: type: boolean showMetricsDetails: type: boolean showRunLogs: type: boolean showScoresValue: type: boolean leaderboardSimilarityThreshold: type: number format: float published: type: boolean dataReleaseId: type: integer format: int64 splits: type: array items: $ref: '#/components/schemas/CrunchSplit' User: type: object properties: id: type: integer format: int64 login: type: string Unit: type: object properties: prefix: type: string description: String to show before the value. suffix: type: string description: String to show after the value. scale: type: integer format: int32 description: Number of digits to keep after the comma. TimelineEvent: type: object properties: id: type: integer format: int64 type: $ref: '#/components/schemas/TimelineEventType' title: type: string description: type: string date: type: string format: date description: Date on which the event will occur/has occurred. color: type: string detailed: type: boolean description: Detailed event should be hidden in a space constrained UI. button: $ref: '#/components/schemas/TimelineEventButton' createdAt: type: string format: date-time updatedAt: type: string format: date-time ExecutionParameters: type: object properties: project: $ref: '#/components/schemas/Project' submission: $ref: '#/components/schemas/ExecutionParametersSubmission' runtimeDefinitionName: type: string runtimeType: $ref: '#/components/schemas/RuntimeType' trainFrequency: type: integer format: int64 forceFirstTrain: type: boolean runName: type: string modelName: type: string predictionName: type: string initialModelId: type: integer format: int64 determinismCheckEnabled: type: boolean nextChainHeightHint: type: integer format: int64 userId: type: integer format: int64 deprecated: true projectId: type: integer format: int64 deprecated: true submissionId: type: integer format: int64 deprecated: true CompetitionStatistics: type: object properties: entrants: type: integer format: int64 participants: type: integer format: int64 teams: type: integer format: int64 submissions: type: integer format: int64 runnables: type: integer format: int64 CompetitionStatus: type: string enum: - PENDING - OPEN - CLOSED ExecutionParametersSubmission: type: object properties: id: type: integer format: int64 number: type: integer format: int64 PhaseSplit: type: object properties: key: type: object anyOf: - type: integer format: int64 - type: string example: 1 Project: type: object properties: id: type: integer format: int64 competitionId: type: integer format: int64 user: $ref: '#/components/schemas/User' name: type: string selected: type: boolean submitted: type: boolean note: type: string writeupUrl: type: string writeupArchived: type: boolean createdAt: type: string format: date-time updatedAt: type: string format: date-time userId: type: integer format: int64 deprecated: true ProjectSelectionOrigin: type: string enum: - SELECTION - PREVIOUS_ROUND - LAST_RUN ProjectSelectionSubmission: type: object properties: id: type: integer format: int64 number: type: integer format: int64 RuntimeType: type: string enum: - CPU - GPU - COPY PhaseType: type: string enum: - SUBMISSION - OUT_OF_SAMPLE Round: type: object properties: id: type: integer format: int64 competition: $ref: '#/components/schemas/Competition' number: type: integer format: int64 start: type: string format: date-time end: type: string format: date-time automaticSelectionFreezeEnabled: type: boolean automaticSubmissionPhaseCrunchCreationEnabled: type: boolean automaticSubmissionPhaseLeaderboardUpdateEnabled: type: boolean predictionSizeLimit: type: integer format: int64 maxSubmissionsPerDay: type: integer format: int64 Phase: type: object properties: id: type: integer format: int64 type: $ref: '#/components/schemas/PhaseType' start: type: string format: date-time end: type: string format: date-time dataReleaseId: type: integer format: int64 localDataReleaseId: type: integer format: int64 cloudCredits: anyOf: - $comment: Seconds example: '60' - format: duration $anchor: https://en.wikipedia.org/wiki/ISO_week_date $comment: ISO 8601 Duration example: PT1M perCrunchWeight: type: number format: float autoCompute: type: boolean runDisabled: type: boolean showPositions: type: boolean showProjectNames: type: boolean runDeterminismCheckEnabled: type: boolean showOnlyRewardedProjectsDefault: type: boolean splits: type: array items: $ref: '#/components/schemas/PhaseSplit' CompetitionFormat: type: string enum: - TIMESERIES - DAG - STREAM - SPATIAL - UNSTRUCTURED Model: type: object properties: id: type: integer format: int64 name: type: string project: $ref: '#/components/schemas/Project' totalSize: type: integer format: int64 encrypted: type: boolean encryptionId: type: string createdAt: type: string format: date-time RunStatus: type: string enum: - CREATED - PENDING - RUNNING - CLEANING - COMPLETED TimelineEventButton: type: object properties: text: type: string link: type: string color: type: string OutOfSampleRunCreateForm: type: object properties: crunchId: type: integer format: int64 dataReleaseId: type: integer format: int64 test: type: boolean userIds: type: array items: type: integer format: int64 all: type: boolean description: Include ALL runs, not only thoses who failed or don't have a score. forceFirstTrainMode: type: string enum: - IGNORE - FORCE - RESPECT - AUTOMATIC determinismCheckEnabled: type: boolean determinismCheckEnabledAsOptional: type: boolean required: - all - crunchId - forceFirstTrainMode - test UserAdmin: type: object properties: id: type: integer format: int64 login: type: string email: type: string role: $ref: '#/components/schemas/UserRole' ethereumAddress: type: string country: type: string TimelineEventType: type: string enum: - GENERIC - LEADERBOARD - RULES - REWARDS Run: type: object properties: id: type: integer format: int64 round: $ref: '#/components/schemas/Round' crunch: $ref: '#/components/schemas/Crunch' submission: $ref: '#/components/schemas/Submission' project: $ref: '#/components/schemas/Project' initialModel: $ref: '#/components/schemas/Model' terminalModel: $ref: '#/components/schemas/Model' prediction: $ref: '#/components/schemas/Prediction' runtimeType: $ref: '#/components/schemas/RuntimeType' name: type: string trainFrequency: type: integer format: int64 forceFirstTrain: type: boolean chainHeight: type: integer format: int64 determinismCheckEnabled: type: boolean deterministic: type: boolean status: $ref: '#/components/schemas/RunStatus' success: type: boolean errorMessage: type: string errorTrace: type: string exitCode: type: integer format: int32 exitReason: type: string terminated: type: boolean managed: type: boolean createdAt: type: string format: date-time updatedAt: type: string format: date-time startedAt: type: string format: date-time endedAt: type: string format: date-time duration: anyOf: - $comment: Seconds example: '60' - format: duration $anchor: https://en.wikipedia.org/wiki/ISO_week_date $comment: ISO 8601 Duration example: PT1M cpu: type: integer format: int32 memory: type: integer format: int32 Prediction: type: object properties: id: type: integer format: int64 name: type: string project: $ref: '#/components/schemas/Project' valid: type: boolean success: type: boolean error: type: string deterministic: type: boolean primaryMean: type: number format: double primaryUnit: $ref: '#/components/schemas/Unit' means: type: object additionalProperties: type: number format: double files: type: array items: $ref: '#/components/schemas/PredictionFile' managed: type: boolean createdAt: type: string format: date-time bestDisplayUnit: type: string deprecated: true bestMean: type: number format: double deprecated: true bestUnit: $ref: '#/components/schemas/Unit' deprecated: true SubmissionType: type: string enum: - CODE - NOTEBOOK - PREDICTION CompetitionTag: type: object properties: name: type: string description: Slug-like name. displayName: type: string description: Display name for the UI. GpuRequirement: type: string enum: - OPTIONAL - RECOMMENDED - REQUIRED UserRole: type: string enum: - USER - MODERATOR - ADMINISTRATOR CompetitionVisibility: type: string enum: - HIDDEN - PUBLIC PredictionFile: type: object properties: name: type: string size: type: integer format: int64 CrunchSplit: type: object properties: key: type: object anyOf: - type: integer format: int64 - type: string example: 1 TryMapLostLogsForm: type: object properties: runIds: type: array items: type: integer format: int64 required: - runIds DataReleaseSplitKey: type: string enum: - INTEGER - STRING CompetitionType: type: string enum: - OPEN - PAUSED CompetitionMode: type: string enum: - OFFLINE - REAL_TIME OutOfSampleProjectFreezeForm: type: object properties: roundId: type: integer format: int64 test: type: boolean userIds: type: array items: type: integer format: int64 required: - roundId - test CompetitionSession: type: object properties: state: $ref: '#/components/schemas/CompetitionType' description: Current session state. nextChange: type: string format: date-time description: When should the next session state change happen. Unknown if `null`. Page: type: object properties: pageNumber: type: integer format: int64 pageSize: type: integer format: int64 totalElements: type: integer format: int64 totalPages: type: integer format: int64 content: type: array items: $ref: '#/components/schemas/UserAdmin' PredictionComputeAdminForm: type: object properties: crunchId: type: integer format: int64 targetNames: type: array items: type: string onlyMissing: type: boolean required: - crunchId - targetNames securitySchemes: apiKey: type: apiKey name: apiKey in: query scheme: token accessToken: type: http in: header scheme: Bearer externalDocs: description: docs.crunchdao.com url: https://docs.crunchdao.com