Skip to content
CA Test Data Manager - 4.4
Documentation powered by DocOps

Use APIs to Prepare Test Data for Non-Relational Sources

Last update July 27, 2018

Organizations want to rigorously test their applications using varied sets of data before each release. Unfortunately, in most of the cases, testers do not get access to the rich, high-quality test data. Because of the non-availability of enough test data, they are not able to comprehensively test their applications. The CA TDM Portal helps organizations address this situation by generating realistic synthetic data that testers can use to test their applications.

This article explains with the help of an example about how Test Data Engineers (TDEs) can use exposed CA TDM Portal APIs to generate synthetic test data for an application that uses data in the form of XML files. The example used in this article uses a sample XSD file to define the relational schema and the associated XML file for the sample data. This example also shows how TDEs can create data generation rules and can export the generated data. Testers can then use the generated XML files to confidently perform different testing scenarios.

The complete process is shown in the following diagram; TDEs perform all these tasks with the help of the exposed APIs:

Use APIs to prepare test data using a flat file

The steps shown in the diagram are as follows:

Note: For information about specific concepts (for example, project, data generator, data painter), see the relevant sections in this documentation. Additionally, the process explained in this article is applicable only for XML, XSD, JSON, WSDL, and RR Pair file types.

This page refers to the following API Services:

Get a Security Token

The process to get a security token involves two steps:

  1. Encode your CA TDM Portal credentials to the Base64 format.
  2. Use the encoded value in a POST request to generate a security token.

The security token remains valid for 24 hours.

Encode CA TDM Portal Credentials

Encode your CA TDM Portal credentials to the Base64 format. You can use any application that allows you to do so.

Follow these steps:

  1. Access an application that lets you encode your credentials to the Base64 format.
  2. Enter your CA TDM Portal login credentials (in the format <user name>:<password>) in the source field.
    Note: Ensure that the credentials have appropriate permissions to perform all the required operations.
  3. Click the option to encode the credentials. The encoded Base64 format for the example is displayed as follows:

    ZwRTaX5pc4SxYXSvcjptYXJtaXRl
  4. Note the encoded value.

Generate the Security Token

After you get the encoded value, use that value in a POST request. When you run the specific API, it generates a security token. Use that token in all the subsequent operations.

Follow these steps:

  1. Access the following CA TDM Portal API:

    POST https://<server>:<host>/TestDataManager/user/login

    Note: For more information about this API, see the "auth-controller: Auth Controller" section at https://<server>:<port>/TestDataManager/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TestDataManager/swagger-ui.html.

  2. Enter the encoded value in the Authorization field (Basic <encoded value>), which is as follows for the example:

    Basic YWRtaW5pc3RyYXRvcjptYXJtaXRl
  3. Run the API to get a security token.
  4. Note the value of the token parameter in the response body, which is as follows for the example:

    eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    You have successfully generated a security token that you can use in all the subsequent operations explained in this article.

The next step is to create a connection profile.

Create a Connection Profile

Create a connection profile to connect to the source or target databases.

Note: For more information about working with connection profiles in the UI, see Create a Connection Profile in the UI section.

  1. Access the following CA TDM Portal API:

    POST https://<server>:<host>/TDMConnectionProfileService/api/ca/v1/connectionProfiles

    Note: For more information about this API, see the "con-profile-controller: Interface for connection profiles" section at https://<server>:<port>/TDMConnectionProfileService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMConnectionProfileService/swagger-ui.html.

  2. Enter the security token in the Authorization field as follows:

    Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

  3. Click the model schema for the profile parameter and specify the required connection profile details. For the example used in this article, the following information was entered:

    {
    "name":"PO_Profile",
    "description":"PO_Profile",
    "dbType":"sql server",
    "server":"abc01-xy001",
    "port":"1433",
    "instance":"",
    "service":"",
    "database":"podb",
    "schema":"",
    "username":"sa",
    "password":"abcde@123"
    }

  4. Run the API.

  5. Review the response body and note the connection profile name, which is PO_Profile in this case.

The next step is to create a project.

Create a Project

All operations that you perform to prepare test data for non-relational data sources take place in context of a specific CA TDM project.

