CrunchDAO pitch API

The pitch API from CrunchDAO — 2 operation(s) for pitch.

OpenAPI Specification

crunchdao-pitch-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Tournament activity pitch API
  description: CrunchDAO Tournament Platform API Endpoints
  version: v2
servers:
- url: http://api.hub.crunchdao.com
  description: Generated server url
security: []
tags:
- name: pitch
paths:
  /v1/seasons/{seasonNumber}/pitches:
    x-service-id: competition-service
    get:
      tags:
      - pitch
      summary: List pitches with filters.
      operationId: listPitches
      parameters:
      - name: seasonNumber
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      - name: status
        in: query
        description: Filter for pitches with a specific status(es).
        required: false
        style: form
        explode: true
        schema:
          type: array
          description: Filter for pitches with a specific status(es).
          items:
            $ref: '#/components/schemas/PitchStatus'
      - name: sort
        in: query
        description: Sort pitches.
        required: false
        style: form
        explode: true
        schema:
          type: string
          description: Sort pitches.
          enum:
          - NAME
          - RANK
      - 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/PagePitch'
  /v1/seasons/{seasonNumber}/pitches/{pitchName}:
    x-service-id: competition-service
    get:
      tags:
      - pitch
      summary: Show a pitch.
      operationId: getPitch
      parameters:
      - name: seasonNumber
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      - name: pitchName
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pitch'
components:
  schemas:
    Pitch:
      type: object
      properties:
        id:
          type: integer
          format: int64
        season:
          $ref: '#/components/schemas/Season'
          description: Promotion season.
        name:
          type: string
          description: Slug-like name.
        organizer:
          $ref: '#/components/schemas/Organizer'
          description: Parent organizer.
        displayName:
          type: string
          description: Display name for cards.
        shortDescription:
          type: string
          description: Short description for cards.
        status:
          $ref: '#/components/schemas/PitchStatus'
        githubRepository:
          type: string
          description: GitHub repository name, using `<owner>/<repo>` format.
        websiteUrl:
          type: string
        discordUrl:
          type: string
        twitterUrl:
          type: string
        externalUrl:
          type: string
        externalUrlText:
          type: string
          description: Used to change displayed link text for `externalUrl`.
        stake:
          $ref: '#/components/schemas/Unit'
          description: Staking information.
        createdAt:
          type: string
          format: date-time
          description: Pitch creation timestamp.
    Organizer:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
          description: Slug-like number.
        displayName:
          type: string
          description: Display name for cards.
        onChainId:
          type: string
          description: On chain address linked to this organizer. Only set if is a coordinator.
        logoImageUrl:
          type: string
          description: Logo image URL for cards.
        bannerImageUrl:
          type: string
          description: Banner URL for cards.
        stake:
          $ref: '#/components/schemas/Unit'
          description: Staking information. Only set if `onChainId` is also set.
    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.
    Season:
      type: object
      properties:
        id:
          type: integer
          format: int64
        number:
          type: integer
          format: int64
          description: Slug-like number.
        displayName:
          type: string
          description: Display name for cards.
        shortDescription:
          type: string
          description: Short description for cards.
        description:
          type: string
          description: Full description.
        status:
          $ref: '#/components/schemas/SeasonStatus'
        start:
          type: string
          format: date-time
          description: Start of the season.
        end:
          type: string
          format: date-time
          description: End of the season.
        stakeGoal:
          type: integer
          description: Staking goal to reach in the season.
        createdAt:
          type: string
          format: date-time
          description: Season creation timestamp.
    PitchStatus:
      type: string
      description: Filter for pitches with a specific status(es).
      enum:
      - VOTING
      - VALIDATED
      - CANCELLED
    SeasonStatus:
      type: string
      description: Filter for seasons with a specific status(es).
      enum:
      - VOTING
      - OPEN
      - CLOSED
    PagePitch:
      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/Pitch'
  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