openapi: 3.1.0 info: title: Tournament activity phase API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: phase paths: /v2/competitions/{competitionIdentifier}/rounds/{roundIdentifier}/phases: x-service-id: competition-service get: tags: - phase summary: List phases. operationId: listPhases parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: roundIdentifier 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/Phase' post: tags: - phase summary: Create a phase. operationId: createPhase parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: roundIdentifier in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PhaseCreateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Phase' /v2/competitions/{competitionIdentifier}/rounds/{roundIdentifier}/phases/{phaseIdentifier}: x-service-id: competition-service get: tags: - phase summary: Show a phase. operationId: getPhase parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: roundIdentifier in: path required: true style: simple explode: false schema: type: string - name: phaseIdentifier in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Phase' patch: tags: - phase summary: Show a phase. operationId: updatePhase parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: roundIdentifier in: path required: true style: simple explode: false schema: type: string - name: phaseIdentifier in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PhaseUpdateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Phase' components: schemas: PhaseUpdateForm: type: object properties: 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 maximum: 1 minimum: 0 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/PhaseSplitCreateForm' PhaseSplitCreateForm: type: object properties: key: type: object anyOf: - type: integer format: int64 - type: string example: 1 required: - key PhaseCreateForm: type: object properties: 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 maximum: 1 minimum: 0 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/PhaseSplitCreateForm' required: - autoCompute - cloudCredits - end - perCrunchWeight - runDeterminismCheckEnabled - runDisabled - showOnlyRewardedProjectsDefault - showPositions - showProjectNames - splits - start - type PhaseSplit: type: object properties: key: type: object anyOf: - type: integer format: int64 - type: string example: 1 PhaseType: type: string enum: - SUBMISSION - OUT_OF_SAMPLE 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' 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