Edit

Share via


Jobs - Create Item Job Instance

Called by Microsoft Fabric for starting a new job instance.
Fabric performs basic validations and calls this API to start a new instance of the job in the workload.

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}/jobTypes/{jobType}/instances/{jobInstanceId}

URI Parameters

Name In Required Type Description
itemId
path True

string

uuid

The item ID.

itemType
path True

string

The item type.

jobInstanceId
path True

string

uuid

The job instance ID.

jobType
path True

string

The job 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
invokeType True

JobInvokeType

The item job invoke type.

creationPayload

object

Creation payload specific to the workload, item and job type.

Responses

Name Type Description
202 Accepted

Successfully scheduled.

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 job instance 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/jobTypes/calculateForecast/instances/63f77191-432d-4ee6-9c5f-31a1a6987072

{
  "invokeType": "Scheduled",
  "creationPayload": {
    "priority": "low"
  }
}

Sample response

Definitions

Name Description
CreateItemJobInstanceRequest

The parameters controlling the job instance execution.

ErrorExtendedInformation

The extended error information.

ErrorResponse

The error response.

ErrorSource

The source of the error.

JobInvokeType

The job invoke type.

NameValuePair

A name-value pair.

CreateItemJobInstanceRequest

The parameters controlling the job instance execution.

Name Type Description
creationPayload

object

Creation payload specific to the workload, item and job type.

invokeType

JobInvokeType

The item job invoke type.

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

JobInvokeType

The job invoke type.

Name Type Description
Manual

string

Scheduled

string

UnknownFutureValue

string

NameValuePair

A name-value pair.

Name Type Description
name

string

The name.

value

string

The value.