openapi: 3.1.0 info: title: Tournament activity certificate API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: certificate paths: /v1/certificates: x-service-id: competition-service post: tags: - certificate summary: Create a certificate. operationId: createCertificate parameters: - name: uuid in: query required: false style: form explode: true schema: type: string format: uuid - name: userId in: query required: true style: form explode: true schema: type: integer format: int64 - name: competitionId in: query required: true style: form explode: true schema: type: integer format: int64 - name: date in: query required: true style: form explode: true schema: type: string format: date requestBody: content: multipart/form-data: schema: type: object properties: loginPngFile: type: file loginPdfFile: type: file firstLastPngFile: type: file firstLastPdfFile: type: file required: - firstLastPdfFile - firstLastPngFile - loginPdfFile - loginPngFile responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Certificate' /v1/certificates/{certificateUuid}: x-service-id: competition-service get: tags: - certificate summary: Show a certificate by identifier. operationId: getCertificate parameters: - name: certificateUuid in: path required: true style: simple explode: false schema: type: string format: uuid - name: nameVariant in: query required: false style: form explode: true schema: type: string enum: - LOGIN - FIRST_LAST - name: extensionVariant in: query required: false style: form explode: true schema: type: string default: PNG enum: - PNG - PDF responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Certificate' patch: tags: - certificate summary: Update a certificate. operationId: updateCertificate parameters: - name: certificateUuid in: path required: true style: simple explode: false schema: type: string format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/CertificateUpdateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Certificate' /v1/users/{userLogin}/certificates: x-service-id: competition-service get: tags: - certificate summary: List certificates of a users. operationId: listCertificates parameters: - name: userLogin in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Certificate' components: schemas: CertificateUpdateForm: type: object properties: nameVariant: type: string enum: - LOGIN - FIRST_LAST 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' TimelineEventButton: type: object properties: text: type: string link: type: string color: type: string CompetitionVisibility: type: string enum: - HIDDEN - PUBLIC User: type: object properties: id: type: integer format: int64 login: type: string TimelineEventType: type: string enum: - GENERIC - LEADERBOARD - RULES - REWARDS 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 CertificateNameVariant: type: string enum: - LOGIN - FIRST_LAST DataReleaseSplitKey: type: string enum: - INTEGER - STRING CompetitionType: type: string enum: - OPEN - PAUSED 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 CompetitionMode: type: string enum: - OFFLINE - REAL_TIME Certificate: type: object properties: id: type: integer format: int64 uuid: type: string format: uuid user: $ref: '#/components/schemas/User' competition: $ref: '#/components/schemas/Competition' number: type: integer format: int64 date: type: string format: date nameVariant: $ref: '#/components/schemas/CertificateNameVariant' pictureUrl: type: string userId: type: integer format: int64 deprecated: true CompetitionStatus: type: string enum: - PENDING - OPEN - CLOSED 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`. CompetitionFormat: type: string enum: - TIMESERIES - DAG - STREAM - SPATIAL - UNSTRUCTURED CompetitionTag: type: object properties: name: type: string description: Slug-like name. displayName: type: string description: Display name for the UI. 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