Note: For more information about working with CA TDM Portal projects in the UI, see Create and Edit Projects in the UI section.

  1. Access the following CA TDM Portal API:

    POST https://<server>:<host>/TDMProjectService/api/ca/v1/projects

    Note: For more information about this API, see the "project-controller: Interface for projects" section at https://<server>:<port>/TDMProjectService/swagger-ui.html.  For the example in this article, the URL is https://server-po:8443/TDMProjectService/swagger-ui.html.

  2. Enter the security token in the Authorization field as follows:

    Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

  3. Click the model schema for the projectInfo parameter and specify the required project details. For this example, the following information was entered:

    {

    "description": "PO_Project Description",
    "inheritTables": true,
    "name": "PO_Project"
    }

  4. Run the API to create a project.
  5. Review the response body to get the project ID, which is 4945 in this case.

The next step is to create a version for this project.

Create a Version

After you create a project, you must create a version for the same project.

Note: For more information about working with CA TDM Portal project versions in the UI, see Manage Project Versions in the UI section.

  1. Access the following CA TDM Portal API:

    POST https://<server>:<host>/TDMProjectService/api/ca/v1/projects/{projectId}/versions

    Note: For more information about this API, see the "version-controller: Version Controller" section at https://<server>:<port>/TDMProjectService/swagger-ui.html.  For the example in this article, the URL is https://server-po:8443/TDMProjectService/swagger-ui.html.

  2. Enter the security token in the Authorization field as follows:

    Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

  3. Click the model schema for the versionInfo parameter and specify the required version details. For this example, the following information was entered:

    {

    "description": "PO_Project version description",
    "name": "PO_Project Version"
    }

  4. Enter the project ID (4945) in the projectId field.
  5. Run the API to create a version.
  6. Review the response body to get the version ID, which is 4946 in this case.
  7. Note the version ID. 
    This version ID is used in all the required operations explained in this article.

The next step is to register an object to the created project and version.

Register a File Object

Register a file object so that you can generate more data for it.

Note: For more information about working with file object registration in the UI, see Register File Objects in the UI section.

  1. Access the following CA TDM Portal API:

    POST https://<server>:<host>/TDMModelService/api/ca/v1/objects

    Note: For more information about this API, see the "object-controller: Interface for Objects" section at https://<server>:<port>/TDMModelService/swagger-ui.html.  For the example in this article, the URL is https://server-po:8443/TDMModelService/swagger-ui.html.

  2. Enter the following information to register an object of type XSD for this example:
    • Authorization 

      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • projectId 
      For the example, the value is 4945.
    • versionId 
      For the example, the value is 4946.
    • body
      For this example, the value is as follows:

      {

      "objectName": "PO_Object",

      "objectType": "XSD",

      "fileEncoding": "UTF-8"

      }

    • files
      For this example, the value is C:\PO_Schema.xsd (location where the file is present). 
      If you are using Swagger, you cannot use this field to upload the file, because file upload does not work in Swagger. Ensure that you use some other client application for this API.
    Note: If a specific field is not applicable for your object type, you can ignore that field. For example, the responseFile field is not applicable for XSD, JSON, and XML types. Therefore, you can keep it blank for these object types.
  3. Run the API to register the object.
  4. Review the response body and note the object ID, which is 2389 in this case.

The next step is to create a data generator.

Create a Data Generator

A data generator lets you create data generation rules and publish data.

Note: For information about working with data generators in the UI, see Create Data Generator in the UI section.

  1. Access the following CA TDM Portal API:

    POST https://<server>:<host>/TDMGeneratorService/api/ca/v1/generators

    Note: For more information about this API, see the "data-generator-controller: Interface for data generator" section at https://<server>:<port>/TDMGeneratorService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMGeneratorService/swagger-ui.html.

  2. Enter information in the following fields:

    • Authorization

      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • generatorInfo
      For the example, the value is as follows:

      {
      "description": "PO_Generator",
      "name": "PO_Generator",
      "projectId": 4945,
      "projectName": "PO_Project",
      "versionId": 4946,
      "versionName": "1.0"
      }

    • projectId
      For the example, the value is 4945.
    • versionId
      For the example, the value is 4946.
  3. Run the API to create a data generator.

  4. Review the response body and note the generator ID, which is 4955 in this case.

The next step is to create derived objects and register them.

Create and Register Derived Objects

You create derived objects to convert non-relational data model into a relational model.

