TeamForge SOAP API Reference
What can I do with the SOAP API?
You can use the TeamForge SOAP API to do almost anything a user can do in the TeamForge web user interface.
TeamForge exposes a subset of the APIs defined by the application server as web services, through the SOAP protocol.
A SOAP proxy server and a SOAP API layer, both running on Apache Axis, expose a set of web services representing each TeamForge application. The SOAP server serves the following functions:
- Provides web services by accepting SOAP requests from the clients.
- Performs SOAP client authentication.
- Implements TeamForge role-based access control (RBAC) and caching service.
- Accesses the application server via RMI stubs.
You can get the API here: http://www.collab.net/community/teamforge
The SOAP API can provide more types of functionality than the Web UI alone. For example, it can be time-consuming for a user with Tracker Admin permissions to copy a tracker workflow from one tracker to another in the Web UI. However, the SOAP method that provides a workflow copy function makes this task easy.
Access permissions
For access permissions (authorization, as distinct from authentication), the SOAP API follows the same rules imposed by the TeamForge role-based access control (RBAC) system. A user using a SOAP API-based client has no more access to data than they have in the Web UI.
The Digital.ai TeamForge architecture allows you to quickly and easily develop integration points between Digital.ai TeamForge and applications you develop.
User-centric services
All services and APIs are user‐centric, meaning that all integrated applications must establish an individual connection to the SOAP server for each user. This differs from programming directly with an application server where one connection can be established for any number of users.
Activities that can be performed using the SOAP interface are by definition user‐based, such as retrieving a list of a userʹs projects, tasks, or assigned tracker artifacts. These activities therefore require an individual connection for each user.
Requiring individual connections also ensures that role‐based access control is checked for each action performed by each user. To ensure that security is enforced, RBAC checks are performed on each SOAP API call and cannot be disabled at the client level.
Consistent interaction
While each Digital.ai TeamForge service has its own SOAP interface, interaction with each service is designed to be as consistent as possible. The calls for each service are similar, although the data format and specific call parameters may be different.
For example, the following calls are consistent across all services:
- list
- get
- set
- delete
- create
The call parameters, however, are different. For example:
- When working with the CollabNet service, you might call
getProjectList(string sessionID)
. - When working with the TaskApp service, you might call
getTaskList(string sessionID, string taskFolderID)
.
Get started with the Digital.ai TeamForge SOAP API
A Digital.ai TeamForge plugin can provide any of the features a user can access through the Web interface.
-
Browse the CollabNet User Help to get a full picture of the functionality you can deliver with the SOAP API.
-
Get an idea of the sorts of applications that have been developed.
-
Look at the available applications.
-
Review the reference applications on the CollabNet community site. These samples illustrate some of the more common methods for using TeamForge via the SOAP API. They interact with most of the TeamForge data objects, including users, projects, trackers and artifacts, code commits and tasks.
-
If you find a defect in a sample program or have a suggestion for improvement, please post a message in the developer discussion forum.
-
Set up the tools you will need:
-
A Java JDK, 1.8.0_131 or later, from http://www.oracle.com/technetwork/java/index.html.
-
Apache Ant, version 1.7.0 or later, from http://ant.apache.org.
-
-
Choose a place to host your plugin project online. We recommend http://www.collab.net/community, because you get access to all the collaboration support tools that Digital.ai TeamForge provides.
-
Get the SDK from http://www.collab.net/community/teamforge. The SDK includes everything needed to develop and deploy your application:
-
Source files and compiled output.
-
Full JavaDoc reference material. Inside the package, look for docs/com/collabnet/ce/soap60/webservices.
-
Annotated code examples.
-
-
Get help from other Digital.ai TeamForge users and CollabNet staff in the TeamForge API discussion forum.
Send Commit Data to TeamForge via SOAP
Use the Commit Tool provided with TeamForge to transmit your commit data to TeamForge.
The SCM Adapter allows you to develop integrations with almost any SCM tool, then exchange commit data with TeamForge. After you have created an SCM integration using the TeamForge API, you will use the Commit Tool provided with TeamForge to transmit your commit data to TeamForge.
For any SCM tool that supports triggers, you can use the tool’s triggering mechanism to script the following actions. Otherwise, you can perform them manually for each commit.
The SCM Adapter option is always available, but will work only if you have developed an integration with an SCM tool using the TeamForge API.
-
Get the Commit Tool from
$SOURCEFORGE_HOME/integration/CommitTool.py
. -
Add the SCM server to your TeamForge installation. For the end user instructions, see Integrate a Source Code Server.
-
Create a repository on the SCM server. For the end user instructions, see Create a Source Code Repository.
-
Use the Commit Tool to start a commit.
CommitTool.py create <systemId> <path> <username> <host> <port>
where:
-
systemId
is the external system identifier that was given to the integration server. You can find this on the Repository Details page. -
path
is the path on the external system that was given to the repository. See the Repository Details page. -
username
is the TeamForge user name that will be performing the commit. -
host
is the TeamForge application server machine hostname. -
port
is the TeamForge application server machine SOAP port.
-
-
After the commit has been created, use the Commit Tool to add files with versions and actions.
CommitTool.py add <filename <version [<status [<fromfile <fromversion]]
where:
-
filename
is the name of the file that is being placed into the commit. -
version
is the version of the file that is being placed into the commit. -
status
is the status of the file in the repository. Valid status values are ʹaddedʹ, ʹdeletedʹ, ʹmodifiedʹ, ʹmovedʹ, and ʹcopiedʹ. Status is optional and will default to ʹaddedʹ if no value is provided. -
fromfile
is the name of the original filename if this file was copied or moved. It is required on a copy or move, but is not allowed on an add, delete, or modify. -
fromversion
is the version of the original filename is this file was copied or moved. It is required on a copy or move, but is not allowed on an add, delete, or modify.
-
-
When all actions and files have been added to the commit, use the Commit Tool to transmit the commit to Digital.ai TeamForge.
CommitTool.py commit <commitmessage>
where
<commitmessage>
is a description about the commit that will be displayed along with the files, versions, and operations.
To create an association, use the standard associate command [<item id>]. No special syntax is required when using the Commit Tool.
For all of the above commands, when run correctly, there will be no output, and the return value of the program will be “0”, indicating success. Failure will show a message and return with a non “0” return value.
To see the status of the current commit, you can use the Commit Tool to print the output of the current commit:
CommitTool.py print
It will show output similar to this:
Repository: <username>@<systemid>:<path> Modified filename 1.2 Added document 1.1 Copied newfile 1.1 (From: origfile 1.3) <status> <filename> <version> (From: <fromfile> <fromversion>)
Update an application to TeamForge 23.1 API
To use any of the new API calls introduced in TeamForge 23.1, you must update your existing applications to use the 23.1 API.
See TeamForge 23.1 Javadoc for more information.
-
For calls that use the TeamForge-provided Java SDK classes, update all references to the package containing the classes.
The package is located at
com.collabnet.ce.soap60
. -
For calls that access the WSDL directly, point your application to the new WSDL location.
The WSDL is located at
http://<teamforge‐server>/ce‐soap60/services/<service‐name>?wsdl
. -
Update any calls that have been changed in the 23.1 API.
TeamForge Services Available via SOAP
TeamForge provides a SOAP service for each tool in the application.
The WSDL for each TeamForge service is available on your TeamForge site at https://<mysite.com>/ce-soap60/services/<myService>?wsdl
. For an example, to review the WSDL for the Tracker service, see http://ctf.open.collab.net/ce-soap60/services/TrackerApp?wsdl. For information on the SOAP API, including the pluggable component package and classes, see the SOAP package summary.
The CollabNet Service
The CollabNet service is the primary service that handles logging into and out of Digital.ai TeamForge , finding and creating users, and retrieving lists of projects, project members, and project data.
The CollabNet service must always be accessed first, to authenticate the user and return a sessionId. The sessionId is a necessary parameter that must be passed to the methods in the other services.
The CollabNet service also handles retrieving and managing lists of users and projects, which are often the first steps that an application must perform.
Some examples of activities that are managed by the CollabNet service are:
- Returning a list of all Digital.ai TeamForge users or projects.
- Creating a new user.
- Providing a user with a list of all projects of which he or she is a member.
- Creating an association between two items.
- Managing user groups and their membership.
User groups, added in Digital.ai TeamForge Enterprise Edition 4.4 Service Pack 1, simplify permission management for projects. User groups are site‐wide sets of users, managed by site administrators. Project administrators can add user groups to roles, just like they can add individual project members.
After authenticating the user through the CollabNet service, you can then access all of the other services that manage the items and activities associated with the other Digital.ai TeamForge applications, such as trackers, tasks, documents, or file releases. A new “Anonymous Login” capability introduced in Digital.ai TeamForge Enterprise Edition 4.4 adds the ability to log in with the privileges and access rights of a non‐authenticated user.
For a complete description of each method, including its parameter definitions and SOAP faults and for a list of new and changed methods, see the JavaDoc for this service.
The WSDL for this service is available on your TeamForge site at https://<mysite.com>/ce-soap60/services/CollabNet?wsdl
. For example, here's the copy on the CollabNet web site: http://ctf.open.collab.net/ce-soap60/services/CollabNet?wsdl.
The Discussion Service
The DiscussionApp service handles the activities and items associated with forums.
Some examples of activities that are managed by the DiscussionApp service are:
- Creating a forum, forum topic, or forum post.
- Returning a list of all posts in a forum.
- Returning a list of forum posts created by a specified user.
- Returning a list of forum posts matching a search string.
- Deleting a forum, forum topic, or forum post.
After authenticating the user through the CollabNet service, you can then access the DiscussionApp service to work with forums, forum topics, and forum posts.
For a complete description of each method, including its parameter definitions and SOAP faults and for a list of new and changed methods, see the JavaDoc for this service.
The WSDL for this service is available on your TeamForge site at https://<mysite.com>/ce-soap60/services/DiscussionApp?wsdl
. For example, here's the copy on the CollabNet web site: http://ctf.open.collab.net/ce-soap60/services/DiscussionApp?wsdl.
The Document Service
The DocumentApp service handles the activities and items associated with documents and document folders.
Some examples of activities that are managed by the DocumentApp service are:
- Creating a document or document folder.
- Editing a document’s details.
- Returning the name of the user who last edited or locked a document.
- Returning a list of documents matching a search string.
- Returning a list of all document folders in a project.
- Returning a list of all open document reviews in a project.
- Moving a document or document folder.
After authenticating the user through the CollabNet service, you can access the DocumentApp service to work with documents and document folders.
For a complete description of each method, including its parameter definitions and SOAP faults and for a list of new and changed methods, see the JavaDoc for this service.
The WSDL for this service is available on your TeamForge site at https://<mysite.com>/ce-soap60/services/DocumentApp?wsdl
. For example, here's the copy on the CollabNet web site: http://ctf.open.collab.net/ce-soap60/services/DocumentApp?wsdl.
The File Release Service
The FrsApp service handles the activities and items associated with file releases.
Some examples of activities that are managed by the FrsApp service are:
- Creating a package, release, or file.
- Editing a package, release, or file.
- Returning a list of all packages in a project.
- Returning a list of all releases in a package.
- Returning the status, maturity value, or other attribute of a release.
After authenticating the user through the CollabNet service, you can access the FrsApp service to work with file releases.
For a complete description of each method, including its parameter definitions and SOAP faults and for a list of new and changed methods, see the JavaDoc for this service.
The WSDL for this service is available on your TeamForge site at https://<mysite.com>/ce-soap60/services/FrsApp?wsdl
. For example, here's the copy on the CollabNet web site: http://ctf.open.collab.net/ce-soap60/services/FrsApp?wsdl.
The File Storage service
The FileStorageApp and SimpleFileStorageApp services handle uploading of files and simple data bytes.
Some examples of activities that are managed by the FileStorageApp and SimpleFileStorageApp services are:
- Uploading a file to Digital.ai TeamForge.
- Downloading a file from Digital.ai TeamForge.
- Checking the size of a file.
After authenticating the user through the CollabNet service, you can then access the FileStorageApp and SimpleFileStorageApp services to work with file uploads.
For a complete description of each method, including its parameter definitions and SOAP faults and for a list of new and changed methods, see the JavaDoc for this service.
The WSDL for this service is available on your TeamForge site at https://<mysite.com>/ce-soap60/services/FileStorageApp?wsdl
. For example, here's the copy on the CollabNet web site: http://ctf.open.collab.net/ce-soap60/services/FileStorageApp?wsdl.
The Integration Data Service
The IntegrationDataApp service enables applications to associate their own data or metadata with Digital.ai TeamForge objects.
An application can register its own namespace, to prevent collisions with other applications, and then store key‐value pairs of data that are associated with any Digital.ai TeamForge object.
- Developers who are creating integrations between Digital.ai TeamForge and external applications can use this service to maintain associations between Digital.ai TeamForge objects and counterparts in other systems.
- Developers creating customizations or enhancements can use this service to store additional data not directly supported by other Digital.ai TeamForge APIs. For example, you can create extra, hidden fields on any object (such as an artifact, a user or a project) and use a Velocity customization to display that data where you need it.
For a complete description of each method, including its parameter definitions and SOAP faults and for a list of new and changed methods, see the JavaDoc for this service.
The WSDL for this service is available on your TeamForge site at https://<mysite.com>/ce-soap60/services/IntegrationDataApp?wsdl
. For example, here's the copy on the CollabNet web site: https://ctf.open.collab.net/ce-soap60/services/IntegrationDataApp?wsdl.