Delphix Products

Expand all | Collapse all

Unable to call POST /execution through API

Jump to Best Answer
  • 1.  Unable to call POST /execution through API

    Posted 07-31-2021 03:51:00 AM
    Edited by Amit Pisharody 07-31-2021 03:55:22 AM
    Hi,

    I am trying to run a file masking job through the delphix apis. I am successfully able to fire the job from the Masking API portal, but not through an ec2 linux instance. I copied the exact CURL command from the Masking API portal and tried to run it through the unix console. I've replaced the auth and url below for privacy. I am able to perform GET operations using APIs from the same ec2 linux instance.

    curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: <my auth here> ' -d '{ \
    "jobId": 50 \
    }' '<masking engine url here>/api/v5.1.7/executions'

    Getting the below error response. Our Delphix version is v6.07

    {"errorMessage":"Input error: unable to convert input to com.dmsuite.swagger.model.Execution"}[

    Wondering if anyone else ran into the same issue and was able to resolve.
    ------------------------------
    Amit P
    Delphix Community Members
    ------------------------------


  • 2.  RE: Unable to call POST /execution through API
    Best Answer

    Posted 08-02-2021 05:36:00 AM
    Looking at sample code in your post, seems double quotes is missing escape char.

    curl -X POST \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: <my auth here> ' \
    -d '{ \
    "jobId": 50 \       <<<<<<    "JobId" should be \"JobId\"
    }' '<masking engine url here>/api/v5.1.7/executions'​


    ------------------------------
    Yogesh Tiwari
    Senior Principal Technical Services
    Delphix
    ------------------------------