Logo

Developers Portal

Integrate and Extend TargetProcess

Screen

F.A.Q.

How to receive all users assigned to the user story?

Use
api/v1/UserStories/35429/Assignments?include=[Role[Name],GeneralUser[FirstName,LastName]]

How to extract all closed user stories last year?

Use
api/v1/userstories?take=1000&where=(EntityState.Name eq 'Done') and (EndDate gt '2011-01-01')

I get a 404 when trying to access REST api. Where am I wrong?

Most probably you have TP installed on-site on IIS 5 (Windows 2000/XP). There is a known bug in IIS 5, that was fixed only in IIS 6. The workaround is to append '.asmx' extension to the request:

Instead
api/v1/UserStories/?include=[Name]
Use
api/v1/UserStories.asmx/?include=[Name]

Instead
api/v1/UserStories/45/Tasks?include=[Name]
Use
api/v1/UserStories.asmx/45/Tasks?include=[Name]

How can I use REST api to create reports?

The easiest way is to save any XML output from browser and open it in MS Excel as an XML table. MS Excel will convert an XML to an ordinal worksheet.

How can I use Windows Authentication for REST api in .NET?

var client = new WebClient(); 
var uri = new Uri("http://targetprocess/api/v1/UserStories"); 
 
client.Credentials = CredentialCache.DefaultCredentials.GetCredential(uri, "Negotiate"); 
var data = client.DownloadString(uri);

REST API Chapters

  1. Getting Started
  2. Concepts
    1. Resources and collections
    2. Context
    3. Authentication
    4. Response: Formats, Paging, Filters, Partial Get
    5. Create, update and delete operations
    6. Restful Storage
  3. FAQ
  4. Reference

FAQ

  1. How to receive all users with roles assigned to the user story?
  2. How to extract all closed user stories last year?
  3. I get a 404 when trying to access REST api. Where am I wrong?
  4. How can I use REST api to create reports?
  5. How can I use Windows Authentication for REST api in .NET?
Loading
GoogleJoin the community!
#DEV TargetProcess Group

OctocatTargetProcess at GitHub https://github.com/TargetProcess