Saltar al contenido

Labor

Módulo Reports

GET/reports/labor-costreports.laborCost

Worked hours, timesheets and timesheets with an open entry, per readable project, from submitted time (app.timesheet_hours). Pay is Restricted and never reported here. A rule that refuses the request returns 422 with `refusal` and `reason`.

  • Requiere la capacidad data.restricted.read.payroll.
  • Alcances de OAuth: data.
  • Estados de error: 400, 401, 422, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

reports.laborCost: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
project_idstring (uuid)NoOnly this project; every visible project when omitted.

Respuesta 200: ReportMetricRowPage

reports.laborCost: ReportMetricRowPage
CampoTipoObligatorioDescripción
dataarray of ReportMetricRowSíItems on this page, in the documented default order.
next_cursorstring | nullSíOpaque cursor for the next page; null on the last page.
{
  "data": [
    {
      "dimension": "NWL",
      "project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "measure": "worked_hours",
      "unit": "Hours",
      "value": 312.5
    }
  ],
  "next_cursor": null
}

Ejemplos de código

curl -X GET "$XOS_BASE_URL/reports/labor-cost" \
  -H "Authorization: Bearer $XOS_API_KEY"
const { data } = await xos.reports.laborCost();
response = xos.reports.labor_cost()
xos reports labor-cost