Test Data Manager

 View Only

  • 1.  TDMPublisherservice

    Posted May 20, 2025 10:19 AM

    HI All,

    I am currently using TDMPUblisherservice API call.

    In that I am using an Interface to submit a publish Job.

    In the request body there a list of required field information to be populated. 

    I have CSV object registered as table, I need to generate output as a CSV file.

    What are mandatory request body information to be passed to get the status as 200.

    Kindly let me know if we have some sample request body.

    Thanks



  • 2.  RE: TDMPublisherservice

    Posted May 27, 2025 05:59 AM

    Hi Team,

    Could you please update on the above request.

    Thanks 

    Vinoth Gopi




  • 3.  RE: TDMPublisherservice

    Broadcom Employee
    Posted May 27, 2025 07:37 AM

    Hey @Vinoth Gopi

    I'm assuming you trying to use the same API as when you publish a generator and would selecr your output as a CSV file. You have to call the JobService API with a sample payload as follows:

    https://192.168.1.180:8443/TDMJobService/api/ca/v1/jobs

    {
    "name": "Publish to TRAVEL using GEN_TABLE_CIDADES",
    "description": "Publish to TRAVEL using GEN_TABLE_CIDADES",
    "projectId": 2353,
    "versionId": 2354,
    "type": "PUBLISHJOB",
    "origin": "generation",
    "scheduledTime": 1748345426252,
    "email": null,
    "jobs": [],
    "parameters": {
    "variableDefaults": [],
    "generatorId": 2362,
    "jobType": "PUBLISH",
    "title": "Publish to TRAVEL using GEN_TABLE_CIDADES",
    "publishTo": "CSV",
    "repeatCount": "1",
    "tables": [
    {
    "tableNo": 5,
    "tableName": "CITIES",
    "status": 1,
    "fileId": null
    }
    ],
    "email": null,
    "actionOnDuplicate": "exit",
    "actionOnGenDuplicate": "exit",
    "dataTargetProfile": "DataTargetProfile_TRAVEL",
    "dataSourceProfile": "DataSourceProfile_TRAVEL",
    "batchCommit": false,
    "iterationsBeforeCommit": 10000,
    "csvDelimiter": ";",
    "csvQuotationMarks": true
    }
    }
    The body could be a bit different depending on your version. This one is the latest one I have in 4.11.1007
    You should be able to identify what needs updating since the fields are self explanatory but if you need additional help, please let me know.
    Thanks,



  • 4.  RE: TDMPublisherservice

    Posted May 28, 2025 04:43 AM

    Hi Rafel,

    I tried the below modified code in my API. I am getting error.

    {
      "status": 400,
      "errorCode": "TDM_PUBLISH_MISSING_JOB_TYPE",
      "errorMsg": "Missing Job Type",
      "errorDetail": "The job type is missing from the request.",
      "timestamp": "2025-05-28T08:33+0000"
    }

    {
      "name": "string",
      "description": "string",
      "projectId": 2,
      "versionId": 2,
      "type": "PUBLISHJOB",
      "origin": "generation",
      "scheduledTime": 1748419110148,
      "email": null,
      "jobs": [],
      "parameters": {
        "variableDefaults": [],
        "generatorId": 28,
        "jobType": "PUBLISH",
        "title": "Publish to using",
        "publishTo": "CSV",
        "repeatCount": 1,
        "tables": [
          {
            "tableNo": 1,
            "tableName": "table",
            "status": 1,
            "fileId": 17
          },
          {
            "tableNo": 1,
            "tableName": "table2",
            "status": 1,
            "fileId": 17
          },
          {
            "tableNo": 1,
            "tableName": "titles",
            "status": 1,
            "fileId": 17
          }
        ],
        "email": null,
        "actionOnDuplicate": "exit",
        "actionOnGenDuplicate": "exit",
        "dataTargetProfile": "",
        "dataSourceProfile": ""
      }
    }

    Could you please help me with troubleshooting the error.




  • 5.  RE: TDMPublisherservice

    Broadcom Employee
    Posted May 28, 2025 06:29 AM

    Hey Vinoth,

    Would you mind tell me which TDM version you are using?

    Thanks,




  • 6.  RE: TDMPublisherservice

    Posted May 28, 2025 06:37 AM

    Hi Rafael,

    I am currently using version: 4.11.159.0

    Thanks 

    Vinoth Gopi




  • 7.  RE: TDMPublisherservice

    Posted May 29, 2025 12:13 PM

    Hi Rafael,

    Do we have any update.

    Thanks

    Vinoth Gopi




  • 8.  RE: TDMPublisherservice

    Broadcom Employee
    Posted May 29, 2025 12:43 PM

    Hey Vinoth,

    I'm able to run it without any issues using your body but with my generator details on my environment. I will find a machine in the same version as yours to test it out.

    How are you calling the API? A script?

    Thanks,




  • 9.  RE: TDMPublisherservice

    Posted May 30, 2025 07:33 AM

    Hi Rafael,

    I am trying this currently in the Swagger API. TDMPublsiherService request body.

    I populated the information, but I am getting that error.




  • 10.  RE: TDMPublisherservice

    Broadcom Employee
    Posted May 30, 2025 10:13 AM

    Hey Vinoth,

    I have just tried using our Swagger page and as long as I have properly authorized the swagger page and update my job name, description, projecId, versionId and GeneratorId my request goes through.

    You also need to make sure your self signed certificate (if you are using one) is trusted in the browser or the call will fail.

    If you don't mind you can paste the curl command generated by the swagger page here so we check if everything is in order?

    Thanks,