Upload file-format with PowerShell

  • 0
  • 1
  • Question
  • Updated 4 weeks ago
  • Answered
Anyone having any idea, on how to use powershell to upload a format-file to delphix masking?
Photo of Torben Hansen

Torben Hansen

  • 250 Points 250 badge 2x thumb

Posted 1 month ago

  • 0
  • 1
Photo of Hims

Hims, Employee

  • 2,306 Points 2k badge 2x thumb
Official Response
Hi Torben,
Thanks for reaching out.

The PowerShell function Invoke-RestMethod (details here) will be used to call the endpoint as below
curl -X POST --header 'Content-Type: multipart/form-data' --header
'Accept: application/json' --header 'Authorization:
d1313dd8-2ed9-4699-8e88-2b6a089ae2a6' -F
fileFormat=@/path/to/file_format/delimited_format.txt -F
fileFormatType=DELIMITED 'http://<myMaskingEngine>:8282/masking/api/file-formats'
This endpoint is available from Delphix 5.3 onwards, detailed documentation is here

Thanks
Hims