Method Details for GetWorkUnitsRawPaged.
Gets a list of work units with support for pagination.
Parameters
- siteCode String Unique identification for your TimeLog account
- apiID String The API ID
- apiPassword String The API password
- workUnitID Integer ID of specific work unit. Set to 0 to get work units
- employeeID Integer ID of specific employee. Set to 0 to get all work units
- allocationID Integer ID of specific allocation. Set to 0 to get all work units
- taskID Integer ID of specific task. Set to 0 to get all work units
- projectID Integer ID of specific project. Set to 0 to get work units
- departmentID Integer ID of specific department. Set to 0 to get work units
- startDate String Limits result to all work units registred on or later than this date
- endDate String Limits result to all work units registred on or prior to this date
- page String The page number to retrieve. Leave it empty to retrieve all work units
- pageSize String The page size to retrieve. Leave it empty to retrieve all work units
Returns
A paginated list of work unit objects in XML format
Result Example
<?xml version="1.0" encoding="utf-8"?> <tlp:WorkUnits xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.timelog.com/XML/Schema/tlp/v4_4 http://www.timelog.com/api/xsd/WorkUnitsRaw.xsd" Page="1" PageSize="10" TotalPages="1" TotalRecords="1"> <tlp:WorkUnit ID="1" OldID="31"> <tlp:TimeRegistrationGuid>2668E774-8393-484C-8ECE-B62876EDABE5</tlp:TimeRegistrationGuid> <tlp:WorkUnitGuid>FC9F4E07-D513-41FA-99E3-2A27FDE22ED9</tlp:WorkUnitGuid> <tlp:OvertimeFactor>100</tlp:OvertimeFactor> <tlp:EmployeeID>390</tlp:EmployeeID> <tlp:EmployeeInitials>Peter Summerson</tlp:EmployeeInitials> <tlp:EmployeeFirstName>Peter</tlp:EmployeeFirstName> <tlp:EmployeeLastName>Summerson</tlp:EmployeeLastName> <tlp:AllocationID>13</tlp:AllocationID> <tlp:TaskID>21</tlp:TaskID> <tlp:TaskName>Development</tlp:TaskName> <tlp:ProjectID>10</tlp:ProjectID> <tlp:ProjectName>Test Project</tlp:ProjectName> <tlp:CustomerId>668</tlp:CustomerId> <tlp:CustomerName>TimeLog</tlp:CustomerName> <tlp:Date>2020-04-17T00:00:00</tlp:Date> <tlp:Note>Meeting</tlp:Note> <tlp:AdditionalTextField> </tlp:AdditionalTextField> <tlp:ActualExchangeRate>100.0000</tlp:ActualExchangeRate> <tlp:RegHours>2.0000</tlp:RegHours> <tlp:RegHourlyRate>950.0000</tlp:RegHourlyRate> <tlp:RegHourlyRateProjectCurrency>950.0000</tlp:RegHourlyRateProjectCurrency> <tlp:RegAmount>1900.0000</tlp:RegAmount> <tlp:RegAmountProjectCurrency>1900.0000</tlp:RegAmountProjectCurrency> <tlp:EstimatedHours>2.0000</tlp:EstimatedHours> <tlp:EstimatedHourlyRate>950.0000</tlp:EstimatedHourlyRate> <tlp:EstimatedHourlyRateProjectCurrency>950.0000</tlp:EstimatedHourlyRateProjectCurrency> <tlp:EstimatedAmount>1900.0000</tlp:EstimatedAmount> <tlp:EstimatedAmountProjectCurrency>1900.0000</tlp:EstimatedAmountProjectCurrency> <tlp:BARHours>0.0000</tlp:BARHours> <tlp:BARHourlyRate>0.0000</tlp:BARHourlyRate> <tlp:BARHourlyRateProjectCurrency>0.0000</tlp:BARHourlyRateProjectCurrency> <tlp:BARAmount>0.0000</tlp:BARAmount> <tlp:BARAmountProjectCurrency>0.0000</tlp:BARAmountProjectCurrency> <tlp:InvoicedHours>0.0000</tlp:InvoicedHours> <tlp:InvoicedHourlyRate>0.0000</tlp:InvoicedHourlyRate> <tlp:InvoicedHourlyRateProjectCurrency>0.0000</tlp:InvoicedHourlyRateProjectCurrency> <tlp:InvoicedAmount>0.0000</tlp:InvoicedAmount> <tlp:InvoicedAmountProjectCurrency>0.0000</tlp:InvoicedAmountProjectCurrency> <tlp:InvHours>0.0000</tlp:InvHours> <tlp:InvAmount>0.0000</tlp:InvAmount> <tlp:CostAmount>1100.0000</tlp:CostAmount> <tlp:CostAmountCurrency>1100.0000</tlp:CostAmountCurrency> <tlp:InvoiceStatus>0</tlp:InvoiceStatus> <tlp:BillableStatus>1</tlp:BillableStatus> <tlp:IsBillable>1</tlp:IsBillable> <tlp:ApprovedStatus>0</tlp:ApprovedStatus> <tlp:CreatedAt>2020-04-17T17:50:57.9000000</tlp:CreatedAt> <tlp:CreatedByEmployeeId>390</tlp:CreatedByEmployeeId> <tlp:CreatedBy>PSU</tlp:CreatedBy> <tlp:LastModifiedAt>2020-04-17T17:58:40.8566667</tlp:LastModifiedAt> <tlp:LastModifiedByEmployeeId>390</tlp:LastModifiedByEmployeeId> <tlp:LastModifiedBy>PSU</tlp:LastModifiedBy> <tlp:UserID>18</tlp:UserID> </tlp:WorkUnit> </tlp:WorkUnits>
Result Schema
<?xml version="1.0" encoding="utf-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4" targetNamespace="http://www.timelog.com/XML/Schema/tlp/v4_4" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:element name="WorkUnits"> <xsd:complexType> <xsd:sequence> <xsd:element name="WorkUnit" type="tlp:WorkUnitRaw_Type" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> <xsd:attribute name="Page" type="xsd:int" use="optional" /> <xsd:attribute name="PageSize" type="xsd:int" use="optional" /> <xsd:attribute name="TotalPages" type="xsd:int" use="optional" /> <xsd:attribute name="TotalRecords" type="xsd:int" use="optional" /> </xsd:complexType> <xsd:key name="WorkUnit_Key"> <xsd:selector xpath=".//tlp:WorkUnit" /> <xsd:field xpath="@ID" /> </xsd:key> </xsd:element> <xsd:complexType name="WorkUnitRaw_Type"> <xsd:sequence> <xsd:element name="TimeRegistrationGuid" type="xsd:string" /> <xsd:element name="WorkUnitGuid" type="xsd:string" /> <xsd:element name="OvertimeFactor" type="xsd:decimal" /> <xsd:element name="EmployeeID" type="xsd:positiveInteger" /> <xsd:element name="EmployeeInitials" type="xsd:string" /> <xsd:element name="EmployeeFirstName" type="xsd:string" /> <xsd:element name="EmployeeLastName" type="xsd:string" /> <xsd:element name="AllocationID" type="xsd:positiveInteger" /> <xsd:element name="TaskID" type="xsd:positiveInteger" /> <xsd:element name="TaskName" type="xsd:string" /> <xsd:element name="ProjectID" type="xsd:positiveInteger" /> <xsd:element name="ProjectName" type="xsd:string" /> <xsd:element name="CustomerId" type="xsd:positiveInteger" /> <xsd:element name="CustomerName" type="xsd:string" /> <xsd:element name="Date" type="xsd:dateTime" /> <xsd:element name="Note" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="DepartmentID" type="xsd:int" /> <xsd:element name="DepartmentName" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="AdditionalTextField" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="ActualExchangeRate" type="xsd:decimal" /> <xsd:element name="RegHours" type="xsd:decimal" /> <xsd:element name="RegHourlyRate" type="xsd:decimal" /> <xsd:element name="RegHourlyRateProjectCurrency" type="xsd:decimal" /> <xsd:element name="RegAmount" type="xsd:decimal" /> <xsd:element name="RegAmountProjectCurrency" type="xsd:decimal" /> <xsd:element name="EstimatedHours" type="xsd:decimal" /> <xsd:element name="EstimatedHourlyRate" type="xsd:decimal" /> <xsd:element name="EstimatedHourlyRateProjectCurrency" type="xsd:decimal" /> <xsd:element name="EstimatedAmount" type="xsd:decimal" /> <xsd:element name="EstimatedAmountProjectCurrency" type="xsd:decimal" /> <xsd:element name="BARHours" type="xsd:decimal" /><!-- BAR: Booked as revenue --> <xsd:element name="BARHourlyRate" type="xsd:decimal" /> <xsd:element name="BARHourlyRateProjectCurrency" type="xsd:decimal" /> <xsd:element name="BARAmount" type="xsd:decimal" /> <xsd:element name="BARAmountProjectCurrency" type="xsd:decimal" /> <xsd:element name="InvoicedHours" type="xsd:decimal" /> <xsd:element name="InvoicedHourlyRate" type="xsd:decimal" /> <xsd:element name="InvoicedHourlyRateProjectCurrency" type="xsd:decimal" /> <xsd:element name="InvoicedAmount" type="xsd:decimal" /> <xsd:element name="InvoicedAmountProjectCurrency" type="xsd:decimal" /> <xsd:element name="InvHours" type="xsd:decimal" /><!-- InvHours deprecated, use BARHours instead --> <xsd:element name="InvAmount" type="xsd:decimal" /><!-- InvAmount deprecated, use BARAmount instead --> <xsd:element name="CostAmount" type="xsd:decimal" /> <xsd:element name="CostAmountCurrency" type="xsd:decimal" /> <xsd:element name="InvoiceStatus" type="xsd:short" /> <xsd:element name="BillableStatus" type="xsd:short" /> <xsd:element name="IsBillable" type="xsd:boolean" /> <xsd:element name="ApprovedStatus" type="xsd:short" /> <xsd:element name="MonthlyPeriod" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="CreatedAt" type="xsd:dateTime" /> <xsd:element name="CreatedByEmployeeId" type="xsd:positiveInteger" /> <xsd:element name="CreatedBy" type="xsd:string" /> <xsd:element name="LastModifiedAt" type="xsd:dateTime" /> <xsd:element name="LastModifiedByEmployeeId" type="xsd:positiveInteger" /> <xsd:element name="LastModifiedBy" type="xsd:string" /> <xsd:element name="UserID" type="xsd:positiveInteger" /> </xsd:sequence> <xsd:attribute name="ID" type="xsd:positiveInteger" use="required" /> <xsd:attribute name="OldID" type="xsd:positiveInteger" use="required" /> </xsd:complexType> </xsd:schema>