APIPythonOpen-Source Solutions

 View Only
  • 1.  API for Creation Algorithms

    Posted 10-01-2018 01:48:00 PM
    Hi,
    I have encountered this error when I try to provide the “fileReferenceID” to the curl “Create Algorithm” in my bash script.
    {“errorMessage”:”Input error: unable to convert input to com.dmsuite.swagger.model.Algorithm”}

    The curl in consideration is this:
    curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization:'$AUTHID -d '{"algorithmName": "Cap","algorithmType": "LOOKUP","fileReferenceID":'$IDFILE'}' 'http://'$ip_port'/masking/api/algorithms'

    I take the “fileReferenceID” from the curl “Upload File” that I perform  previously.

    Thank you,
    Regards.

    #Masking


  • 2.  RE: API for Creation Algorithms

    Posted 10-02-2018 07:03:00 AM
    Hi,

    Here is what i found on delphix doc.

    API calls involving file upload are noteworthy because the generated curl from the Masking API client will be missing the parameter referencing the file; as such, those commands from the Masking API client will not work.

    Instead, below are examples of working requests and responses for API calls involving file upload.

    https://maskingdocs.delphix.com/Delphix_Masking_APIs/Masking_Client/API_Calls_Involving_File_Upload_...">https://maskingdocs.delphix.com/Delphix_Masking_APIs/Masking_Client/API_Calls_Involving_File_Upload_and_Download/">https://maskingdocs.delphix.com/Delphix_Masking_APIs/Masking_Client/API_Calls_Involving_File_Upload_...

    Regards,

    Mouhssine




  • 3.  RE: API for Creation Algorithms

    Posted 10-02-2018 12:16:00 PM
    Hi,

    I have already seen the documentation but unfortunately I could not solve my problem.

    Any other idea to solve the problem?

    Regards,

    Alessandro.


  • 4.  RE: API for Creation Algorithms

    Posted 10-02-2018 07:38:00 PM
    Dear Alessandro,

    Thanks for your question. The elements in the JSON is case sensitive and I have noticed in your example that "fileReferenceId" is written as "fileReferenceID".

    Please try and change the element name.

    Kind regards,

    Anders



  • 5.  RE: API for Creation Algorithms

    Posted 10-03-2018 06:27:00 AM
    Dear Anders,

    Thanks for your answer, but the problem is not this.

    I have changed the element name but the same error still appears. 

    {“errorMessage”:”Input error: unable to convert input to com.dmsuite.swagger.model.Algorithm”}

    curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization:'$AUTHID -d '{"algorithmName": "Cap","algorithmType": "LOOKUP","fileReferenceId":'$IDFILE'}' 'http://'$ip_port'/masking/api/algorithms'

    Regards,

    Alessandro





  • 6.  RE: API for Creation Algorithms

    Posted 10-03-2018 01:30:00 PM
    Hi Alessandro,
    In the curl command you posted, you still have the element as "fileReferenceId":'$IDFILE' ... can you confirm that you changed the json element name to fileReferenceID. Note the capital D in fileReferenceID. I believe that is what Anders was asking you to change. It is case sensitive.

    Thanks,
    Michael


  • 7.  RE: API for Creation Algorithms

    Posted 10-03-2018 02:14:00 PM
    Hi Michael,

    In the first curl I have "fileRefenceID" but in the second curl i have "fileReferenceId".

    Anyway I tried in both cases but it doesn't work.

    Thanks,

    Alessandro


  • 8.  RE: API for Creation Algorithms

    Posted 10-03-2018 02:17:00 PM
    You're right and I had it backwards. Apologies.


  • 9.  RE: API for Creation Algorithms

    Posted 10-17-2018 07:49:00 AM
    Hi Alessandro,

    Hope all is well. I'm just following up on your enquiry. If there is still an issue, the best is to get diagnostics and to open a support case. 

    Please let me know.

    Kind regards, 

    Anders