Question

I'm new to SharePoint, I have been trying to retrieve a single Project and all its Tasks by doing the following:

https://servername.sharepoint.com/sites/pwa/_api/ProjectServer/Projects('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')/Tasks

I have also tried to retrieve a Project by doing this:

https://servername.sharepoint.com/sites/pwa/_api/ProjectServer/Projects('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')

This is the error that I receive:

{
    "error": {
        "code": "1000, Microsoft.ProjectServer.PJClientCallableException",
        "message": {
            "lang": "en-US",
            "value": "This project either does not exist, or has been deleted.  Only QueueJobs can be accessed from a deleted project."
        }
    } }

Which is not true because I'm able to get all the projects by doing this:

https://servername.sharepoint.com/sites/pwa/_api/ProjectServer/Projects?$top=100

Also, if I don't use the $top this is what the query returns:

{
    "d": {
        "results": []
    }
}

why is that?

I'm doing this in Postman. I have looked through the documentation and haven't come across anything. Any help is appreciated!

Était-ce utile?

La solution

You could try flipping the query around to use the Project ID as a filter, like:

/_api/ProjectServer/Projects?$filter=Id eq guid'xxxxxxxx'&$select=Tasks&$expand=Tasks
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top