AgileDesignerAutomator 202 - REST Call to TDM

Document created by Peter De Zutter Employee on Nov 15, 2017
Version 1Show Document
  • View in full screen mode


This document is a small guide on how to use the REST Post activity in Javelin/Ada to call the TDM API.


In order to be able to use the TDM API a token must be requested. Once the token has been received it will be re-used in the create group call or in any other TDM API call. 


The workflow consist of the following elements:

- Process to Generate token call

- Process to Create group call



A couple of variables are used to store the responses, headers and token. For readability variable names are shown in Italic.


In the following sections, each of the calls will be explained in more detail.


Generate Token

As shown below, the generate token call is the first step in the process. Second step is to assign the response to the token variable and last step is to log our generated token

For the Generate Token POST call the following properties are needed:

  • BaseURL: baseurl
  • DisplayName: Generate Token POST call
  • IsBasicAuthentication: True
  • IsJSON: True
  • Password: <password>
  • RequestContent: ""
  • RequestType: "POST"
  • Resource: "TestDataManager/user/login"
  • RestResponseJObject: tokengenresponse
  • Username: "administrator"


In the variable assignment step, the generated token is extracted from the response.

  • DisplayName: Fetch Token
  • To: token
  • Value: tokengenresponse.GetValue("token").ToString()


Logging step

  • DisplayName: Log Token
  • MessageToLog: token


Create Group Call

In this process sequence, a couple of new variables have been defined and their scope is limited to the process only. The variables are used to assemble the content body for the add group request and to store the response of the call.

The used project id value of addGroupContent does need to be altered to reflect your environment.


First the header needs to be constructed, which is done in 2 steps.

step 1:

  • DisplayName: InvokeMetho
  • TargetObject: headers
  • TargetType: null
  • Parameters:
    • Direction: In
      • d
      • MethodeName: Add
    • Type: String
    • Value: "Authorization"

step 2:

  • DisplayName: InvokeMethod
  • MethodeName: Add
  • TargetObject: headers
  • TargetType: null
  • Parameters:
    • Direction: In
    • Type: String
    • Value: "Bearer " & token

Next the content object needs to be constructed, which is again done in 2 steps.

step 3:

  • DisplayName: InvokeMethod
  • MethodeName: Add
  • TargetObject: QueryString
  • TargetType: null
  • Parameters:
    • Direction: In
    • Type: String
    • Value: "projectId"

step 4

  • DisplayName: InvokeMethod
  • MethodeName: Add
  • TargetObject: QueryString
  • TargetType: null
  • Parameters:
    • Direction: In
    • Type: String
    • Value: "2500" (See finding out the project ID document)

Step 5:

As last step another REST Post activity is executed.

  • BaseURL: baseurl
  • DisplayName: Add Group
  • IsBasicAuthentication: False
  • IsJSON: True
  • Password: <password>
  • QueryString: QueryString
  • RequestContent: addGroupContent
  • RequestType: "POST"
  • Resource: "TestDataManager/api/ca/v1/groups"
  • RestResponseJObject:addGroupResponse


When the flow is executed the following log output is produced.

Running flow...
2017-11-16 09:57:29 - Run flow: C:\Users\dezpe01\Desktop\post_call_add_group.vwf
2017-11-16 09:57:29 - Running Test Case: Flowchart
2017-11-16 09:57:29 - Executing Step: Generate Token POST call
2017-11-16 09:57:30 - Executing Step: Log Token
2017-11-16 09:57:30 - Executing Step: Add group
2017-11-16 09:57:32 - Running Test Case: Flowchart
2017-11-16 09:57:32 - Test Case: Flowchart Execution Complete
Execution complete


Verification in TDM portal shows that the user group was created.


2 people found this helpful