Muokkaa

Jaa


Item Lifecycle - Create Item

Called by Microsoft Fabric for creating a new item.
Upon item creation Fabric performs basic validations, creates the item in a provisioning state and calls this API to notify the workload. The workload is expected to perform required validations, store the item metadata, allocate required resources, and update the Fabric item metadata cache with item relations and ETag.

This API should accept SubjectAndApp authentication.

Permissions

Permissions are checked by Microsoft Fabric.

POST https://workload.contoso.com/workload-api-path-placeholder/workspaces/{workspaceId}/items/{itemType}/{itemId}

URI Parameters

Name In Required Type Description
itemId
path True

string

uuid

The item ID.

itemType
path True

string

The item type.

workspaceId
path True

string

uuid

The workspace ID.

Request Header

Name Required Type Description
ActivityId True

string

A unique ID for correlating the request with your system when a user interacts with your workload.

RequestId True

string

A globally unique ID that helps Fabric correlate your request with our logs. Provide this ID when reporting an issue.

Authorization True

string

A dual token authorization header that allows the workload to validate the request origin, provide user context, and call other services. This header has the following format: SubjectAndAppToken1.0 subjectToken="delegated token", appToken="S2S token".

x-ms-client-tenant-id True

string

The tenant ID of the client making the request.

Request Body

Name Required Type Description
displayName True

string

The item display name. Cannot exceed 256 characters.

creationPayload

object

Creation payload specific to the workload and item type. Passed by the item editor or as Fabric automation API parameter.

description

string

The item description.

Responses

Name Type Description
200 OK

Successfully created.

Other Status Codes

ErrorResponse

For error conditions the workload should return an appropriate HTTP error status code (4xx, 5xx) with detailed error information in the response body.

Examples

Create item example

Sample request

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"
  }
}

Sample response

Definitions

Name Description
CreateItemRequest

Create item request content.

ErrorExtendedInformation

The extended error information.

ErrorResponse

The error response.

ErrorSource

The source of the error.

NameValuePair

A name-value pair.

CreateItemRequest

Create item request content.

Name Type Description
creationPayload

object

Creation payload specific to the workload and item type. Passed by the item editor or as Fabric automation API parameter.

description

string

The item description.

displayName

string

The item display name. Cannot exceed 256 characters.

ErrorExtendedInformation

The extended error information.

Name Type Description
additionalParameters

NameValuePair[]

A list of additional parameters specific to the error.

errorCode

string

The error code.

message

string

The error message.

messageParameters

string[]

A list of parameters for formatting a localized message.

ErrorResponse

The error response.

Name Type Description
errorCode

string

The error code.

isPermanent

boolean

Indicates whether the error is permanent or the operation can be retried.

message

string

The error message.

messageParameters

string[]

A list of parameters for formatting a localized message.

moreDetails

ErrorExtendedInformation[]

A list of additional error details.

source

ErrorSource

The error source.

ErrorSource

The source of the error.

Name Type Description
External

string

System

string

User

string

NameValuePair

A name-value pair.

Name Type Description
name

string

The name.

value

string

The value.