CrunchDAO model API

The model API from CrunchDAO — 3 operation(s) for model.

OpenAPI Specification

crunchdao-model-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Tournament activity model API
  description: CrunchDAO Tournament Platform API Endpoints
  version: v2
servers:
- url: http://api.hub.crunchdao.com
  description: Generated server url
security: []
tags:
- name: model
paths:
  /v3/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/models:
    x-service-id: competition-service
    get:
      tags:
      - model
      summary: List models.
      operationId: listModels
      parameters:
      - name: competitionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: userLogin
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: projectIdentifier
        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/Model'
      security:
      - apiKey: []
  /v3/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/models/{modelId}:
    x-service-id: competition-service
    get:
      tags:
      - model
      summary: Show a model.
      operationId: getModel
      parameters:
      - name: competitionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: userLogin
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: projectIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: modelId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
      security:
      - apiKey: []
  /v3/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/models/{modelId}/files:
    x-service-id: competition-service
    get:
      tags:
      - model
      summary: List a model's files.
      operationId: listModelFiles
      parameters:
      - name: competitionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: userLogin
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: projectIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: modelId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModelFile'
      security:
      - accessToken: []
      - apiKey: []
components:
  schemas:
    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
    ModelFile:
      type: object
      properties:
        name:
          type: string
        size:
          type: integer
          format: int64
        encrypted:
          type: boolean
        mimeType:
          type: string
    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
    User:
      type: object
      properties:
        id:
          type: integer
          format: int64
        login:
          type: string
  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