POST api/Calendar/GetCalendar

Gets an the resource calendar entries for a given period

Exceptions

ExceptionCondition
UnauthorizedAccessException

May be thrown if you do do not have access to calendar

ArgumentNullHttpResponseException

May be thrown if you do not specify the resource id or any other required properties

ArgumentOutOfRangeHttpResponseException

May be thrown if you for example specify a period that is outside the calendar defintion, if the resource does not exists or if the resource does not have a calendar

Examples

The sample below shows the JSON payload to get calendar entries for resource hkfch@infocare.org from 1st of May 2018 to 31st of May 2018.


{
    "ResourceId": "hkfch@infocare.org",
    "From": "2018-05-1",
    "To": "2018-05-31",
    "TicketId": "8d9e7eb3-3e23-443d-bb38-ced65c88e168",
    "Culture": "no"
}
The sample below shows a small extract of the result for this call

{
    "CalendarItems": [
    {
      "AttributeName": "15eecf03-ad09-4900-897e-9a3e11a9a706",
      "AttributeAction": 0,
      "AttributeType": 14,
      "AttributeData": {
        "From": "2018-05-01T08:00:00",
        "To": "2018-05-01T16:00:00",
        "ItemType": 0,
        "Id": "15eecf03-ad09-4900-897e-9a3e11a9a706"
    }
    },
    {
      "AttributeName": "5ee5672f-9304-4016-8961-dd2beb6d7964",
      "AttributeAction": 0,
      "AttributeType": 14,
      "AttributeData": {
        "From": "2018-05-02T08:00:00",
        "To": "2018-05-02T16:00:00",
        "ItemType": 0,
        "Id": "5ee5672f-9304-4016-8961-dd2beb6d7964"
    }
  },
...
 ],
 "From": "2018-05-01T00:00:00",
 "To": "2018-05-31T00:00:00",
 "CombinedPerformanceId": "sesam10:cf50c731-e1f4-4c9a-b63f-69e682ae4b98"
}

Request Information

URI Parameters

None.

Body Parameters

Sets the period and the resource you want to get calendar information about. You should not specify the CalendarItems array when calling GetCalendar, if you do we will simply ignore it.

CalendarArgumentModel
NameDescriptionTypeAdditional information
ResourceId

Get or sets resource id, this property must be set. You must also have access to this user.

string

None.

From

Get or set from date, if not set we will use the current day

date

None.

To

Get or set the to date, if not set we will use current day pluss one month

date

None.

TicketId

Gets or sets the ticket id

string

None.

Culture

Gets or sets culture, if not specified we will use culture set on user.

string

None.

CalendarItems

Gets or sets the periods

Collection of AttributeUpdateModel

None.

Request Formats

application/json, text/json

Sample:
{
  "CalendarItems": [
    {
      "AttributeName": "sample string 1",
      "AttributeAction": 0,
      "AttributeType": 0,
      "AttributeTransaction": "sample string 2",
      "AttributeData": {}
    },
    {
      "AttributeName": "sample string 1",
      "AttributeAction": 0,
      "AttributeType": 0,
      "AttributeTransaction": "sample string 2",
      "AttributeData": {}
    }
  ],
  "ResourceId": "sample string 1",
  "From": "2026-11-11T20:26:45.0127606+01:00",
  "To": "2026-11-11T20:26:45.0127606+01:00",
  "TicketId": "sample string 2",
  "Culture": "sample string 3"
}

application/xml, text/xml

Sample:
<CalendarArgumentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">
  <Culture>sample string 3</Culture>
  <TicketId>sample string 2</TicketId>
  <CalendarItems>
    <AttributeUpdateModel>
      <AttributeAction>Add</AttributeAction>
      <AttributeData />
      <AttributeName>sample string 1</AttributeName>
      <AttributeTransaction>sample string 2</AttributeTransaction>
      <AttributeType>Field</AttributeType>
    </AttributeUpdateModel>
    <AttributeUpdateModel>
      <AttributeAction>Add</AttributeAction>
      <AttributeData />
      <AttributeName>sample string 1</AttributeName>
      <AttributeTransaction>sample string 2</AttributeTransaction>
      <AttributeType>Field</AttributeType>
    </AttributeUpdateModel>
  </CalendarItems>
  <From>2026-11-11T20:26:45.0127606+01:00</From>
  <ResourceId>sample string 1</ResourceId>
  <To>2026-11-11T20:26:45.0127606+01:00</To>
</CalendarArgumentModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CalendarArgumentModel'.

Response Information

Resource Description

Calendar information for the selected resource and period

CalendarReturnModel
NameDescriptionTypeAdditional information
From

Get or sets the from day

date

None.

To

Gets or sets the to day

date

None.

CombinedPerformanceId

Gets or sets the performance id. If performance monitoring is not turned on this property will not be present or set to null

string

Json null value handling: Ignore

CalendarItems

Gets or sets the periods

Collection of AttributeUpdateModel

None.

Response Formats

application/json, text/json

Sample:
{
  "CalendarItems": [
    {
      "AttributeName": "sample string 1",
      "AttributeAction": 0,
      "AttributeType": 0,
      "AttributeTransaction": "sample string 2",
      "AttributeData": {}
    },
    {
      "AttributeName": "sample string 1",
      "AttributeAction": 0,
      "AttributeType": 0,
      "AttributeTransaction": "sample string 2",
      "AttributeData": {}
    }
  ],
  "From": "2026-11-11T20:26:45.0127606+01:00",
  "To": "2026-11-11T20:26:45.0127606+01:00",
  "CombinedPerformanceId": "sample string 3"
}

application/xml, text/xml

Sample:
<CalendarReturnModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">
  <CombinedPerformanceId>sample string 3</CombinedPerformanceId>
  <CalendarItems>
    <AttributeUpdateModel>
      <AttributeAction>Add</AttributeAction>
      <AttributeData />
      <AttributeName>sample string 1</AttributeName>
      <AttributeTransaction>sample string 2</AttributeTransaction>
      <AttributeType>Field</AttributeType>
    </AttributeUpdateModel>
    <AttributeUpdateModel>
      <AttributeAction>Add</AttributeAction>
      <AttributeData />
      <AttributeName>sample string 1</AttributeName>
      <AttributeTransaction>sample string 2</AttributeTransaction>
      <AttributeType>Field</AttributeType>
    </AttributeUpdateModel>
  </CalendarItems>
  <From>2026-11-11T20:26:45.0127606+01:00</From>
  <To>2026-11-11T20:26:45.0127606+01:00</To>
</CalendarReturnModel>