orchestrator
latest
false
Orchestrator API 指南
Last updated 2024年10月23日
日历请求
以下对
/odata/Calendars
端点的 GET 请求根据其 Name
检索特定日历。
获取
https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/Calendars?$filter=Name%20eq%20'BankHoliday'
{
"@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Calendars",
"value": [
{
"TimeZoneId": null,
"ExcludedDates": [],
"Name": "BankHoliday",
"Id": 18845
}
]
}
{
"@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Calendars",
"value": [
{
"TimeZoneId": null,
"ExcludedDates": [],
"Name": "BankHoliday",
"Id": 18845
}
]
}
通过以下对
/odata/Calendars
端点的 POST 请求,您可以创建具有排除日期的新日历。
注意: 系统会自动生成
Id
参数。 使用租户的时区填充 TimeZoneId
参数。
发布
https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/Calendars
{
"Name": "VacationCal",
"TimeZoneId": "string",
"ExcludedDates": [
"2019-11-12T14:31:44.778Z"
]
}
{
"Name": "VacationCal",
"TimeZoneId": "string",
"ExcludedDates": [
"2019-11-12T14:31:44.778Z"
]
}
{
"@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Calendars/$entity",
"TimeZoneId": "GTB Standard Time",
"ExcludedDates": [
"2019-11-12T00:00:00Z"
],
"Name": "VacationCal",
"Id": 32718
}
{
"@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Calendars/$entity",
"TimeZoneId": "GTB Standard Time",
"ExcludedDates": [
"2019-11-12T00:00:00Z"
],
"Name": "VacationCal",
"Id": 32718
}
GET
/odata/Calendars({calendar_id_value})
端点检索指定日历的排除日期。
使用日历
Id
指定要从中检索排除日期的日历。
要查找租户中现有日历的
Id
,请先向 /odata/Calendars
端点发出 GET 请求。
确定所需的日历并复制响应正文中的
Id
值。
获取
https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/Calendars
{
"@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Calendars",
"value": [
{
"TimeZoneId": null,
"ExcludedDates": [],
"Name": "November_excluded_dates",
"Id": 1461
}
]
}
{
"@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Calendars",
"value": [
{
"TimeZoneId": null,
"ExcludedDates": [],
"Name": "November_excluded_dates",
"Id": 1461
}
]
}
要查看排除的日期,请向
/odata/Calendars({calendar_id_value})
发出 GET 请求。
将
{calendar_id_value}
替换为先前复制的 Id
值。
响应正文将返回指定日历中已排除的所有日期。
例如,对于 ID 值为
1461
的日历,请求如下所示:
获取
https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/Calendars(1461)
{
"@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Calendars/$entity",
"TimeZoneId": "UTC",
"ExcludedDates": [
"2021-11-01T00:00:00Z",
"2021-11-04T00:00:00Z",
"2021-11-08T00:00:00Z",
"2021-11-11T00:00:00Z",
"2021-11-15T00:00:00Z",
"2021-11-18T00:00:00Z",
"2021-11-22T00:00:00Z",
"2021-11-25T00:00:00Z"
],
"Name": "November_excluded_dates",
"Id": 1461
}
{
"@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Calendars/$entity",
"TimeZoneId": "UTC",
"ExcludedDates": [
"2021-11-01T00:00:00Z",
"2021-11-04T00:00:00Z",
"2021-11-08T00:00:00Z",
"2021-11-11T00:00:00Z",
"2021-11-15T00:00:00Z",
"2021-11-18T00:00:00Z",
"2021-11-22T00:00:00Z",
"2021-11-25T00:00:00Z"
],
"Name": "November_excluded_dates",
"Id": 1461
}