openapi: 3.2.0 info: version: v1 title: Spotio 2.0 Leaderboards API description: The controller is responsible for leaderboards. contact: name: Contact us url: https://spotio.com/contact/ email: support@spotio.com servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test security: - Bearer: [] tags: - name: Leaderboards description: The controller is responsible for leaderboards. paths: /api/Leaderboards: get: tags: - Leaderboards summary: Get a list of leaderboards description: Retrieves a list of leaderboards based on the specified filters. parameters: - name: showMine in: query description: Indicates whether to return only the leaderboards created by the current user. schema: type: boolean - name: dataObjectTypeId in: query description: The ID of the Data Object type that the leaderboards should be filtered by. If not specified, all leaderboards types will be returned. schema: type: integer format: int32 responses: '200': description: Success content: text/plain: schema: type: array items: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.MyReportForList' application/json: schema: type: array items: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.MyReportForList' text/json: schema: type: array items: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.MyReportForList' '401': description: Unauthorized '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' application/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' text/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' application/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' text/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test /api/Leaderboards/{id}: get: tags: - Leaderboards summary: Render leaderboard by id parameters: - name: filterId in: query description: Filter id schema: type: string - name: metricId in: query description: Metric id schema: type: string - name: scrollId in: query description: Scroll id schema: type: string - name: parentId in: query description: Parent id schema: type: string - name: startDate in: query description: Period start date schema: type: string format: date-time - name: endDate in: query description: Period end date schema: type: string format: date-time - name: periodShortcut in: query description: Period shortcut schema: $ref: '#/components/schemas/Spotio.Utils.Client.DTO.Filters.PeriodShortcut' - name: refresh in: query description: Indicates whether leaderboard should be refreshed schema: type: boolean - name: dateFormat in: query description: Optional date format override schema: type: string - name: id in: path description: Leaderboard id required: true schema: type: string responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.RenderedLeaderboard' application/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.RenderedLeaderboard' text/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.RenderedLeaderboard' '401': description: Unauthorized '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' application/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' text/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' application/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' text/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test post: tags: - Leaderboards summary: Render leaderboard by id parameters: - name: filterId in: query description: Filter id schema: type: string - name: metricId in: query description: Metric id schema: type: string - name: scrollId in: query description: Scroll id schema: type: string - name: parentId in: query description: Parent id schema: type: string - name: startDate in: query description: Period start date schema: type: string format: date-time - name: endDate in: query description: Period end date schema: type: string format: date-time - name: periodShortcut in: query description: Period shortcut schema: $ref: '#/components/schemas/Spotio.Utils.Client.DTO.Filters.PeriodShortcut' - name: refresh in: query description: Indicates whether leaderboard should be refreshed schema: type: boolean - name: dateFormat in: query description: Optional date format override schema: type: string - name: id in: path description: Leaderboard id required: true schema: type: string responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.RenderedLeaderboard' application/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.RenderedLeaderboard' text/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.RenderedLeaderboard' '401': description: Unauthorized '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' application/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' text/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' application/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' text/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test /api/Leaderboards/{id}/export: post: tags: - Leaderboards summary: Export leaderboard by id parameters: - name: filterId in: query description: Filter id schema: type: string - name: metricId in: query description: Metric id schema: type: string - name: parentId in: query description: Parent id schema: type: string - name: startDate in: query description: Period start date schema: type: string format: date-time - name: endDate in: query description: Period end date schema: type: string format: date-time - name: periodShortcut in: query description: Period shortcut schema: $ref: '#/components/schemas/Spotio.Utils.Client.DTO.Filters.PeriodShortcut' - name: id in: path description: Leaderboard id required: true schema: type: string responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Exports.ExportIdDto' application/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Exports.ExportIdDto' text/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Exports.ExportIdDto' '401': description: Unauthorized '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' application/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' text/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' application/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' text/json: schema: $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error' security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test components: schemas: Spotio.Frontend.ViewModel.Exports.ExportIdDto: type: object additionalProperties: false properties: id: type: - string - 'null' description: The ID of the export. Spotio.Frontend.ViewModel.MyReports.MyReportForList: type: object additionalProperties: false properties: id: type: - string - 'null' title: type: - string - 'null' type: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.MyReportType' isDefault: type: - boolean - 'null' description: type: - string - 'null' Spotio.Utils.Client.DTO.Filters.PeriodShortcut: type: string enum: - DAY - WEEK - MONTH - YTD - CUSTOM - ALL - LASTWEEK - LASTMONTH - LASTYEAR - YESTERDAY - TODAY - LAST30DAYS - DEFAULT - QUARTER - LASTQUARTER - THISWORKWEEK - LASTWORKWEEK Spotio.Reports.Client.Leaderboards.LeaderboardTypeDto: type: string enum: - Users - Teams - Territories Spotio.Frontend.ViewModel.MyReports.Leaderboards.ContributionStatistics: type: object additionalProperties: false properties: total: type: - string - 'null' contributors: type: - string - 'null' percentage: type: - string - 'null' Spotio.Frontend.ViewModel.MyReports.MyReportType: type: string enum: - MyReport - Leaderboard Spotio.Frontend.ViewModel.MyReports.Leaderboards.MetricTitle: type: object additionalProperties: false properties: id: type: - string - 'null' title: type: - string - 'null' Spotio.Frontend.ViewModel.MyReports.Leaderboards.RenderedLeaderboard: type: object additionalProperties: false properties: id: type: - string - 'null' description: The ID of the rendered leaderboard. title: type: - string - 'null' description: The title of the rendered leaderboard. description: type: - string - 'null' description: The description of the rendered leaderboard. defaultDate: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.RenderedLeaderboard%2BDefaultPeriodShortcut' resultTitle: type: - string - 'null' description: The result title of the rendered leaderboard. type: $ref: '#/components/schemas/Spotio.Reports.Client.Leaderboards.LeaderboardTypeDto' defaultMetric: type: - string - 'null' description: The default metric of the rendered leaderboard. metrics: type: - array - 'null' description: The list of metrics of the rendered leaderboard. items: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.MetricTitle' results: type: - array - 'null' description: The result of the rendered leaderboard. items: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.LeaderboardResult' contributionStatistics: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.MyReports.Leaderboards.ContributionStatistics' scrollId: type: - string - 'null' description: The scroll id of the rendered leaderboard. Spotio.Infrastructure.Common.DataModel.Error.Error: type: object additionalProperties: false properties: errors: readOnly: true Spotio.Frontend.ViewModel.MyReports.Leaderboards.LeaderboardResult: type: object additionalProperties: false properties: id: type: - string - 'null' rank: type: integer format: int32 label: type: - string - 'null' info: type: - string - 'null' picUrl: type: - string - 'null' me: type: - boolean - 'null' value: type: - string - 'null' delta: type: - number - 'null' format: double securitySchemes: Bearer: type: apiKey description: 'Enter the Bearer Authorization string as following: `Bearer Generated-JWT-Token`' name: Authorization in: header