CrunchDAO institution API

The institution API from CrunchDAO — 5 operation(s) for institution.

OpenAPI Specification

crunchdao-institution-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Tournament activity institution API
  description: CrunchDAO Tournament Platform API Endpoints
  version: v2
servers:
- url: http://api.hub.crunchdao.com
  description: Generated server url
security: []
tags:
- name: institution
paths:
  /v1/institutions/{institutionIdentifier}:
    x-service-id: competition-service
    get:
      tags:
      - institution
      summary: Show an institution.
      operationId: getInstitution
      parameters:
      - name: institutionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Institution'
  /v1/institutions/{institutionIdentifier}/participations:
    x-service-id: competition-service
    get:
      tags:
      - institution
      summary: Get the institution positions of a global leaderboard.
      operationId: listGlobalLeaderboardInstitutionPositions
      parameters:
      - name: institutionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: globalLeaderboardIdentifier
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: string
          default: INSTANCE
      - 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
      - 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: array
          items:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageInstitutionParticipation'
  /v1/institutions/{institutionIdentifier}/members:
    x-service-id: competition-service
    get:
      tags:
      - institution
      summary: Show an institution.
      operationId: getInstitution_1
      parameters:
      - name: institutionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - 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
      - 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: array
          items:
            type: string
      - name: userLogin
        in: query
        description: Filter on user's login. Allow for a pattern (%).
        required: false
        style: form
        explode: true
        schema:
          type: boolean
          description: Filter on user's login. Allow for a pattern (%).
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageInstitutionMember'
  /v1/institutions/{institutionIdentifier}/banner:
    x-service-id: competition-service
    get:
      tags:
      - institution
      summary: Show an institution's banner.
      operationId: getInstitutionBanner
      parameters:
      - name: institutionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: temporaryRedirect
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: boolean
      responses:
        '302':
          description: Found
  /v1/institutions/{institutionIdentifier}/avatar:
    x-service-id: competition-service
    get:
      tags:
      - institution
      summary: Show an institution's avatar.
      operationId: getInstitutionAvatar
      parameters:
      - name: institutionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: temporaryRedirect
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: boolean
      responses:
        '302':
          description: Found
components:
  schemas:
    InstitutionParticipationPerformance:
      type: object
      properties:
        bestMember:
          $ref: '#/components/schemas/InstitutionParticipationPerformanceBestMember'
          description: Best member on the competition's leaderboard.
        memberCount:
          type: integer
          format: int64
          description: Number of member on the competition's leaderboard.
        totalPoints:
          type: integer
          format: int64
          description: Total number of points earned by the institution's members on the competition.
    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'
    PageInstitutionMember:
      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/InstitutionMember'
    User:
      type: object
      properties:
        id:
          type: integer
          format: int64
        login:
          type: string
    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
    Institution:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
          description: Slug-like name.
        displayName:
          type: string
          description: Display name for cards.
        country:
          type: string
          description: Country of origin.
        totalPoints:
          type: integer
          format: int64
          description: Sum of all members' points.
        memberCount:
          type: integer
          format: int64
          description: Number of members.
        globalRank:
          type: integer
          format: int64
          description: Rank of the institution in the global leaderboard. Updated daily.
        about:
          type: string
          description: About description.
        websiteUrl:
          type: string
          description: Website URL.
        twitterUrl:
          type: string
          description: Twitter URL.
        linkedInUrl:
          type: string
          description: LInkedIn URL.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    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
    InstitutionParticipation:
      type: object
      properties:
        id:
          type: integer
          format: int64
        competition:
          $ref: '#/components/schemas/Competition'
        performance:
          $ref: '#/components/schemas/InstitutionParticipationPerformance'
          description: Performance of the institution in the competition.
        createdAt:
          type: string
          format: date-time
    CompetitionFormat:
      type: string
      enum:
      - TIMESERIES
      - DAG
      - STREAM
      - SPATIAL
      - UNSTRUCTURED
    TimelineEventButton:
      type: object
      properties:
        text:
          type: string
        link:
          type: string
        color:
          type: string
    PageInstitutionParticipation:
      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/InstitutionParticipation'
    TimelineEventType:
      type: string
      enum:
      - GENERIC
      - LEADERBOARD
      - RULES
      - REWARDS
    CompetitionTag:
      type: object
      properties:
        name:
          type: string
          description: Slug-like name.
        displayName:
          type: string
          description: Display name for the UI.
    InstitutionParticipationPerformanceBestMember:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/User'
        leaderboardRank:
          type: number
          format: double
    CompetitionVisibility:
      type: string
      enum:
      - HIDDEN
      - PUBLIC
    DataReleaseSplitKey:
      type: string
      enum:
      - INTEGER
      - STRING
    CompetitionType:
      type: string
      enum:
      - OPEN
      - PAUSED
    GlobalUser:
      type: object
      properties:
        id:
          type: integer
          format: int64
        login:
          type: string
        country:
          type: string
          description: Country of the user.
        points:
          type: integer
          format: int64
          description: Number of points on the global leaderboard. Updated daily.
        globalRank:
          type: integer
          format: int64
          description: Rank of the user in the global leaderboard. Updated daily.
    CompetitionMode:
      type: string
      enum:
      - OFFLINE
      - REAL_TIME
    InstitutionMember:
      type: object
      properties:
        id:
          type: integer
          format: int64
        user:
          $ref: '#/components/schemas/GlobalUser'
        rank:
          type: integer
          format: int64
          description: Rank of the user in the institution. Updated daily.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    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`.
  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