Note: For more information about working with derived objects in the UI, see Create and Register Derived Objects in the UI section.

  1. Access the following CA TDM Portal API:

    POST https://<server>:<host>/TDMModelService/api/ca/v1/objects/{objectId}/actions/derive

    Note: For more information about this API, see the "object-controller: Interface for Objects" section at https://<server>:<port>/TDMModelService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMModelService/swagger-ui.html

  2. Enter information in the following fields for the XSD object type (used for this example):
    • Authorization

      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • objectId
      For the example, the value is 2389.
    • projectId
      For the example, the value is 4945.
    • versionId
      For the example, the value is 4946.
    • async
      For the example, the value is true.
    • rootElementName
      For the example, the value is PO.
    • generateForeignKeys
      For the example, the value is true.
    • cycleRecursionDepth
      For the example, the value is 2.
    • importObjectData
      For the example, the value is true.
    • profileName
      For the example, the value is PO_Profile.
    Note: Leave the fields that are not applicable for your file object type.
  3. Run the API.
  4. Review the response body and note the job ID, which is 1223 in this case.

The next step is to get the status of the submitted job.

Get the Status of the Submitted Job (Derived Object)

After you submit a job, get the status of the job to verify that the job is executed without any issue.

  1. Access the following CA TDM Portal API:

    GET https://<server>:<host>/TDMJobService/api/ca/v1/jobs/{jobId}

    Note: For more information about this API, see the "job-engine-service-controller: Interface for requests" section at https://<server>:<port>/TDMJobService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMJobService/swagger-ui.html.

  2. Enter the security token in the Authorization field as follows:

    Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

  3. Enter the job ID (request ID) 1223 in the jobId field.
  4. Run the API.
  5. Review the response body and verify that the status is shown as Completed.

The next step is to get the list of derived objects.

Get the List of Derived Objects

Get the list of derived objects to verify that all the tables are created in the database successfully.

  1. Access the following CA TDM Portal API:

    GET https://<server>:<host>/TDMModelService/api/ca/v1/objects/{objectId}/derivedObjects

    Note: For more information about this API, see the "object-controller: Interface for Objects" section at https://<server>:<port>/TDMModelService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMModelService/swagger-ui.html.

  2. Enter information in the following fields:
    • Authorization

      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • objectId
      For the example, the value is 2389.
    • projectId
      For the example, the value is 4945.
    • versionId
      For the example, the value is 4946.
  3. Run the API.
  4. Review the response body to find the list of all derived objects that are related to the specified file object.

The next step is to import sample data into derived objects.

Import the Sample Data

Import the sample data into derived objects so that you can use the same sample data to generate more data.

Note: For more information about working with the import operation in the UI, see Perform Actions on Derived Objects in the UI section.

  1. Access the following CA TDM Portal API:

    POST https://<server>:<host>/TDMModelService/api/ca/v1/objects/{objectId}/actions/import

    Note: For more information about this API, see the "object-controller: Interface for Objects" section at https://<server>:<port>/TDMModelService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMModelService/swagger-ui.html.

  2. Enter information in the following fields for the XML file that is used for this example:
    • Authorization

      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • objectId
      For the example, the value is 2389.
    • projectId
      For the example, the value is 4945.
    • versionId
      For the example, the value is 4946.
    • async
      For the example, the value is true.
    • dataEncoding
      For the example, the value is UTF-8.
    • profileName
      For the example, the value is PO_Profile.
    • files
      For the example, the value is C:\PO.xml.
      If you are using Swagger, you cannot use this field to upload the file, because file upload does not work in Swagger. Ensure that you use some other client application for this API.
    • importToGenerator
      For the example, the value is true.
      Note: We recommend that you enable this option to ensure that the sample data is also imported into the specified data generator. This approach lets you automatically populate the data into the data generator, which otherwise is a manual effort.
    • generatorId
      For the example, the value is 4955.
  3. Run the API.
  4. Review the response body and note the job ID, which is 1224 in this case.
  5. Run the API (as explained previously) to get the status of the job based on the job ID 1224.
  6. Verify that the status is shown as Completed.
    You have successfully imported the sample data into derived objects.

The next step is write data generation rules.

Write Data Generation Rules

To successfully write data generation rules, you can find the data generation functions and variables that are available for you to use in expressions. You can then write and validate data generation expressions.

Note: For more information about working with the data generation rules in the UI, see Create Data Generation Rules in the UI section.

Get Data Generator Functions

  1. Access the following CA TDM Portal API to retrieve the list of all the data generator functions:

    GET https://<server>:<host>/TDMGeneratorService/api/ca/v1/generatorFunctions

    Note: For more information about this API, see the "data-painter-controller: Interface for data painter" section at https://<server>:<port>/TDMGeneratorService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMGeneratorService/swagger-ui.html

  2. Enter the security token in the Authorization field as follows:

    Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

  3. Run the API.
  4. Review the response body to view the available functions that you can use while creating data generation rules.

