Web Services API in TargetProcess 2.3 | Targetprocess - Visual management software

12 years ago

Web Services API in TargetProcess 2.3

We've almost finished web services API implementation for TP 2.3 release. It looks quite powerful and provides huge integration capabilities. With web services API you may do almost anything: add, edit and delete new entities, retrieve entities and even execute custom queries based on HQL (Hibernate Query Language). Of course you need to know HQL syntax (close to SQL in fact) and understand TargetProcess domain model to create complex queries. So we share entities description, class diagrams and NHibernate mapping files.

Here are some examples that shows web services abilities.

Add new bug into TargetProcess.

BugServiceWse bugService = new BugServiceWse();
TpPolicy.ApplyAutheticationTicket(bugService, "admin", "admin");

BugDTO bug = new BugDTO();
bug.Name = "New bug";
bug.CreateDate = DateTime.Today;
bug.Description = "Bug Description";
bug.ProjectID = 1;

int bugId = bugService.Create(bug);


Add comment to existing user story.

UserStoryServiceWse service = new UserStoryServiceWse();
TpServicePolicy.ApplyAutheticationTicket(service, "admin", "admin");
int storyId = 98;

CommentDTO comment = new CommentDTO();
comment.Description = "New Comment";

int commId = service.AddCommentToUserStory(storyId , comment);

Exampe with complex HQL query. Select all user stories assigned to user

string userName = "admin";
string userPassword = "admin";
UserStoryServiceWse userStoryService = new UserStoryServiceWse();
userStoryService, userName, userPassword);

string hqlAssignedUserStoryQuery =
@"from UserStory as us where us.UserStoryID in
       (select team.Assignable.AssignableID from Team as team
            where team.User.UserID = ?
            and team.Actor = us.EntityState.Actor
            and team.Assignable.AssignableID = us.UserStoryID)";
UserStoryDTO[] stories = userStoryService.Retrieve(
hqlAssignedUserStoryQuery, new object[] {users[0].UserID});

You can subscribe to our monthly newsletter here:

Thank you!

Сheck out latest blog posts:

Get started for free

Manage complex work, projects and products with Targetprocess

Enter your email
By clicking "Continue", you acknowledge and agree that we will process your personal data in accordance with our Service Privacy Policy and Terms of Service.

We’ve sent you a confirmation e-mail — please, go check it.

Live demo

With our product specialist Ksenia