将 informatica 文档翻译成 REST API 调用 (Postman)

Translate informatica Documentation into REST API Call (Postman)

我正在努力将数据导入 Informatica Reference360 并努力解释文档以在 POSTMAN 中构建 API 调用。

这是他们给出的例子

POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/import HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=import-code-values.csv


--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=importSettings
Content-Type: application/json;charset=UTF-8

{ 
  "delimiter":"COMMA",
  "textQualifier":"DOUBLE_QUOTE",
  "codepage":"UTF8",
  "dateFormat":"ISO",
  "containerType":"CODELIST",
  "containerId":"9ab3201990a54dcdc86f54cf",
  "startingRow":null
}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--

不明白的部分:

  1. 这是做什么用的:boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm。我也应该把它放在 header 中吗?
  2. 这是什么以及我应该在哪里使用它(这两种选择是否应该只使用一种)?
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=import-code-values.csv

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=importSettings
Content-Type: application/json;charset=UTF-8

...

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--

  1. 我应该如何传递要导入的实际文件,它应该在 body (form-data) 中吗?
  2. 如果是,API 负载的哪些部分应该是原始的,哪些部分应该是 form-data?

文档link

基本上,您的 POST 请求需要 2 个部分:

1.Upload 文件 csv

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=import-code-values.csv

2.Json 对象

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=importSettings
Content-Type: application/json;charset=UTF-8

你可以在这里查看类似的问题:

回答我自己的问题:

what is this for: boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm.Should I put it in header as well?

  • 这是由邮递员
  • 在header中自动生成的

What is this and where should I use it (are these two alternatives and only one should be used)?

  • 他们都应该

If so which parts of the API payload should be in raw and which in form-data?

  • 所有内容都应输入 body - 表单数据