Project 2013 REST API - getting all tasks assigned to a user

I'm trying to get all tasks assigned to a user to display something like you would see in "My Tasks" using the REST API.
I found this: http://social.technet.microsoft.com/Forums/projectserver/en-US/a5d8760d-8e27-432b-8187-592cadf302ae/get-my-tasks-tasks-via-rest-api-or-web-services?forum=sharepointdevelopment
But it doesn't seem to pertain to Project 2013.
Any idea on how I could do this?
As an aside, I'm having some trouble with finding guidance in the documentation. Are there any Project 2013 developer resources that break things down a little more than the SDK? Everything I've found is pretty Sharepoint-centered, not really getting into
the specifics of Project.

Check the samples folder which gets installed with SDK, there you will find some samples, however may not be the REST but with CSOM you could try something like this, i am sure you would be able to convert this pretty easily, in case required
projContext = new ProjectContext(pwaPath);
var PrjList = projContext.LoadQuery(projContext.Projects.Where(Prj => Prj.Name == newProjName));
projContext.ExecuteQuery();
var GotPrj = PrjList.First();
//DraftProject projCheckedOut = GotPrj.CheckOut();
projContext.Load(GotPrj.Tasks);
projContext.ExecuteQuery();
foreach (var tsk in GotPrj.Tasks)
this.textBox1.Text += Environment.NewLine + "Task Name: " + tsk.Name + " || Task Work: " + tsk.Work +" || Task Remaining Work: " +tsk.RemainingWork;
projContext.Load(tsk.Assignments);
projContext.ExecuteQuery();
foreach (var tskAssgn in tsk.Assignments)
projContext.Load(tskAssgn.Resource);
projContext.ExecuteQuery();
this.textBox1.Text += Environment.NewLine + tskAssgn.Resource.Name + "--Res ID--" + tskAssgn.Resource.Id +
"----Assgn ID: " + tskAssgn.Id + " || Actual Work: " + tskAssgn.ActualWork +
" || Assgn Remaining Work: " + tskAssgn.RemainingWork
+ " || Assgn minDate: " + tskAssgn.Start
+ " || Assgn maxDate: " + tskAssgn.Finish
Thanks | epmXperts | http://epmxperts.wordpress.com

