Problem with CheckIn project using Project Server 2013 REST API RRS feed

  • Pertanyaan

  • Hello,

    I'm trying to check in the project.

    The algorithm is: - POST CheckIn request - receive QueueJob;    -- if completed - done   -- if not completed (processing)        - wait        - GET Projects('GUID')/QueueJob('GUID')          -- if completed - done          -- if not completed - goto wait 1. POST call to http(s)//myProjectServer/PWA/_api/ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/Draft/CheckIn('false') 2. Getting back the QueueJob:

    <entry xml:base="http://vmw4755:8080/PWA/_api/" xmlns="" xmlns:ns2="" xmlns:ns3="">


        <category scheme="" term="PS.QueueJob"/>

        <link href="ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')" rel="edit"/>

        <link href="ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')/Project" rel="" title="Project"


        <link href="ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')/Submitter" rel="" title="Submitter"







        <content type="application/xml">


                <ns3:Id ns2:type="Edm.Guid">9fbfdb67-07b7-e811-9b41-005056a207f2</ns3:Id>

                <ns3:JobState ns2:type="Edm.Int32">3</ns3:JobState>

                <ns3:MessageType ns2:type="Edm.Int32">21</ns3:MessageType>

                <ns3:PercentComplete ns2:type="Edm.Int32">37</ns3:PercentComplete>

                <ns3:WaitMilliseconds ns2:type="Edm.Int32">1000</ns3:WaitMilliseconds>

                <ns3:WaitTime ns2:type="Edm.Time">PT1S</ns3:WaitTime>




    All the good stuff is there: JobState - Processing, MessageType - checking in, wait - 1 sec. 3. waiting for 1 sec (sleep(1000)) 4. GET using the link: http://myProjectServer/PWA/_api/ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')

    I would expect getting back updated QueueJob, but instead getting this:

    <?xml version="1.0" encoding="utf-8"?>

    <d:GetById xmlns:d="" xmlns:m="" xmlns:georss="" xmlns:gml="" m:null="true" />


    Next, tried just to get all of the QueueJobs: GET using the link: http://myProjectServer/PWA/_api/ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs (tried within the code and just directly from the browser - same result)

    <?xml version="1.0" encoding="utf-8"?>

    <feed xml:base="http://vmw4755:8080/PWA/_api/" xmlns="" xmlns:d="" xmlns:m="" xmlns:georss="" xmlns:gml="">


        <title />



            <name />



    Do not see any jobs, but at least CheckIn should be there? Right?

    Opened the PWA, went to Server Settings and I can see the job there:
    9fbfdb67-07b7-e811-9b41-005056a207f2 N/A 9/13/2018 5:45 AM 9/13/2018 5:45 AM E-9990 Project Checkin Success 100%

    What am I doing wrong?

    How can I get the all QueueJobs?

    I'm using Project 2013 and Java-based client.



    Kamis, 13 September 2018 13.55

Semua Balasan

  • Hi Jaroma,

    Try the below to checkin the Project using REST.

    # ReST request to publish and check-in the project
    Post-ReSTRequest $SiteUrl "ProjectServer/Projects('$projectid')/Draft/publish(true)" $null

    Jumat, 14 September 2018 04.52
  • POST Publish(true/false) still queued request, so if the call is not complete immediately, the returned QueueJob will have percent complete and wait time (if status is processing), the GET call to Projects('projectid')/QueueJobs('jobId') should bring the updated status, correct? So when status is 4 (completed), than I can be certain that the checkIn (or whatever queued job) completed successfully.

    In case the code returned is OnHold, ReadyToProcess, etc., it is even more important to see the status.

    I can see the jobs in PWA Server Setting interface, why I cannot get the same list using REST call? It was working with the SOAP PSI, must it work with the REST too?

    Jumat, 14 September 2018 14.24