Getting a Time Sheet

Request: http://<PPM_Server_IP>:<port>/itg/rest/tm/timeSheets/id

HTTP Method: GET

Request path variables:

Attribute Description Required
id The id of the time sheet Yes

Response entity body:

  • on success: Return an XML object of a time sheet specified by the request ID with the following format:

    <ns2:timesheet xmlns:ns2="http://www.hp.com/ppm/tm/">
       <id>446363</id>
       <periodId>30277</periodId>
       <resourceId>1</resourceId>
       <sequence>1</sequence>
       <status>1</status>
       <description>User, Admin - 11/5/12 - 11/11/12</description>
       <policies>
         <policy>
           <name>AllowMultipleTimeSheets</name>
           <value>false</value>
         </policy>
         <policy>
           <name>BucketShowLevel</name>
           <value>DAY</value>
         </policy>
         <policy>
           <name>BucketReportMethod</name>
           <value>HOURS</value>
         </policy>
         <policy>
           <name>HoursInPeriodType</name>
           <value>true</value>
         </policy>
         <policy>
           <name>MaximumHoursPerTimeSheet</name>
           <value>20.0</value>
         </policy>
         <policy>
           <name>EnforcementLevelError</name>
           <value>false</value>
         </policy>
         <policy>
           <name>ReqActivitiesRequiredFlag</name>
           <value>true</value>
         </policy>
         <policy>
           <name>TskActivitiesRequiredFlag</name>
           <value>true</value>
         </policy>
         <policy>
           <name>PrjActivitiesRequiredFlag</name>
           <value>true</value>
         </policy>
         <policy>
           <name>PkgActivitiesRequiredFlag</name>
           <value>true</value>
         </policy>
         <policy>
           <name>MiscActivitiesRequiredFlag</name>
           <value>true</value>
         </policy>
       </policies>
       <notes>
         <note>
           <id>159463</id>
           <description>wwwwww</description>
           <type>TS</type>
           <createdBy>1</createdBy>
           <creationDate>2012-12-24T00:00:00.000-08:00
           </creationDate>
           <lastUpdatedBy>1</lastUpdatedBy>
           <lastUpdatedDate>2012-12-24T00:00:00.000-08:00
           </lastUpdatedDate>
         </note>
       </notes>
    </ns2:timeSheet>
  • on failure: The following message codes are returned if the operation fails:

    Message Code

    HTTP Return Code

    Message

    Cause

    Possible Corrective Action

    PPM_WSE507

    400

    Error when trying to get time sheets. The operation to get time sheets is supported by two APIs: (1)get a time sheet by id (URL: itg/rest/tm/ timeSheets/id); (2) get time sheets by periodId and ownerUserId (URL: itg/ rest/tm/ timeSheets?periodId=1& ownerUserId=1).

    Query parametersare incorrect.

    Input correct query parameters.

    PPM_WSE006

    403

    The user does not have the access grant to perform this action.

    The user does not have the required access grant.

    Get the access grant.

    PPM_WSE007

    403

    The user does not have access to this resource.

    The user has no access to this resource.

    N/A