Who can use this feature?
- Available in TDAdmin and the Ticketing application admin UI
- License Requirement: Enterprise
- Application Access: User must have access to Work Management and the specific Ticketing application, or TDAdmin
- Administrative Access:
- Ticketing Application Admins can configure Web Service Methods from the Ticketing Application Admin interface
- Global Administrators can configure Web Service Methods in TDAdmin
In this article, we’ll cover:
Overview
A Web Service Method is one of four pieces used to set up Workflow Web Services. See Getting Started With Workflow Web Services for how they fit together.
A Web Service Method is a specific HTTP call — GET, POST, PATCH, or another method — made against a Web Service Provider. This is where you define the endpoint, any parameters, and the body needed for that particular call. Once created, a Web Service Method can be called from a Web Service step in a workflow.
Prerequisites:
- Web Service Provider
- Service Account or designated User account (if the call requires authentication)
- Web Service Auth Account (if the call requires authentication)
Web Service Methods let you make API calls to tickets or other outlets, using data from within TeamDynamix to share it within the tool or externally. You need to define a separate Web Service Method for each combination of URL and HTTP method you want to call. For example, you'd need three separate methods for:
- GET http://example.com/123
- POST http://example.com/123
- GET http://example.com
A Web Service Method has a URL, an HTTP action, any number of headers, and, when applicable, a body. To template out different portions of the call depending on the associated ticket or the current state of the workflow, you can define parameters. Once defined, a parameter can be substituted into the URL, headers, and body as needed — but it isn't otherwise submitted to the server on its own.
See the TeamDynamix API/Web Services Overview for more.
Where to Find This
Web Service Methods are configured per Ticketing application:
- TDAdmin > Applications > [Ticketing application] > Workflow Web Services > Web Service Methods
Method Fields
- Name – Whatever you want to call the Web Service Method. The name appears in the workflow builder.
- Web Service Provider – The Provider you defined earlier.
- Active – A Web Service Method must be active to be usable in a Workflow Web Service.
- Method – GET, POST, PATCH, or another HTTP method.
- URL – The actual URL to call. It's seeded from the selected Web Service Provider, but you should edit it to the appropriate URL for this method.
- Headers – Any HTTP headers to send along with the request.
- Parameters – The information the workflow needs to supply for this Web Service Method:
- Parameter Name – What you want to call the parameter for this method — for example, myvalue.
- Data Type – The type of data the parameter holds — for example, an integer.
- Source – Whether the parameter comes from the ticket data or is supplied by the workflow.
- Source Property – The specific field being passed from the ticket or the workflow.
- Body – The HTTP body to send for a PUT, POST, or PATCH request.
- Authentication – The Web Service Auth Account you defined earlier, if needed.
Setting the Content-Type Header
To avoid encoding issues, validate which content-type header each external endpoint expects, and set that as the content-type header on each Web Service Method. Many RESTful APIs expect some form of text/json or application/json content type — these are also the only two content types supported by TeamDynamix RESTful APIs. If you don't specify a content-type header with a specific encoding type, external Web Service Method calls may encode your data in unexpected ways.
Creating a Web Service Method
To create a new Web Service Method:
- Navigate to TDAdmin > Applications > [Ticketing application].
- Select Workflow Web Services in the left navigation, then Web Service Methods.
- Click +New.
- Enter a Name for the method.
- Select the Web Service Provider.
- Ensure the Active box is checked.
- Select the Method (GET, POST, PATCH, etc.).
- Enter the URL for this method.
- Add any Headers the request should include.
- Define any Parameters the method needs, entering a Parameter Name, Data Type, Source, and Source Property for each.
- Enter the Body, if the method is a PUT, POST, or PATCH request.
- Select an Authentication account if the method requires one.
- Click Save.
To preview the templated contents of an HTTP request based on different parameter values, click Test Request on the method's detail page.
You now have a Web Service Method you can add to a workflow. See Web Service Steps to use the method in a workflow.