Item Lifecycle - Create Item
由 Microsoft Fabric 呼叫以建立新專案。
建立專案網狀架構時會執行基本身份驗證,以布建狀態建立專案,並呼叫此 API 以通知工作負載。 工作負載預期會執行必要的驗證、儲存專案元數據、配置必要資源,以及使用專案關聯和ETag更新 Fabric 專案元數據快取。
此 API 應該接受 SubjectAndApp 驗證。
權限
Microsoft Fabric 會檢查許可權。
POST https://workload.contoso.com/workload-api-path-placeholder/workspaces/{workspaceId}/items/{itemType}/{itemId}
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
item
|
path | True |
string uuid |
項目標識碼。 |
item
|
path | True |
string |
項目類型。 |
workspace
|
path | True |
string uuid |
工作區標識碼。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
ActivityId | True |
string |
當使用者與工作負載互動時,用來將要求與您的系統相互關聯的唯一標識符。 |
RequestId | True |
string |
全域唯一標識碼,可協助網狀架構將您的要求與我們的記錄相互關聯。 回報問題時,請提供此標識符。 |
Authorization | True |
string |
雙重令牌授權標頭,可讓工作負載驗證要求來源、提供用戶內容,以及呼叫其他服務。 此標頭格式如下: |
x-ms-client-tenant-id | True |
string |
發出要求之用戶端的租用戶標識碼。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
displayName | True |
string |
項目顯示名稱。 不能超過 256 個字元。 |
creationPayload |
object |
建立工作負載和項目類型特有的承載。 由專案編輯器或作為網狀架構自動化 API 參數傳遞。 |
|
description |
string |
專案描述。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
已成功建立。 |
|
Other Status Codes |
針對錯誤狀況,工作負載應該傳回適當的 HTTP 錯誤狀態代碼 (4xx, 5xx),並在回應本文中提供詳細的錯誤資訊。 |
範例
Create item example
範例要求
POST https://workload.contoso.com/workload-api-path-placeholder/workspaces/e5ef604d-e14f-4a59-9133-75d5a0cb9334/items/Contoso.FinanceAnalytics.Forecast/b14cb7e7-d346-4751-9cfd-8c2767d53111
{
"displayName": "Forecast 1",
"description": "The 1st forecast item",
"creationPayload": {
"algorithm": "ExponentialSmoothing"
}
}
範例回覆
定義
名稱 | Description |
---|---|
Create |
建立專案要求內容。 |
Error |
擴充的錯誤資訊。 |
Error |
錯誤回應。 |
Error |
錯誤的來源。 |
Name |
名稱/值組。 |
CreateItemRequest
建立專案要求內容。
名稱 | 類型 | Description |
---|---|---|
creationPayload |
object |
建立工作負載和項目類型特有的承載。 由專案編輯器或作為網狀架構自動化 API 參數傳遞。 |
description |
string |
專案描述。 |
displayName |
string |
項目顯示名稱。 不能超過 256 個字元。 |
ErrorExtendedInformation
擴充的錯誤資訊。
名稱 | 類型 | Description |
---|---|---|
additionalParameters |
錯誤特有的其他參數清單。 |
|
errorCode |
string |
錯誤碼。 |
message |
string |
錯誤訊息。 |
messageParameters |
string[] |
格式化當地語系化訊息的參數清單。 |
ErrorResponse
錯誤回應。
名稱 | 類型 | Description |
---|---|---|
errorCode |
string |
錯誤碼。 |
isPermanent |
boolean |
指出錯誤是永久性的,還是可以重試作業。 |
message |
string |
錯誤訊息。 |
messageParameters |
string[] |
格式化當地語系化訊息的參數清單。 |
moreDetails |
其他錯誤詳細數據的清單。 |
|
source |
錯誤來源。 |
ErrorSource
錯誤的來源。
值 | Description |
---|---|
External | |
System | |
User |
NameValuePair
名稱/值組。
名稱 | 類型 | Description |
---|---|---|
name |
string |
名稱。 |
value |
string |
值。 |