Repository navigation
Calendar
from xurrent import Calendar · module xurrent.calendars · API resource /calendars · Xurrent API docs
Business hours (calendar hours per weekday) and holidays that define when service hours, support hours and SLA clocks run.
The named arguments of the constructor. Every other field of the API response is set as an attribute as well.
| Field | Type | Default | Converted to |
|---|---|---|---|
id |
int |
||
name |
Optional[str] |
None |
|
disabled |
Optional[bool] |
None |
Calendar.get_by_id(connection_object: XurrentApiHelper, id: int) -> TAPI: GET /calendars/{id}
Calendar.get_calendars(connection_object: XurrentApiHelper, predefinedFilter: CalendarPredefinedFilter = None, queryfilter: dict = None) -> List[T]API: GET /calendars · Enums: CalendarPredefinedFilter
Calendar.create(connection_object: XurrentApiHelper, data: dict) -> TAPI: POST /calendars
calendar.ref_str() -> strcalendar.update(data: dict) -> TAPI: PATCH /calendars/{id}
calendar.enable() -> Tcalendar.disable() -> Tcalendar.get_duration(start: str, end: str, time_zone: str = None) -> dictCalculate the duration between two timestamps according to the calendar.
-
start: Start datetime string (ISO 8601) -
end: End datetime string (ISO 8601) -
time_zone: Optional time zone name - Returns: Duration data from the API
API: GET /calendars/{id}/duration
calendar.get_hours() -> List[dict]Retrieve the calendar hours (weekday, time_from, time_until) of the calendar.
API: GET /calendars/{id}/calendar_hours
calendar.get_holidays() -> ListRetrieve the holidays associated with this calendar.
API: GET /calendars/{id}/holidays · Uses: Holiday
Used by: Calendar.get_calendars
| Value | Description |
|---|---|
enabled |
|
disabled |
Uses:
-
Holiday:
get_holidays()
Used by:
-
Holiday:
get_calendars() -
RequestTemplate:
support_hours -
ShopArticle:
calendar
- XurrentApiHelper
- Calendar
- ClosureCode
- ConfigurationItem
- Contract
- CustomCollection
- CustomCollectionElement
- EffortClass
- Holiday
- KnowledgeArticle
- Organization
- OutOfOfficePeriod
- Person
- Problem
- Product
- ProductCategory
- Project
- ProjectTask
- Release
- Request
- RequestTemplate
- Risk
- Service
- ServiceInstance
- ServiceOffering
- ShopArticle
- ShopArticleCategory
- ShopOrderLine
- Site
- SkillPool
- Task
- Team
- TimeAllocation
- UiExtension
- Workflow
- WorkflowTemplate