Similar Messages

  • Gettings tasks assigned to a user

    Hi
    I am trying to get the tasks assigned to a user using the workflow API from a jsp. I am using the following code snippet.
    tasks = wfSvcClient.getTaskQueryService().queryTasks(ctx, displayColumns,
    optionalInfo,
    "My+Group",
    null,
    pred, null, 0, 0);
    However I am getting WorkflowException. It does not give any description or message. I only know the error code (9732).
    Also when I try to run the same code from a standalone JAVA client it works fine but donno why it ia failing in a jsp.
    Any Clues....Please help
    Thanks

    Hi All,
    To find all tasks assigned to User,who are the potential owner of it.
    You can go Manage Tasks in NWA.
    Go to advanced.
    Search by Identity and put the ID of the user who is the potential user.
    Select the Potential owner check box and click go.
    It will populate all the tasks that the user is a potential owner of.
    Select all and Suspend.
    Done
    Cheers
    Shyam

  • 1 Email shows all tasks assigned to team member

    Hi,
    Project Server 2013, (not using timesheets)
    Can any ways I can accumulate all the 10 tasks assigned to user xyz,
    and send him 1 email containing all tasks info to the users.
    2nd- Can I send a email to every users- with their Pending tasks of last week-in 1 email.
    Thanks

    I would first decide if that is worthwhile. My experience is that very quickly canned emails like that get treated as spam and sent straight to the bin.
    It is useful info, but when thrown at people, it is rarely received well!
    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

  • Query to get all ports assigned and used by EBS instance.

    Hi,
    Can some one pleaase help to get
    Query to get all ports assigned and used by EBS instance.
    Help is appreaciated.
    Regards,
    Milan

    MILAN RATHOD wrote:
    Hi,
    Can some one pleaase help to get
    Query to get all ports assigned and used by EBS instance.
    Help is appreaciated.
    Regards,
    MilanIn addition to the thread referenced above by Helios, please check the context files and (Oracle E-Business Suite R12 Configuration in a DMZ [ID 380490.1] -- F. List of Ports to Open in a DMZ Configuration).
    Thanks,
    Hussein

  • Getting the task list for a user

    i´ve created a bpel project in which all i do is a simple human workflow asssined to user1. Next i want to create a jsp in which i list the tasks assigned to that user for which i looked into the tutorial 10.UserTasks.
    The difference between the example in there is that the active bpel is the TaskManager in my case it just opens the TaskActionHandler.
    Now when i look into the exmple in listTasks.jsp it uses
    ITask[] tasks = worklist.listTasksByAssignee( "[email protected]" );
    when i set the user to user1 it returns no tasks, even though i can see 3 tasks opened.
    any clues? any pointers would be appreciated.
    gabriel

    Hi,
    In 10.1.2 the TaskManager is replaced with the TaskActionHandler.
    You don't necessarily have to build a JSP to access tasks - you can use the out of the box sample worklist. This can be accessed at:
    http://localhost:9700/integration/worklistapp/Login
    However, if you would like to create your own worklist, you will have to use the new 10.1.2 Worklist apis.
    These are documented in Chapter 14 and Chapter 16 of the BPEL developers guide.
    You can also find the javadoc at
    ORABPEL_HOME\integration\orabpel\docs\workflow
    To see a sample you can look at the VacationRequest or the HelpDeskRequest sample

  • List of all plants assigned to a user

    Hello ,
    Can any one please help me with finding a function module to get the list of all plants assigned to a user.
    I need to fetch some material details associated with the plants to which the user is assigned to .
    Thanks,
    Santhosh.

    It depends on how you assign plants to the user. It may be at a Z table level or based on autorization. Please try and find out how it is designed in your company.
    If it is at OM level then you will have to check with HR functional on how the relationship is maintained.

  • SQL Query to get All AD Groups and its users in Active Directory

    Hi,
       Is there any query to get all AD groups and its user in an instance of a SQL server?

    Check this blog.
    http://www.mikefal.net/2011/04/18/monday-scripts-%E2%80%93-xp_logininfo/
    It will give you more than what is required. If you dont want the extra information,then you can try this.. I took the query and removed the bits that you might not require.
    declare @winlogins table
    (acct_name sysname,
    acct_type varchar(10),
    act_priv varchar(10),
    login_name sysname,
    perm_path sysname)
    declare @group sysname
    declare recscan cursor for
    select name from sys.server_principals
    where type = 'G' and name not like 'NT%'
    open recscan
    fetch next from recscan into @group
    while @@FETCH_STATUS = 0
    begin
    insert into @winlogins
    exec xp_logininfo @group,'members'
    fetch next from recscan into @group
    end
    close recscan
    deallocate recscan
    select
    u.name,
    u.type_desc,
    wl.login_name,
    wl.acct_type
    from sys.server_principals u
    inner join @winlogins wl on u.name = wl.perm_path
    where u.type = 'G'
    order by u.name,wl.login_name
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Trying to Access SharePoint 2013 Rest Api in HTML page but getting Mime Type Exception with Status Success

    I am trying to invoke the SharePoint Rest Api using HTML page. I have included the Access Control Allow Origin to the web.config file. I am getting Readty State 4 and
    Status Success but still I am getting the below error.
    Refused to execute script from 'http://<server>/_api//web/lists?callback=jQuery172045857910416089_1430217181282&_=1430217363882' because its MIME
    type ('application/atom+xml') is not executable, and strict MIME type checking is enabled.
        <script>
            $(document).ready(function () {
                $("#KMPDiscussions").click(function () {
                    //$.support.cors = true;
                    $.ajax({
                        url: "http://<server>/_api//web/lists",
                        dataType: "jsonp",
                        type: "GET",
                        method: "GET",
                        contentType: "application/javascript",
                        headers: {
                            "content-type":
    "application/json;odata=verbose",
                            "accept": "application/json;odata=verbose",
                        success: function onSuccess(data) {
                            alert("Inside Alert");
                        error: function onError(data){
                            alert("Error: "
    + data);
        </script>
    It always hits the error on callback.
    Is there any other way that I can invoke SharePoint Rest Api from a Cross Domain. Please Help.

    Hi Chris,
    Thanks for the reply,Here iam using different files to be uploaded in library.
    please find the below snapshot of json response and ULS logs.
    12/22/2013 18:31:15.02 w3wp.exe (0x3338) 0x401C SharePoint Foundation Files 
    abq2i High Could not get DocumentContent row: 0x80004005. 79f7629c-4694-c026-
    3349-2049178ee919
    12/22/2013 18:31:15.02 w3wp.exe (0x3338) 0x401C SharePoint Foundation Files 
    aiv4w Medium Spent 0 ms to bind -1 byte file stream 79f7629c-4694-c026-3349-
    2049178ee919 
    12/22/2013 18:31:15.02 w3wp.exe (0x3338) 0x401C SharePoint Foundation Files 
    aise3 Medium Failure when fetching document. 0x80070012 79f7629c-4694-c026-
    3349-2049178ee919
    12/22/2013 18:31:15.39 w3wp.exe (0x3338) 0x0D4C SharePoint Foundation 
    Database ab1a9 High Failed to get document content data.
    System.ComponentModel.Win32Exception (0x80004005): Cannot complete this function     at
    Microsoft.SharePoint.SPSqlClient.GetDocumentContentRow(Int32 rowOrd, Object
    ospFileStmMgr, SPDocumentBindRequest& dbreq, SPDocumentBindResults& dbres) 
    79f7629c-76ab-c026-3349-2c9132b13e9a
    12/22/2013 18:31:15.39 w3wp.exe (0x3338) 0x4184 SharePoint Foundation 
    Database ab1a9 High Failed to get document content data.
    System.ComponentModel.Win32Exception (0x80004005): Cannot complete this function     at
    Microsoft.SharePoint.SPSqlClient.GetDocumentContentRow(Int32 rowOrd, Object
    ospFileStmMgr, SPDocumentBindRequest& dbreq, SPDocumentBindResults& dbres) 
    79f7629c-76ab-c026-3349-281167b6cd09
    Thanks again,
    Naresh.

  • ProjectServer REST API to create Tasks and Resources

    Hi 
    I have managed to add a project using REST call https://<domain>.sharepoint.com/sites/pwa/_api/ProjectServer/Projects/Add
    However when I try to add Task or a Resource to the created project it gives me errors. Could you please let me know what I'm doing wrong.
    My REST call is this
    https://<domain>.sharepoint.com/sites/pwa/_api/ProjectServer/Projects('<project ID>')/Tasks/Add
    I'm getting the error "Cannot find resource for the request Add"
    Thanks,
    Thushara.

    Thanks Brian,
    This helped, I'm now successfully calling REST APIs using POSTMAN rest client.
    I'm trying to use curl command to call the APIs with Windows AZURE ACS. Could you please point me how to get access Token using a POST request.  Most of the examples I found on the web are using TokenHelper.GetClientContextWithAuthorizationCode
    but couldn't find anything that uses CURL.
    Note that I cannot use the TokenHelper
    as my application is Linux.
    Thanks,
    Thushara.

  • Office 365 Files REST API - Get direct children in the root of the default document library

    I'm trying to work with Office 365 Files REST API which works just fine except one thing that I'm struggling with.
    What I need for my application is to make an explorer like browse capability for OneDrive for business Document Library.
    My problem is that I don't know how to get the direct children in the root of the Document library
    The API request
    GET ../_api/files will
    retrieve all files and folders in the default document library, including files and folders from sub-directories.
    What I need is basically the functionality of the API request
    GET ../_api/files(<folder_path>)/Children
    that works also for the root folder of the Document library. The problem is that I couldn't find a way set <folder_path> as the root folder. 
    I found out that the API call ../_api/web/getfolderbyserverrelativeurl(<folder_server_relative_path>)/Folders and _api/web/getfolderbyserverrelativeurl(<folder_server_relative_path>)/Files works as expected resulting the only the direct
    children of the root folder if the folder_server_relative_path is the path of the document library. The problem with this API call is that it's requires server relative path of the (default) document library (which i don't have) and the result has a different
    schema compared to the ../_api/files REST API call.
    Can somebody help me with this problem?
    David

    First thanks for the fast answer. Let me explain my use case in more details.
    I'm trying to work with the new summer release of the
    Office 365 API tool for Visual Studio 2013 (update 3)
    I found no reasonable way to retrieve the direct children of the root folder from my One Drive for business Document Library using the newly added SharePointClient library.
    The API call of `SharePointClient.Files` will retrieve all the files and folders from the whole document library including sub-folders. So in order to get only the direct children I have to page through all the documents and folders and analyze their URL, which
    is not acceptable for my application scenario. For a sub-folder I can get the direct children like this: `SharePointClient.Files["<folder_id>"].ToFolder().Children` This is what I need but it can't be applied to the root folder.
    So what I did I've checked what REST API calls this library makes and I've tried to find out if there is a way to achieve my goal at least using direct REST API call. It seems like the functionality is missing from the REST API itself. 
    The http://site
    url/_api/web/lists/GetByTitle(‘libraryname’)/items API call also retrieves all the items hierarchy from the library (including items from sub-folders) and the result XML "schema" (fields and the meaning of the ID) differs from the one used
    by the calls by SharePointClient library. (for example the "Id" is a number when the /items is called but when
    /_api/files is called the "Id" is the relative path to the document library)
    Basically what I need can be achieved with the call to http://site url/_api/web/lists/GetByTitle(‘libraryname’)/rootfolder/files and http://site
    url/_api/web/lists/GetByTitle(‘libraryname’)/rootfolder/folders but again the schema of the result differs from the one used in SharePointClient
    library. This means that in order to get  the direct children of the root I will need to re-implement a good part of the SharePointClient library. It seams like there is 2 kind of REST API is implemented. ( missing  "Id" and "url"
    fields, etc)
    Also there is no convenient way to get the Name or the GUID of the default document library which the SharePointClient.Files
    (https://site_url/_api/file) automatically
    uses. The DiscoveryContext.DiscoverCapability for "MyFiles" doesn't gives any hint either.
    David

  • While creating Projects Using the API, get two errors: 'Customer name must be passed' and 'class category is invalid'

    Hi
    While trying to Create Projects using the API, I'm getting two types of errors -
    The first is : 'API failed in one stage 1 Customer Name is a mandatory Quick Entry field. Value must be passed'
    The second is : '
    'API failed in one stage 1 Project: '<Project_Number>'
    The class category is invalid.'
    Both the messages are produced by our custom program. .. however I am not able to understand why the underlying errors occur.
    The first error ( Customer Name is a mandatory quick entry field), is caused by Projects that are to be created from Project templates where it is configured with Quick Entry Customer Name required. We are passing Customer Site number ( Party Bill to site number and Party Ship to side number). The site numbers being passed are also set as 'Primary'. Yet they are failing.
    For the second Error ( The Class Category is invalid), I rechecked multiple times, the Class categories for the Projects I am trying to create, with the Config in R12 and they are fine. Can't understand the reason for these two issues. Has anyone encountered such an issue ? If so how was it resolved?
    Regards
    Vivek

    HI All
    I resolved both the issues. In case there are others facing similar issues, following was the cause and resolution of my errors
    1. Error 1: Customer Name is a Mandatory Quick Entry field. Value must be passed.
    The cause was that the data loaded into our custom staging table was not in the right fields. This was because the data file values and the CTL were not in sync.
    Resolution:
    Corrected the data file to be in Sync with the structure defined in the CTL and  this loaded it successfully
    2. Error 2: The class category is invalid.
    The cause of this error was that  in the  Projects Template (used to create the project from), the Quick Entry setup had a Class Category set as required and I was not passing a value ( a class code value) for that Class Category.
    Hope this helps somebody else
    Cheers
    Turnbill

  • SharePoint 2013 REST API with C# - Mapping HTTP verbs to data operations - Requesting FormDigest

    SharePoint REST interface maps HTTP verbs to data operations. Endpoints that represent
    Read operations map to HTTP
    GET commands. Endpoints that represent update operations map to HTTP
    POST commands, and endpoints that represent update or insert operations map to HTTP
    PUT commands (Ref:
    How to: Complete basic operations using SharePoint 2013 REST endpoints).
    Is this mapping of HTTP verbs to CRUD operations a design paradigm or whether there are other technical reasons to this mapping
    Is is possible to use a GET command for say an update operation or a POST for say a read operation.If so, what consideration make the choice of either usage
    In the code snippet below FormDigest is requested as POST, why not use GET here?
    private static string GetFormDigest(string webUrl)
    //Validate input
    if (String.IsNullOrEmpty(webUrl) || String.IsNullOrWhiteSpace(webUrl))
    return String.Empty;
    //Create REST Request
    Uri uri = new Uri(webUrl + "/_api/contextinfo");
    HttpWebRequest restRequest = (HttpWebRequest)WebRequest.Create(uri);
    restRequest.Credentials = CredentialCache.DefaultCredentials;
    restRequest.Method = "POST";
    restRequest.ContentLength = 0;
    //Retrieve Response
    HttpWebResponse restResponse = (HttpWebResponse)restRequest.GetResponse();
    XDocument atomDoc = XDocument.Load(restResponse.GetResponseStream());
    XNamespace d = "http://schemas.microsoft.com/ado/2007/08/dataservices";
    //Extract Form Digest
    return atomDoc.Descendants(d + "FormDigestValue").First().Value;
    Thanks - Abhishek

    Many SharePoint REST api methods use parameters. It is much more efficient to post parameters than use query string variables.  Many times complex types are sent and these require json notation objects posted in the body. In the case of "_api/contextinfo,
    it is recommended to use POST rather than a GET when using sensitive data. GET responses can be cached. Since you are getting a security token back in that call it is recommended to use a POST.
    http://blog.teamtreehouse.com/the-definitive-guide-to-get-vs-post
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Sharepoint 2013 REST API calls with JASONP support

    We are working on sharepoint online integration with PHP Based application. We need to provide REST API call which supports JSONP.
    So is it possible to create new REST API Endpoints in Sharepoint online APP? Please sugggest right direction.

    Hi,
    In Office 365 (aka SharePoint Online), you can simply consume the SharePoint data through REST API or WS call,but cannot create your own endpoint.
    By default you can get the JSON response from the Office 365 REST API,its upto you to use the JSONP on your client compatibility not on SharePoint online REST API.
    Sometime before I tried, It didn't work for me.
    If you develop the AppModel, SPRequestor.js does the same job(overcome the Cross domain restriction) the what JSONP does.
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • User management API/get all the users for a group

    Hi all,
    I'm trying to get all the users and their associated groups with the user management API. The method DirectoryManagerServiceClient.findGroupMembers(GroupMembershipSearchFilter)
    returns all the users, great, but not the associated groups.
    TO get the users i use the oid of a "super group" and this "super group" contains severals groups. It's the information about these groups i need.
    I have read in the documentation of Principal Object that a search could omit
    the group informations for efficiency. How can i bypass this limitation?
    Thank you in advance for your help,
    Philippe Vandenhove

    Hi Philippe
    Our CreateUser component will allow you to create local users and groups.
    http://avoka.dnsalias.com/confluence/display/Public/Create+User+Create+Group
    LookupGroup takes a group name or id, and returns a list of all members. I'm pretty sure it recursively evaluates contained groups, but you'll need to check. If it doesn't, log a bug to support-at-avoka.com.
    http://avoka.dnsalias.com/confluence/display/Public/Lookup+DSC
    Download at:
    vhttp://www.avoka.com/apps/checkcookie?qpac=y&qpac_code=avokaESComponents&location=%2Fapps %2Fqpacdownload
    Howard

  • Teststand api get all step parameters

    I'm trying to get all step parameters , name and ID.
    For now the I manage to get the step name and ID but how do I get eg. Step.MessageExpr?
    In the code I send you can see how far I came but the GetValString property does not work...

    Try this.  You may have to put Step.MessageExpr in the string there.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

Maybe you are looking for

  • Microsoft Office Home and Business Edition 2013

     Dear Team, We are planning to procure microsoft office home and business edition 2013. We want to procure 50- Microsoft office home and business edition. Please let us know if there is  any limitations in the licensing part as you have spoken to one

  • Contacts created in Phone app do not show in the Contacts list.

    Hello, When I create a new contact from within the Phone app (i.e. from a "Recent" call) it does not show up in my contacts list. The new contact will show up in a search, but it only appears in the Phone app in the "Info" window. Any info. on why th

  • Upgrade graphics on T43 with Intel Integrated adapter?

    Machine type is 1871-4AU.  Can I upgrade the graphics?  If not, is there anything like a list somewhere of the upgrades I can do?  I would also like to add a dvd burner.  I like the machine and have now dumped about a hunded bucks in memory and new k

  • Product Serial Number ownership transferability

    I've acquired iWork '08 Retail for Tiger or later, through donation and was wondering about the ownership transferability of the product. If the original owner has de-installed the application, and its product serial is now de-registered on record wi

  • DocType in Crytal report

    HI I am creating a AR Invoice document report as well as AP invoice in same report I want to sort according to DocType. The issue is, The DocType column only gives I but I want to display Invoice or atleast IN how to do this? Help me out. By Kalai