View a Calendar by Code
get
/primeapi/restapi/calendar/workspace/{workspaceId}/code/{code}
This endpoint returns calendars that meet the following requirements:
- The object has a code that matches the value of the {code} path parameter.
Request
Path Parameters
-
code: string
The user-specified identifier of a calendar.
-
workspaceId: integer(int64)
The system-generated identifier of a workspace.
Response
Supported Media Types
- application/json
200 Response
successful operation
Root Schema : ApiEntityCalendar
Type:
Show Source
object
-
calendarCode(optional):
string
The unique code for the calendar.
-
calendarExceptions(optional):
array calendarExceptions
Unique Items Required:
true
-
calendarId(optional):
integer(int64)
The unique identifier for the calendar.
-
calendarName(optional):
string
The name of the calendar.
-
dayHourCount(optional):
number(double)
The number of hours in a day.
-
holiday(optional):
integer(int64)
The holiday list assigned to the calendar.
-
holidayMoveType(optional):
string
Allowed Values:
[ "NONE", "FORWARD", "BACKWARD", "CLOSEST_WORK_DAY" ]
Specifies a holiday within calendar work time. -
isAssignableToProject(optional):
boolean
Indicates whether or not the calendar can be assigned to a project.
-
isAssignableToResource(optional):
boolean
Indicates whether or not the calendar can be assigned to a resource.
-
link(optional):
string(url)
Read Only:
true
-
monthHourCount(optional):
number(double)
The number of hours in a month.
-
pushDownType(optional):
string
Allowed Values:
[ "MANUAL", "AUTOMATIC" ]
Specifies how a workspace calendar is shared across child workspaces. -
updateDate(optional):
string(date-time)
Read Only:
true
Date when the record was last updated. Used for viewing and filtering records, obtained ONLY from GET calls, modified on and after a particular date. Not a part of POST response. -
weekHourCount(optional):
number(double)
The number of hours in a week.
-
workspaceId(optional):
integer(int64)
The unique identifier for the workspace for which the calendar belongs.
-
workTimeFriday(optional):
string
Friday.
-
workTimeMonday(optional):
string
Monday.
-
workTimeSaturday(optional):
string
Saturday.
-
workTimeSunday(optional):
string
Sunday.
-
workTimeThursday(optional):
string
Thursday.
-
workTimeTuesday(optional):
string
Tuesday.
-
workTimeWednesday(optional):
string
Wednesday.
-
yearHourCount(optional):
number(double)
The number of hours in a year.
Nested Schema : ApiEntityCalendarException
Type:
Show Source
object
-
calendarExceptionId(optional):
integer(int64)
The unique identifier for the calendar exception.
-
calendarId(optional):
integer(int64)
The unique identifier for the calendar.
-
exceptionDate(optional):
string(date-time)
The date that is marked as an exception. An exception is a change to the regularly scheduled time in the calendar.
-
exceptionName(optional):
string
The name of the exception for the calendar.
-
link(optional):
string(url)
Read Only:
true
-
updateDate(optional):
string(date-time)
Read Only:
true
Date when the record was last updated. Used for viewing and filtering records, obtained ONLY from GET calls, modified on and after a particular date. Not a part of POST response. -
workTime(optional):
string
Work time that is non-standard.
404 Response
The requested calendar does not exist, or you do not have access to it.