openapi: "3.0.0" info: title: "Analytics and Reporting" version: "1.0" description: "This service is a worker to generate employee custom reports data" tags: - name: "General" paths: /v1/public-api/reports: get: tags: - Public API parameters: - name: X-Company-Id in: header schema: type: integer required: true - name: report_ids in: query schema: type: array items: type: string required: false - name: status in: query schema: type: string example: "up_to_date" required: false summary: List of reports operationId: listReports responses: 200: description: Ok content: "application/json": schema: $ref: "#/components/schemas/PublicListReportsResponse" 500: description: Internal Server Error content: "application/json": schema: $ref: "#/components/schemas/PublicAPIException" /v1/public-api/reports/{reportId}: get: tags: - Public API parameters: - name: X-Company-Id in: header schema: type: integer required: true - name: reportId in: path schema: $ref: "#/components/schemas/UniqueIdentifier" required: true - name: locale in: query description: locale used to translate localized fields schema: type: string required: false summary: Get report with items operationId: listReportItems responses: 200: description: Ok content: "application/json": schema: $ref: "#/components/schemas/PublicReportResponse" 500: description: Internal Server Error content: "application/json": schema: $ref: "#/components/schemas/PublicAPIException" /v1/public-api/columns: get: tags: - Public API parameters: - name: X-Company-Id in: header schema: type: integer example: 1 required: true - name: columns in: query schema: type: array items: type: string example: first_name,last_name required: false - name: locale in: query schema: type: string example: "en" required: false summary: List of columns operationId: listColumns responses: 200: description: Ok content: "application/json": schema: $ref: "#/components/schemas/PublicListColumnsResponse" 500: description: Internal Server Error content: "application/json": schema: $ref: "#/components/schemas/PublicAPIException" components: schemas: UniqueIdentifier: type: string example: "eb7482f3-2323-43e2-87ed-99d2399e8e22" description: Universally unique identifier Filter: type: object properties: column: type: string example: office_id comparison: type: string example: eq value: type: string example: 1 PublicListReportsResponse: type: object properties: success: type: boolean metadata: $ref: "#/components/schemas/PublicReportMetaData" offset: type: integer limit: type: integer data: type: array items: $ref: "#/components/schemas/PublicReportData" PublicReportResponse: type: object properties: success: type: boolean metadata: $ref: "#/components/schemas/PublicReportMetaData" offset: type: integer limit: type: integer data: type: array items: $ref: "#/components/schemas/PublicReportItemsData" PublicListColumnsResponse: type: object properties: success: type: boolean metadata: $ref: "#/components/schemas/PublicReportMetaData" offset: type: integer limit: type: integer data: $ref: "#/components/schemas/PublicColumnData" PublicReportMetaData: type: object properties: total_elements: type: integer current_page: type: integer total_pages: type: integer PublicReportData: type: object properties: type: type: string example: "Report" attributes: $ref: "#/components/schemas/PublicReportAttributes" PublicReportItemsData: type: object properties: type: type: string example: "Report" attributes: $ref: "#/components/schemas/PublicReportItemsAttributes" PublicColumnData: type: object properties: type: type: string example: "Column" attributes: type: array items: $ref: "#/components/schemas/PublicColumnAttributes" PublicColumnAttributes: type: object properties: attribute_id: type: string example: first_name human_readable: type: string example: First Name data_type: type: string example: "TEXT" PublicReportAttributes: type: object properties: id: $ref: "#/components/schemas/UniqueIdentifier" name: type: string example: Employee vacations past month description: type: string example: Shows vacations of all employees that were taken past month author_first_name: type: string description: Report author example: Robert author_last_name: type: string description: Report author example: Sirano type: type: string example: point_in_time enum: - point_in_time - historical_data - timeframe employee_status: type: string example: currently_active enum: - currently_active - active_at_given_date - all status: type: string example: up_to_date enum: - up_to_date - updating - update_failed start_date: type: string format: date-time example: "2019-04-01" end_date: type: string format: date-time example: "2019-04-10" created_at: type: string format: date example: "2019-04-10" updated_at: type: string format: date example: "2019-04-10" data_refreshed_at: type: string format: date-time example: "2019-04-10" columns: type: array items: type: string filters: type: array items: $ref: "#/components/schemas/Filter" period_type: type: string example: fixed enum: - fixed - today - last_day_of_this_month - this_year - last_month - last_thirty_days - this_month - year_to_date PublicReportItemsAttributes: type: object properties: id: $ref: "#/components/schemas/UniqueIdentifier" name: type: string example: Employee vacations past month description: type: string example: Shows vacations of all employees that were taken past month author_first_name: type: string description: Report author example: Robert author_last_name: type: string description: Report author example: Sirano type: type: string example: point_in_time enum: - point_in_time - historical_data - timeframe employee_status: type: string example: currently_active enum: - currently_active - active_at_given_date - all status: type: string example: created enum: - up_to_date - updating - update_failed start_date: type: string format: date-time example: "2019-04-01" end_date: type: string format: date-time example: "2019-04-10" created_at: type: string format: date example: "2019-04-10" updated_at: type: string format: date example: "2019-04-10" data_refreshed_at: type: string format: date-time example: "2019-04-10" columns: type: array items: type: string filters: type: array items: $ref: "#/components/schemas/Filter" period_type: type: string example: fixed enum: - fixed - today - last_month - last_day_of_this_month - this_year - last_thirty_days - this_month - year_to_date items: type: array items: type: object properties: employee_id: type: string example: 17 attributes: type: array items: anyOf: - $ref: "#/components/schemas/SimpleAttribute" - $ref: "#/components/schemas/EntityAttribute" - $ref: "#/components/schemas/DurationAttribute" - $ref: "#/components/schemas/CostCenterAttribute" - $ref: "#/components/schemas/AbsenceOverviewAttribute" - $ref: "#/components/schemas/AbsencePeriodAttribute" - $ref: "#/components/schemas/PerformanceTargetAttribute" - $ref: "#/components/schemas/PerformanceKpiAttribute" - $ref: "#/components/schemas/SalaryAttribute" - $ref: "#/components/schemas/CompensationAttribute" SimpleAttribute: type: object required: - attribute_id - data_type - value properties: attribute_id: type: string example: first_name data_type: type: string enum: - TEXT value: type: string example: Robert effective_date: type: string format: date-time example: "2019-04-10" EntityAttribute: type: object required: - attribute_id - entity_id - data_type - value properties: attribute_id: type: string example: department entity_id: type: string example: 1 data_type: type: string enum: - ENTITY value: type: string example: IT effective_date: type: string format: date-time example: "2019-04-10" CostCenterAttribute: type: object required: - attribute_id - entity_id - data_type - value properties: attribute_id: type: string example: cost_center data_type: type: string enum: - COST_CENTER cost_centers: type: array items: $ref: "#/components/schemas/CostCenter" CostCenter: type: object properties: cost_center_id: type: string example: 1 value: type: string example: Test Center weight: type: string example: 100% AbsenceOverviewAttribute: type: object properties: attribute_id: type: string example: absence_123 data_type: type: string enum: - ABSENCE_OVERVIEW start_date: type: string format: date example: "2019-12-01" end_date: type: string format: date example: "2019-12-01" duration_days: type: string example: 2 duration_hours: type: string example: 5 AbsencePeriodAttribute: type: object properties: attribute_id: type: string example: period_123 data_type: type: string enum: - ABSENCE_PERIOD start_date: type: string format: date example: "2019-12-01" end_date: type: string format: date example: "2019-12-01" half_day_at_start: type: boolean half_day_at_end: type: boolean DurationAttribute: type: object properties: attribute_id: type: string example: duration_123 data_type: type: string enum: - DURATION start_date: type: string format: date example: "2019-12-01" end_date: type: string format: date example: "2019-12-01" duration: type: integer example: 10 PerformanceTargetAttribute: type: object properties: attribute_id: type: string example: performance_target_123 data_type: type: string enum: - PERFORMANCE_TARGET performance_targets: type: array items: $ref: "#/components/schemas/PerformanceTarget" PerformanceTarget: type: object properties: performance_target_id: type: string example: 1 performance_target_value: type: string example: 20 PerformanceKpiAttribute: type: object properties: attribute_id: type: string data_type: type: string enum: - PERFORMANCE_KPI performance_target_kpis: type: array items: $ref: "#/components/schemas/PerformanceTarget" PerformanceTargetKpi: type: object properties: performance_target_id: type: string example: id_123 performance_kpis: type: array items: $ref: "#/components/schemas/PerformanceKpi" PerformanceKpi: type: object properties: performance_kpi_id: type: string example: kpi_123 performance_kpi_value: type: string example: 14 SalaryAttribute: type: object properties: attribute_id: type: string example: salary_123 data_type: type: string enum: - SALARY amount: type: string example: 12.20 currency_symbol: type: string example: $ CompensationAttribute: type: object properties: attribute_id: type: string example: ABCXXX data_type: type: string enum: - COMPENSATION amount: type: string example: 12.20 currency_code: type: string example: USD currency_symbol: type: string example: $ overtime_hours: type: string example: 12 bonus_type: type: string example: MAX PublicAPIException: type: array items: $ref: "#/components/schemas/ErrorResponse" ErrorResponse: type: object properties: trace_id: type: string example: ABCXXX timestamp: type: string format: date-time example: "2020-01-01T00:00:00Z" errors: type: array items: $ref: "#/components/schemas/ErrorDetails" ErrorDetails: type: object properties: title: type: string details: type: string type: type: string _meta: type: array items: $ref: "#/components/schemas/ErrorMeta" ErrorMeta: type: object properties: field: type: string description: type: string