POST api/Admin/Calendars
Creates a new Calendar.
Request Information
URI Parameters
None.
Body Parameters
CalendarRequest
CreateCalendarRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| CreatedBy |
Created by. |
string |
Max length: 255 |
| BranchId | integer |
Required |
|
| CompanyNumber | string |
Required Max length: 20 |
|
| OrganizationId |
Unique id for an company |
globally unique identifier |
Required |
| Name |
Calendar name. |
string |
Required Max length: 255 |
| TimeZone |
A valid .NET time zone. |
string |
Required Max length: 255 |
| Owner |
Specifies the owner of the calendar. |
string |
Required Max length: 255 |
Remarks
None.
Example
Creates a new calendar.
POST: http://localhost/api/calendars
Request Formats
application/json, text/json
Sample:
{
"CreatedBy": "sample string 1",
"BranchId": 2,
"CompanyNumber": "sample string 3",
"OrganizationId": "90b81849-1f02-41de-aea1-860ec5aefe1c",
"Name": "sample string 6",
"TimeZone": "sample string 7",
"Owner": "sample string 8"
}
application/xml, text/xml
Sample:
<CreateCalendarRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.Calendar.Service.DTO"> <Name>sample string 6</Name> <Owner>sample string 8</Owner> <TimeZone>sample string 7</TimeZone> <BranchId>2</BranchId> <CompanyNumber>sample string 3</CompanyNumber> <CreatedBy>sample string 1</CreatedBy> <OrganizationId>90b81849-1f02-41de-aea1-860ec5aefe1c</OrganizationId> </CreateCalendarRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Returns calendar api key and id of the created calendar.
CreateCalendarResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| CalendarId |
Id for the calendar that was created. |
integer |
None. |
| MasterKey |
Key for the calendar. The key must be used when performing operations on the calendar. |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"CalendarId": 1,
"MasterKey": "sample string 2"
}
application/xml, text/xml
Sample:
<CreateCalendarResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.Calendar.Service.DTO"> <CalendarId>1</CalendarId> <MasterKey>sample string 2</MasterKey> </CreateCalendarResponse>