openapi: 3.1.0 info: title: Tournament activity chart-definition API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: chart-definition paths: /v1/competitions/{competitionIdentifier}/chart-definitions: x-service-id: competition-service get: tags: - chart-definition summary: List all chart definitions for a competition. operationId: listChartDefinitions 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/ChartDefinition' security: - accessToken: [] - apiKey: [] post: tags: - chart-definition summary: Create a chart definition. operationId: createChartDefinition parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ChartDefinitionCreateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChartDefinition' security: - accessToken: [] - apiKey: [] /v1/competitions/{competitionIdentifier}/chart-definitions/{chartDefinitionName}: x-service-id: competition-service get: tags: - chart-definition summary: Get a chart definition. operationId: getChartDefinition parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: chartDefinitionName in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChartDefinition' security: - accessToken: [] - apiKey: [] delete: tags: - chart-definition summary: Delete a chart definition. operationId: deleteChartDefinition parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: chartDefinitionName in: path required: true style: simple explode: false schema: type: string responses: '202': description: Accepted security: - accessToken: [] - apiKey: [] patch: tags: - chart-definition summary: Update a chart definition. operationId: updateChartDefinition parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: chartDefinitionName in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ChartDefinitionUpdateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChartDefinition' security: - accessToken: [] - apiKey: [] components: schemas: ChartDefinitionSetType: type: string enum: - CHART - IFRAME ChartDefinition: type: object properties: id: type: integer format: int64 name: type: string description: Slug-like name of the chart, is unique and can be used as key. displayName: type: string description: Title of the chart, displayed in the UI. type: $ref: '#/components/schemas/ChartDefinitionSetType' description: Type of chart to render. endpointUrl: type: string description: Original endpoint URL. dataKey: type: string description: Data key to find the fetched data. projectIdProperty: type: string description: If set, generate a series per project. The project ID must be matched from the current's user projects. nativeConfiguration: type: string description: Native (series-based or just a single series) frontend configuration for the chart. order: type: integer format: int64 description: Ordering order in the UI. Lowest is first. ChartDefinitionUpdateForm: type: object properties: name: type: string displayName: type: string type: type: string enum: - CHART - IFRAME endpointUrl: type: string projectIdProperty: type: string nativeConfiguration: type: string order: type: integer format: int64 ChartDefinitionCreateForm: type: object properties: name: type: string displayName: type: string type: type: string enum: - CHART - IFRAME endpointUrl: type: string projectIdProperty: type: string nativeConfiguration: type: string order: type: integer format: int64 required: - displayName - name - nativeConfiguration - order - type 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