CrunchDAO project:token API

The project:token API from CrunchDAO — 4 operation(s) for project:token.

OpenAPI Specification

crunchdao-project-token-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Tournament activity project:token API
  description: CrunchDAO Tournament Platform API Endpoints
  version: v2
servers:
- url: http://api.hub.crunchdao.com
  description: Generated server url
security: []
tags:
- name: project:token
paths:
  /v3/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/tokens:
    x-service-id: competition-service
    post:
      tags:
      - project:token
      summary: Create a temporary project token.
      operationId: createProjectToken
      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
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectTokenUpgradeForm'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectToken'
  /v2/project-tokens/upgrade:
    x-service-id: competition-service
    post:
      tags:
      - project:token
      summary: Upgrade a temporary project token to a permanent token.
      operationId: upgradeProjectToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectTokenUpgradeForm'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectToken'
  /v4/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/clone:
    x-service-id: competition-service
    get:
      tags:
      - project:token
      summary: Clone a project.
      operationId: cloneProjectV4
      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: pushToken
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: string
      - name: submissionNumber
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: integer
          format: int64
      - name: includeModel
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
                  format: uri
  /v3/competitions/{competitionIdentifier}/projects/{userLogin}/clone:
    x-service-id: competition-service
    get:
      tags:
      - project:token
      summary: Clone a project.
      operationId: cloneProjectV3
      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: pushToken
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: string
      - name: submissionNumber
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: integer
          format: int64
      - name: includeModel
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
                  format: uri
      deprecated: true
components:
  schemas:
    ProjectTokenUpgradeForm:
      type: object
      properties:
        cloneToken:
          type: string
    ProjectTokenType:
      type: string
      enum:
      - TEMPORARY
      - PERMANENT
    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
    ProjectToken:
      type: object
      properties:
        id:
          type: integer
          format: int64
        project:
          $ref: '#/components/schemas/Project'
        plain:
          type: string
        type:
          $ref: '#/components/schemas/ProjectTokenType'
        createdAt:
          type: string
          format: date-time
        validUntil:
          type: string
          format: date-time
        lastUsedAt:
          type: string
          format: date-time
  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