Job Scheduler - Create Item Schedule
Create a new schedule for an item.
Required Delegated Scopes:
Item.Execute.All and Item.ReadWrite.All
Microsoft Entra supported identities
This API supports the Microsoft identities listed in this section.
Identity | Support |
---|---|
User | Yes |
Service principal and Managed identities | No |
Interface
POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/jobs/{jobType}/schedules
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
item
|
path | True |
string uuid |
The item ID. |
job
|
path | True |
string |
The job type. |
workspace
|
path | True |
string uuid |
The workspace ID. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
configuration | True | ScheduleConfig: |
The actual data contains the time/weekdays of this schedule. |
enabled | True |
boolean |
Whether this schedule is enabled. True - Enabled, False - Disabled. |
Responses
Name | Type | Description |
---|---|---|
201 Created |
Successfully create the schedule. Headers Location: string |
|
Other Status Codes |
Common error codes:
|
Examples
create item schedule example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/4b218778-e7a5-4d73-8187-f10824047715/items/cfafbeb1-8037-4d0c-896e-a46fb27ff229/jobs/DefaultJob/schedules
{
"enabled": true,
"configuration": {
"startDateTime": "2024-04-28T00:00:00",
"endDateTime": "2024-04-30T23:59:00",
"localTimeZoneId": "Central Standard Time",
"type": "Cron",
"interval": 10
}
}
Sample response
Location: https://api.fabric.microsoft.com/v1/workspaces/4b218778-e7a5-4d73-8187-f10824047715/items/cfafbeb1-8037-4d0c-896e-a46fb27ff229/jobs/DefaultJob/schedules/235faf08-6ca0-488d-a2ca-6d706d530ebc
{
"id": "235faf08-6ca0-488d-a2ca-6d706d530ebc",
"enabled": true,
"createdDateTime": "2024-04-28T05:35:20.5366667",
"configuration": {
"startDateTime": "2024-04-28T00:00:00",
"endDateTime": "2024-04-30T23:59:00",
"localTimeZoneId": "Central Standard Time",
"type": "Cron",
"interval": 10
},
"owner": {
"id": "8eedb1b0-3af8-4b17-8e7e-663e61e12211",
"type": "User"
}
}
Definitions
Name | Description |
---|---|
Create |
Create item schedule plan request payload. |
Cron |
|
Daily |
|
Day |
A list of weekdays, at most seven elements are allowed. |
Error |
The error related resource details object. |
Error |
The error response. |
Error |
The error response details. |
Group |
Group specific details. Applicable when the principal type is |
Group |
The type of the group. Additional group types may be added over time. |
Item |
Item schedule. |
Principal |
Represents an identity or a Microsoft Entra group. |
Principal |
The type of the principal. Additional principal types may be added over time. |
Service |
Service principal specific details. Applicable when the principal type is |
Service |
Service principal profile details. Applicable when the principal type is |
User |
User principal specific details. Applicable when the principal type is |
Weekly |
CreateScheduleRequest
Create item schedule plan request payload.
Name | Type | Description |
---|---|---|
configuration | ScheduleConfig: |
The actual data contains the time/weekdays of this schedule. |
enabled |
boolean |
Whether this schedule is enabled. True - Enabled, False - Disabled. |
CronScheduleConfig
Name | Type | Description |
---|---|---|
endDateTime |
string |
The end time for this schedule. The end time must be later than the start time. |
interval |
integer |
The time interval in minutes. A number between 1 and 5270400 (10 years). |
localTimeZoneId |
string |
The time zone identifier registry on local computer for windows, see Default Time Zones |
startDateTime |
string |
The start time for this schedule. If the start time is in the past, it will trigger a job instantly. |
type |
string:
Cron |
A string represents the type of the plan. Additional planType types may be added over time. |
DailyScheduleConfig
Name | Type | Description |
---|---|---|
endDateTime |
string |
The end time for this schedule. The end time must be later than the start time. |
localTimeZoneId |
string |
The time zone identifier registry on local computer for windows, see Default Time Zones |
startDateTime |
string |
The start time for this schedule. If the start time is in the past, it will trigger a job instantly. |
times |
string[] |
A list of time slots in hh:mm format, at most 100 elements are allowed. |
type |
string:
Daily |
A string represents the type of the plan. Additional planType types may be added over time. |
DayOfWeek
A list of weekdays, at most seven elements are allowed.
Name | Type | Description |
---|---|---|
Friday |
string |
Friday |
Monday |
string |
Monday |
Saturday |
string |
Saturday |
Sunday |
string |
Sunday |
Thursday |
string |
Thursday |
Tuesday |
string |
Tuesday |
Wednesday |
string |
Wednesday |
ErrorRelatedResource
The error related resource details object.
Name | Type | Description |
---|---|---|
resourceId |
string |
The resource ID that's involved in the error. |
resourceType |
string |
The type of the resource that's involved in the error. |
ErrorResponse
The error response.
Name | Type | Description |
---|---|---|
errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
message |
string |
A human readable representation of the error. |
moreDetails |
List of additional error details. |
|
relatedResource |
The error related resource details. |
|
requestId |
string |
ID of the request associated with the error. |
ErrorResponseDetails
The error response details.
Name | Type | Description |
---|---|---|
errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
message |
string |
A human readable representation of the error. |
relatedResource |
The error related resource details. |
GroupDetails
Group specific details. Applicable when the principal type is Group
.
Name | Type | Description |
---|---|---|
groupType |
The type of the group. Additional group types may be added over time. |
GroupType
The type of the group. Additional group types may be added over time.
Name | Type | Description |
---|---|---|
DistributionList |
string |
Principal is a distribution list. |
SecurityGroup |
string |
Principal is a security group. |
Unknown |
string |
Principal group type is unknown. |
ItemSchedule
Item schedule.
Name | Type | Description |
---|---|---|
configuration | ScheduleConfig: |
The actual data contains the time/weekdays of this schedule. |
createdDateTime |
string |
The created time stamp of this schedule in Utc. |
enabled |
boolean |
Whether this schedule is enabled. True - Enabled, False - Disabled. |
id |
string |
The schedule ID. |
owner |
The user identity that created this schedule or last modified. |
Principal
Represents an identity or a Microsoft Entra group.
Name | Type | Description |
---|---|---|
displayName |
string |
The principal's display name. |
groupDetails |
Group specific details. Applicable when the principal type is |
|
id |
string |
The principal's ID. |
servicePrincipalDetails |
Service principal specific details. Applicable when the principal type is |
|
servicePrincipalProfileDetails |
Service principal profile details. Applicable when the principal type is |
|
type |
The type of the principal. Additional principal types may be added over time. |
|
userDetails |
User principal specific details. Applicable when the principal type is |
PrincipalType
The type of the principal. Additional principal types may be added over time.
Name | Type | Description |
---|---|---|
Group |
string |
Principal is a security group. |
ServicePrincipal |
string |
Principal is a Microsoft Entra service principal. |
ServicePrincipalProfile |
string |
Principal is a service principal profile. |
User |
string |
Principal is a Microsoft Entra user principal. |
ServicePrincipalDetails
Service principal specific details. Applicable when the principal type is ServicePrincipal
.
Name | Type | Description |
---|---|---|
aadAppId |
string |
The service principal's Microsoft Entra AppId. |
ServicePrincipalProfileDetails
Service principal profile details. Applicable when the principal type is ServicePrincipalProfile
.
Name | Type | Description |
---|---|---|
parentPrincipal |
The service principal profile's parent principal. |
UserDetails
User principal specific details. Applicable when the principal type is User
.
Name | Type | Description |
---|---|---|
userPrincipalName |
string |
The user principal name. |
WeeklyScheduleConfig
Name | Type | Description |
---|---|---|
endDateTime |
string |
The end time for this schedule. The end time must be later than the start time. |
localTimeZoneId |
string |
The time zone identifier registry on local computer for windows, see Default Time Zones |
startDateTime |
string |
The start time for this schedule. If the start time is in the past, it will trigger a job instantly. |
times |
string[] |
A list of time slots in hh:mm format, at most 100 elements are allowed. |
type |
string:
Weekly |
A string represents the type of the plan. Additional planType types may be added over time. |
weekdays |
A list of weekdays, at most seven elements are allowed. |