openapi: 3.1.0 info: title: Tournament activity team API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: team paths: /v1/competitions/{competitionIdentifier}/teams: x-service-id: competition-service get: tags: - team summary: List teams. operationId: listTeams parameters: - name: competitionIdentifier 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/Team' post: tags: - team summary: Create a team. operationId: createTeam parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/TeamCreateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Team' /v1/competitions/{competitionIdentifier}/teams/{teamIdentifier}: x-service-id: competition-service get: tags: - team summary: Show a team. operationId: getTeam parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: teamIdentifier in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Team' patch: tags: - team summary: Update a team. operationId: updateTeam parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: teamIdentifier in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/TeamUpdateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Team' /v2/competitions/{competitionIdentifier}/teams: x-service-id: competition-service get: tags: - team summary: List teams with filters. operationId: listTeamsV2 parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: name in: query description: Filter on name, display name and full name. Allow for a pattern (%). required: false style: form explode: true schema: type: string description: Filter on name, display name and full name. Allow for a pattern (%). - name: deleted in: query description: Filter on deleted. required: false style: form explode: true schema: type: boolean description: Filter on deleted. - name: lookingForTeammates in: query description: Filter on looking for teammates. required: false style: form explode: true schema: type: boolean description: Filter on looking for teammates. - name: sort in: query description: Sort teams. required: false style: form explode: true schema: type: string description: Sort teams. enum: - ALPHABETICALLY - RECENT - OLDEST - SMALLEST - BIGGEST - name: includeMembers in: query description: Include the members in the response. required: false style: form explode: true schema: type: string description: Include the members in the response. enum: - ALWAYS - IF_NOT_DELETED - NEVER - 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/PageTeam' /v1/competitions/{competitionIdentifier}/teams/{teamIdentifier}/members: x-service-id: competition-service get: tags: - team summary: List a team's members. operationId: listTeamMembers parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: teamIdentifier 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/TeamMember' components: schemas: TeamUpdateForm: type: object properties: name: type: string description: type: string lookingForTeammates: type: boolean Team: type: object properties: id: type: integer format: int64 name: type: string description: type: string leader: $ref: '#/components/schemas/User' description: Team leader, or `null` if leaders are disabled. size: type: integer format: int32 deleted: type: boolean lookingForTeammates: type: boolean members: type: array items: $ref: '#/components/schemas/TeamMember' createdAt: type: string format: date-time updatedAt: type: string format: date-time TeamCreateForm: type: object properties: name: type: string description: type: string lookingForTeammates: type: boolean required: - lookingForTeammates - name User: type: object properties: id: type: integer format: int64 login: type: string TeamMember: type: object properties: id: type: integer format: int64 user: $ref: '#/components/schemas/User' createdAt: type: string format: date-time userId: type: integer format: int64 deprecated: true PageTeam: 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/Team' 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