Get Data Generator Variables

  1. Access the following CA TDM Portal API to retrieve the list of all the data generator variables:

    GET https://<server>:<host>/TDMGeneratorService/api/ca/v1/generators/{generatorId}/variables

    Note: For more information about this API, see the "variable-controller : Interface for variables" section at https://<server>:<port>/TDMGeneratorService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMGeneratorService/swagger-ui.html

  2. Enter information in the following fields:
    • Authorization
      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • generatorId
      For this example, the value is 4955.
    • projectId
      For this example, the value is 4945.
    • versionId
      For this example, the value is 4946.
  3. Run the API.
  4. Review the response body to view the available variables that you can use while creating data generation rules.

Validate Expressions

  1. Access the following CA TDM Portal API to validate the data generation expressions that you write as part of the payload to this API:

    POST https://<server>:<host>/TDMGeneratorService/api/ca/v1/generators/evaluateExpression

    Note: For more information about this API, see the "data-painter-controller: Interface for data painter" section at https://<server>:<port>/TDMGeneratorService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMGeneratorService/swagger-ui.html

  2. Enter information in the following fields:
    • Authorization
      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro
    • requestBean
      You enter all expression-related information in this field. You can enter only one expression for a column. For the example used in this article, the following snippet shows the expression that was used for a column in a table:

      {

      "expression": "@randlov(0,@seedlist(US City)@)@",
      "levelID": 4955,
      "listTildes": [],
      "metaTable": {
      "columns": [
      {
      "columnName": "city",
      "dataType": "nvarchar",
      "length": 0
      }
      ],
      "tableName": "billTo"
      },
      "projectID": 4945,
      "versionID": 4946
      }

      When you run this API, the expression generates random US city names depending on the seedlist that is provided in the expression. The levelID parameter represents the data generator ID. The API returns only the resolved value; it does not validate the value depending on the column constraints (for example, mandatory column, data type, and so on).

  3. Run the API.
  4. Review the response body to view that the generated value is valid.

Get the Table IDs and Column Names

Identify the table IDs and corresponding columns where you want to add data generation rules.

  1. Access the following CA TDM Portal API:

    GET https://<server>:<host>/TDMGeneratorService/api/ca/v1/generators/{generatorId}/tables

    Note: For more information about this API, see the "data-generator-controller: Interface for data generator" section at https://<server>:<port>/TDMGeneratorService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMGeneratorService/swagger-ui.html.

  2. Enter information in the following fields:
    • Authorization
      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • generatorId
      For this example, the value is 4955.
    • projectId
      For this example, the value is 4945.
    • versionId
      For this example, the value is 4946.
  3. Run the API.
  4. Review the response body to note the table IDs, table names, column IDs, and column names where you want to add data generation rules. You use this information when you add data generation rules to the columns. Each table includes column names and their IDs.

Add Data Generator Definition

You add data generation rules to all the required columns in a specific table by running the following API. Ensure that you run this API separately for each table.

  1. Access the following CA TDM Portal API to add data generator definition for a table:

    POST https://<server>:<host>/TDMGeneratorService/api/ca/v1/generators/{generatorId}/tables/{tableId}/definitionRows

    Note: For more information about this API, see the "data-generator-controller: Interface for data generator" section at https://<server>:<port>/TDMGeneratorService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMGeneratorService/swagger-ui.html.

  2. Enter information in the following fields:
    • Authorization
      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • generatorId
      For this example, the value is 4955.
    • projectId
      For this example, the value is 4945.
    • versionId
      For this example, the value is 4946.
    • tableId
      For this example, the value for the PO_tdm_root table is 2402.
    • rowDefinitionDetails
      For this example, the value for the table ID 2402 is as follows:

      {
      "definitions": [
      {
      "columnName": "SHRED_ID",
      "columnValue": "@nextval(SHRED_ID_SEQ)@"
      },
      {
      "columnName": "SHRED_GROUP_ID",
      "columnValue": "~NEXT~"
      },
      {
      "columnName": "orderDate",
      "columnValue": "~CDATE~"
      },
      {
      "columnName": "comment",
      "columnValue": "@randlov(0,@seedlist(Random Text)@)@"
      }
      ]
      }

      This snippet includes all data generations rules that you want to add to the columns in the table PO_tdm_root.

  3. Run the API.
  4. Review the response to view that the success message is displayed.
  5. Run the API for other tables as required. For example, in this case, the API is run separately for each remaining table.

The next step is to publish the data.

Publish Data

After you add data generation rules to derived objects, you can publish the data.

Note: For more information about working with data publishing in the UI, see Publishing Data in the UI section.

