• Platform
    • Manager
    • Maestro
    • Exchange
    • Workspaces
    • Analytics
    • Springboard
    • API
Transact Services Guide (TSG)

Transact Services Guide (TSG)

  • Getting Started
  • Groovy Guide
  • Service Development
  • Groovy Services API
  • REST API

›REST API

Getting Started

  • Introduction

Groovy Guide

  • Groovy Guide
  • Groovy Declarations
  • Control Statements

Service Development

  • Service Development
  • Transaction Processing Sequence
  • Service Logging
  • Remote Service Calls
  • Fluent Security Configuration
  • Third-party Libraries

Groovy Services API

  • Groovy Services API
  • Fluent Function
  • Delivery Function
  • Form Version Selector
  • Form Security Filter
  • Form Prefill
  • Tracking Number
  • Form Dynamic Data
  • Submission Preprocessor
  • Receipt Number
  • Form Saved Processor
  • Submission Data Validator
  • Submission Completed Processor
  • Render Receipt Service
  • Delivery Process
  • Task Expiry Process
  • Email Service
  • Job Action
  • Scheduled Service
  • Groovy Service
  • SSO Revalidation
  • SSO Get Authentication Token
  • SSO Authentication OK Response
  • SSO Authentication Provider
  • Transaction History Publisher
  • Virus Scan

REST API

  • REST API
  • REST Application Package API
  • REST Delivery API
  • REST Form Groups API
  • REST Groovy Service Invoke v2
  • REST Service Definitions API
  • REST Tasks API
  • REST TestCenter API
  • REST TPac API
  • REST Transactions API
  • REST Transaction History API

Workspaces API

  • Workspaces API
  • Filters
  • Sort
  • Workspaces Category API
  • Workspaces Current User API
  • Workspaces Extract Name API
  • Workspaces Form API
  • Workspaces Group API
  • Workspaces Job API
  • Workspaces Org API
  • Workspaces Property Name API
  • Workspaces Space API
  • Workspaces Txn API
  • Workspaces User API

REST TestCenter API

The TestCenter API provides a REST service for performing test operations in Journey Manager.

Security

To access the Tasks REST endpoint the caller needs to be authenticated using HTTP Basic Authentication. The authenticated user will need an user account on the Journey Manager server and this account will need to be active and have access to the Management Console module.

To be authorized to call the service the user account will also need the Management Console permission 'REST Test Center API'. You will also need to be either an administrator with global access or be associated with an organization to access its transaction records.

URL Endpoint

The REST TestCenter API URL endpoint is as follows:

``` https:///manager/secure/rest/test-center/v1/ ```

Service API


This section provides a description all the REST TestCenter API operations including:

  • POST


POST

Perform post request with assertion statements.

URL Format

POST https://<tm server>/manager/secure/rest/test-center/v1/

POST Body

The POST request must contain body that contains a JSON structure pointing to transaction (by tracking code or submit key) and describing the assertions. Each assertion object has assertion path, type (properties, xml, txn, formDataMap) and value. Moreover, it specifies the assertion check (equals, notEquals, etc.).

The set of assertions in JSON attributes is listed below (all attributes are mandatory unless indicated otherwise):

Attribute Type Description
trackingCode String transaction tracking code (should be specified if no submit key)
submitKey String transaction submit key (should be specified if no tracking code)
assertions List of assertion objects list of assertion objects
assertion String assertion [ equals | notEquals | equalsIgnoreCase | notEqualsIgnoreCase | contains | notContains | exists | notExists | greaterThan | lessThan ]
assertedValue String assertion object value to be checked
path String assertion object path where to look up the value
type String assertion object type [ formDataMap | property | txn | xml ]

Example: Test assertion for submit key

This example test transaction with submit key "a6eca4fa2cdce8f343a8a3e2047badda" for assertion:

  • Transaction's delivery status equals to "Not Ready" (note that response assertion status is true)
The example the message body below formatted for easier reading.
POST <b>/manager/secure/rest/test-center/v1/</b> HTTP/1.1
Host: https://transact.maguire.com
Content-Type: application/json

{
  "submitKey": "a6eca4fa2cdce8f343a8a3e2047badda",
  "assertions": [
    {
      "assertedValue": "Not Ready",
      "assertion": "equals",
      "path": "deliveryStatus",
      "type": "txn"
    }
  ]
}

200 Response

{
  "submitKey": "a6eca4fa2cdce8f343a8a3e2047badda",
  "assertions": [
    {
      "assertedValue": "Not Ready",
      "assertion": "equals",
      "path": "deliveryStatus",
      "status": true,
      "type": "txn"
    }
  ]
}

Example: Test not found transaction

This example test transaction with tracking code "1234567890" but it does not exist. ``` POST /manager/secure/rest/test-center/v1/ HTTP/1.1 Host: https://transact.maguire.com Content-Type: application/json

{ "trackingCode": "1234567890", "assertions": [ { "assertedValue": "Completed", "assertion": "equals", "path": "deliveryStatus", "type": "txn" } ] }```

404 Not Found Response

Not found submission for the specified submitKey/trackingCode.

Example: Test several assertions

This example test transaction with tracking code "89AC4910" for four assertions:

  • Form data map's path "FirstName" equals to "JeffJ"
  • Transaction's delivery status equals to "Completed"
  • Transaction's delivery status does not contain "Comp1"
  • Form xml's revision number is greatner than "5"
The example the message body below formatted for easier reading.
POST <b>/manager/secure/rest/test-center/v1/</b> HTTP/1.1
Host: https://transact.maguire.com
Content-Type: application/json

{
  "trackingCode": "YMQ8TN6",
  "assertions": [
    {
      "assertedValue": "JeffJ",
      "assertion": "equals",
      "path": "FirstName",
      "type": "formDataMap"
    },
    {
      "assertedValue": "Completed",
      "assertion": "equals",
      "path": "deliveryStatus",
      "type": "txn"
    },
    {
      "assertedValue": "Comp1",
      "assertion": "notContains",
      "path": "deliveryStatus",
      "type": "txn"
    },
    {
      "assertedValue": "5",
      "assertion": "greaterThan",
      "path": "//RevisionNumber",
      "type": "xml"
    }
  ]
}

200 Response

{
  "trackingCode": "YMQ8TN6",
  "assertions": [
    {
      "assertedValue": "JeffJ",
      "assertion": "exists",
      "path": "FirstName",
      "status": false,
      "type": "formDataMap"
    },
    {
      "actualValue": "Not Ready",
      "assertedValue": "Completed",
      "assertion": "equals",
      "path": "deliveryStatus",
      "status": false,
      "type": "txn"
    },
    {
      "assertedValue": "Comp1",
      "assertion": "notContains",
      "path": "deliveryStatus",
      "status": true,
      "type": "txn"
    },
    {
      "actualValue": "1",
      "assertedValue": "5",
      "assertion": "greaterThan",
      "path": "//RevisionNumber",
      "status": false,
      "type": "xml"
    }
  ]
}
← REST Tasks APIREST TPac API →
  • Service API

Terms & Conditions

Privacy Policy

Cookie Policy

Copyright © 2003-2022 Temenos Headquarters SA