TDMGeneratorService API requires table ID when adding data generation rules for nested JSON objects
search cancel

TDMGeneratorService API requires table ID when adding data generation rules for nested JSON objects

book

Article ID: 368835

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

When using the TDMGeneratorService API to add data generation rules for a nested JSON file, that we have registered, we found that we must provide a different table ID for each of the JSON segments when adding a new data generation rule. Is there a way to provide a single ID, perhaps a file ID, that would add the rules globally for each of the JSON segments?

The API call we are using is:

TDMGeneratorService/api/ca/v1/generators/{generatorId}/tables/{tableId}/definitionRows

Environment

TDM Portal - all supported releases

Resolution

When working with a nested JSON files, TDM shreds the JSON file into tables, which gets stored in a relational database when the objects are registered with the project/project version. Each table is assigned a unique table ID. This is why you must use a different table ID, when posting data generation rules for each of the tables. 

Additional Information