Submit the Publish Job

  1. Access the following CA TDM Portal API to submit the publish job:

    POST https://<server>:<host>/TDMJobService/api/ca/v1/jobs

    Note: For more information about this API, see the "job-engine-service-controller: Interface for requests" section at https://<server>:<port>/TDMJobService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMJobService/swagger-ui.html.

  2. Enter information in the following fields:
    • Authorization
      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • jobInfo
      For this example, the value is as follows: 

      {
      "name":"Publish_PO_PO_Generator",
      "description":"Publish to PO using PO_Generator",
      "projectId":4945,
      "type":"PUBLISHJOB",
      "origin":"generation",
      "scheduledTime":1464952420271,
      "email":"abcde02@axy.com",
      "jobs":[

      ],
      "parameters":{
      "generatorId":4955,
      "jobType":"PUBLISH",
      "title":"Publish to PO using PO_Generator",
      "publishTo":"TGT",
      "target":"PO_Object_2398",
      "dataTargetProfile":"PO_Profile",
      "repeatCount":1,
      "tables":[
      {
      "tableNo":1,
      "tableName":"PO_tdm_root",
      "status":1
      },
      {
      "tableNo":2,
      "tableName":"billTo",
      "status":1
      },
      {
      "tableNo":3,
      "tableName":"items",
      "status":1
      },
      {
      "tableNo":4,
      "tableName":"shipTo",
      "status":1
      },
      {
      "tableNo":5,
      "tableName":"item",
      "status":1
      }
      ],
      "email":"abcde02@axy.com"
      }
      }

      Note: Ensure that you use the correct format for the scheduledTime parameter as specified in the payload. You can use any available online tool to convert the value to the suggested format.

  3. Run the API.
  4. Review the response body to note the submitted job ID, which is 1281 in this case. You use this job ID to know the whether publishing is successful.
  5. Get the status of the submitted job based on the job ID.

Get the Status of the Submitted Job (Publish)

After you submit the job, get its status to know whether the job is done without any issue.

  1. Access the following CA TDM Portal API:

    GET https://<server>:<host>/TDMJobService/api/ca/v1/jobs/{jobId}

    Note: For more information about this API, see the "job-engine-service-controller: Interface for requests" section at https://<server>:<port>/TDMJobService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMJobService/swagger-ui.html.

  2. Enter information in the following fields:
    • Authorization
      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • jobId
      For this example, the value is 1281.

  3. Run the API.
  4. Review the response body to know that the status of the job is shown as Completed.

You have successfully published the data. You can query the database to verify that the generated data is available in the tables (derived).

Export Data

Export the data into appropriate file formats. You can then use the exported files in your application environment to perform various test scenarios.

Note: For more information about working with the export data operation in the UI, see Perform Actions on Derived Objects in the UI section.

  1. Access the following CA TDM Portal API to export data into appropriate file formats:

    POST https://<server>:<host>/TDMModelService/api/ca/v1/objects/{objectId}/actions/export

    Note: For more information about this API, see the "object-controller: Interface for Objects" section at https://<server>:<port>/TDMModelService/swagger-ui.html. For the example in this article, the URL is https://server-po:8443/TDMModelService/swagger-ui.html

  2. Enter information in the following fields depending on your object type:
    • Authorization

      For this example, the value is as follows:

      Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlU0VSX0lEBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.7T1CyH_xQK0vQcBB7dLojUxm8ENTeRRrdOa-RQ5l4Ro

    • objectId
      For this example, the value is 2389.
    • projectId
      For this example, the value is 4945.
    • versionId
      For this example, the value is 4946.
    • async
      For this example, the value is true.
    • dataEncoding
      For this example, the value is UTF-8.
    • profileName
      For this example, the value is PO_Profile.
    • exportIntoMultipleFiles 
      For this example, the value is true.
    • baseFileName
      For this example, the value is CATDMShredder.
    • requireDataIndentation
      For this example, the value is true.
    • includeXmlDeclaration 
      For this example, the value is true.
    • includeStandaloneAttribute 
      For this example, the value is false.
    • honorUnqualifiedForms 
      For this example, the value is true.
    • updateVirtualService
      For this example, the value is false.
    • publishFiles
      For this example, the value is false.
  3. Run the API.
  4. Review the response body to find the job ID, which is 1281 in this case.
  5. Get the status of the submitted job based on the job ID as mentioned previously.
    You have successfully exported the data.

In this example, Test Data Engineers used the CA TDM Portal APIs to generate synthetic data for an application that uses a non-relational data source.

Was this helpful?

Please log in to post comments.