none
_api/Projectserver/Projects('guid')/ProjectResources Not Returning Results for some projects RRS feed

  • Question

  • I'm trying to query all project resources for a Project Online project via the OData calls that are available for Project Online.

    My success with using the _api/Projectserver/Projects('guid')/ProjectResources is spotty. It works for some projects, but not for others, and I can't figure out why. I need to return everyone that's assigned as part of the Project Team, even if they are not specifically assigned to any tasks.

    Any ideas?

    Monday, November 25, 2019 5:28 PM

Answers

  • I *think* I may have solved it.

    If a project does not have a PUBLISHED schedule associated with it, then it will not expose the resources, even though resources are assigned independently of the schedule. It doesn't matter if the Project itself is published and updated, you need to update and publish the PROJECT SCHEDULE within the project for any resources to be shown.

    • Marked as answer by jschmidtdc Monday, November 25, 2019 7:35 PM
    Monday, November 25, 2019 7:35 PM

All replies

  • Hello,

    What error do you get for some projects? Any patterns / consistencies? 

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads

    Monday, November 25, 2019 5:52 PM
    Moderator
  • I do not get an error really. It just returns a null result on certain projects. I've checked that those projects have resources assigned via "Build Team", and they are all published properly.

    Call I'm making:

    https://[tenant].sharepoint.com/sites/[pwasite]/_api/Projectserver/Projects(guid'98dd13eb-7507-e811-80d0-00155da8ac07')/ProjectResources?$select=name

    Example of a response that I get when no resources are returned (even though there are resources assigned and saved via Build Team)

    <?xml version="1.0" encoding="utf-8"?>
    <feed xml:base="https://[tenant].sharepoint.com/sites/[pwasite]/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
    	<id>4624934c-02a3-477f-8902-d733d44f66d3</id>
    	<title />
    	<updated>2019-11-25T16:59:59Z</updated>
    	<author>
    		<name />
    	</author>
    </feed>

    Response from a project that properly returns members shown in "Build Team"

    <?xml version="1.0" encoding="utf-8"?>
    <feed xml:base="https://[tenant].sharepoint.com/sites/[pwasite]/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
    	<id>9611b288-748d-49a8-9918-caa3a244b5b4</id>
    	<title />
    	<updated>2019-11-25T18:43:39Z</updated>
    	<entry>
    		<id>https://[tenant].sharepoint.com/sites/[pwasite]/_api/ProjectServer/Projects('98dd13eb-7507-e811-80d0-00155da8ac07')/ProjectResources('ec17c094-2258-e711-80d4-00155d78e10e')</id>
    		<category term="PS.PublishedProjectResource" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    		<link rel="edit" href="ProjectServer/Projects('98dd13eb-7507-e811-80d0-00155da8ac07')/ProjectResources('ec17c094-2258-e711-80d4-00155d78e10e')" />
    		<title />
    		<updated>2019-11-25T18:43:39Z</updated>
    		<author>
    			<name />
    		</author>
    		<content type="application/xml">
    			<m:properties>
    				<d:Name>Emily McCabe</d:Name>
    			</m:properties>
    		</content>
    	</entry>
    	<entry>
    		<id>https://[tenant].sharepoint.com/sites/[pwasite]/_api/ProjectServer/Projects('98dd13eb-7507-e811-80d0-00155da8ac07')/ProjectResources('5579baa5-2258-e711-80cd-00155d7c5c0d')</id>
    		<category term="PS.PublishedProjectResource" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    		<link rel="edit" href="ProjectServer/Projects('98dd13eb-7507-e811-80d0-00155da8ac07')/ProjectResources('5579baa5-2258-e711-80cd-00155d7c5c0d')" />
    		<title />
    		<updated>2019-11-25T18:43:39Z</updated>
    		<author>
    			<name />
    		</author>
    		<content type="application/xml">
    			<m:properties>
    				<d:Name>Justin Schmidt</d:Name>
    			</m:properties>
    		</content>
    	</entry>

    Monday, November 25, 2019 6:45 PM
  • I *think* I may have solved it.

    If a project does not have a PUBLISHED schedule associated with it, then it will not expose the resources, even though resources are assigned independently of the schedule. It doesn't matter if the Project itself is published and updated, you need to update and publish the PROJECT SCHEDULE within the project for any resources to be shown.

    • Marked as answer by jschmidtdc Monday, November 25, 2019 7:35 PM
    Monday, November 25, 2019 7:35 PM
  • Hi Jschmidtdc,

    Yes, you are correct, the URL you are using _api/Projectserver/Projects('guid')/ProjectResources will point to published data, so unless the project is published the data will not be copied to Publish & Reporting dbs. Hence, the project has to be published to read the published project team data.

    If you want to read the project team from the draft project then you need to change the URL to _api/Projectserver/Projects('guid')/Draft/ProjectResources


    Rajkumar Allepu (MCP) , | https://sharepointprojectserver.com ** Please mark it as answer if my answer would resolved your issue.

    Tuesday, November 26, 2019 5:50 AM