Integrations REST API
Integrations REST API 是一組 API,其功能與現有 API 相同。 主要差異在於這些 REST API 的輸入是名稱
而不是傳統的 ID
。
Product Master 支援下列類型的整合 REST API。
| 要求方法 | 說明 |
|---|---|
| POST | 在型錄中新增項目。 |
| PUT | 更新型錄中的項目。 |
| 刪除 | 從型錄中刪除項目。 |
| GET | 根據型錄名稱提取所有項目。 |
| GET | 根據項目的型錄名稱和主要索引鍵來提取項目。 |
GET |
取得型錄的規格綱目。 |
POST |
將大量項目載入至佇列以匯入至型錄。 |
| 要求方法 | 說明 |
|---|---|
| PUT | 根據步驟名稱和協同作業名稱,對協同作業區域中的項目執行更新作業。 |
| POST | 根據步驟名稱和協同作業名稱,對協同作業區域步驟中的項目執行新增作業。 |
| 要求方法 | 說明 |
|---|---|
| POST | 正在新增種類。 |
| PUT | 新增或更新種類。 |
| 刪除 | 刪除種類。 |
| GET | 根據階層的名稱提取所有種類。 |
| GET | 根據種類主要索引鍵和階層名稱來提取種類。 |
| GET | 根據種類主要索引鍵和階層名稱來提取所有子種類。 |
| 要求方法 | 說明 |
|---|---|
| POST | 在參考表中新增項目。 |
| PUT | 正在更新參考表中的現有項目。 |
| 刪除 | 從參考表中刪除項目。 |
共同屬性
- 多次出現屬性: 應該在 "path" 屬性中提供完整路徑。
- 如果屬性路徑有效且不存在多次出現,則會新增多次出現的實例,並設定值。
- 如果屬性實例存在,且提供的值是 空白,則會刪除多次出現的實例。
{ "entryInfoList": [ { "primaryKey": "6001", "attributeList": [ { "path": "Producr_Hierarchy_Spec/multi#1", "value": "1th occur" }, { "path": "Product_Hierarchy_Spec/multi#2", "value": "" } ] } ] }{ "entries": [ { "primaryKey": "6000", "message": "Successfully updated [6000] category", "errors": [] } ] }
- 分組屬性:
- 如果提供了正確的完整路徑,則會更新現有的值。
- 如果屬性 "path" 不存在,但給定的路徑有效,則會新增屬性實例,並設定值。
{ "entryInfoList": [ { "primaryKey": "6001", "attributeList": [ { "path": "Product_Hierarchy_Spec/Grouping/Attri1", "value": "Grouping Attri1 value" } ] } ] }{ "entries": [ { "primaryKey": "6000", "message": "Successfully updated [6000] category", "errors": [] } ] }
- 查閱屬性: 值應該採用下列格式:<Primary key of the Lookup table entry>
{ "entryInfoList": [ { "primaryKey": "6001", "attributeList": [ { "path": "Product_Hierarchy_Spec/lookup_attr", "value": "4" } ] } ] }{ "entries": [ { "primaryKey": "6000", "message": "Successfully updated [6000] category", "errors": [] } ] }
- 鏈結屬性: 若要更新或新增鏈結屬性,請傳遞屬性的主要索引鍵。
{ "entryInfoList": [ { "primaryKey": "6001", "attributeList": [ { "path": "Sample_Hierarchy_Spec/linkedAttr", "value": "2" } ] } ] }{ "entries": [ { "primaryKey": "6000", "message": "Successfully updated [6000] category", "errors": [] } ] }
- 日期屬性: 值應該採用下列格式。yyyy-MM-dd HH:mm:ss
{ "entryInfoList": [ { "primaryKey": "6001", "attributeList": [ { "path": "Sample_Hierarchy_Spec/Date", "value": "2020-10-28 12:00:00" } ] } ] }{ "entries": [ { "primaryKey": "6000", "message": "Successfully updated [6000] category", "errors": [] } ] }
- 關係屬性: 值應該採用下列格式。<Catalog name>\u003E\u003E >> <Primary Key of the related Item>
{ "entryInfoList": [ { "primaryKey": "6001", "attributeList": [ { "path": "Product_Hierarchy_Spec/RelationShipAttr", "value": "Product Catalog>>1" } ] } ] }{ "entries": [ { "primaryKey": "6000", "message": "Successfully updated [6000] category", "errors": [] } ] }
如需 REST API 的詳細資訊,請參閱 IBM Product Master 整合 REST API Swagger 檔案。
GET