Jump to: navigation, search

Modify Calendar

Method

PUT

Syntax

 
/grs/v1/tenant/{tenantId}/package/{packageId}/calendar/{calendarId}

Request Body

 
{
"weekStarts": 4,
"weekEnds": 5,
"dayStartsHour": 14,
"dayEndsMin": 30,
}

Response Body

 
{
"calendarId": "Calendar_117",
"name": "Dad's Dating Calendar",
"locked": false,
"lockOwner": null,
"weekStarts": 4,
"weekEnds": 5,
"dayStartsHour": 14,
"dayStartsMin": 30,
"dayEndsHour": 23,
"dayEndsMin": 30,
"timeZoneId": "EST"
}

HTTP Status Codes

  • 201 Created—Response body provided
  • 401 Unauthorized—APIToken not valid
  • 403 Forbidden—User does not have permission for the specified tenant, or does not have proper permission to perform this operation.
  • 412 Precondition Failed—Calendar was not locked first
  • 422 - Unprocessable Entity—Field Validation Error
 
{
  "message": "Validation Failed",
  "errors": [
    {
       "code" : "1000",
       "field" : "weekStarts",
       "message": "weekStarts is invalid. Must be between 1 and 7."
    },
    {
       "code" : "1001",
       "field" : "weekEnds",
       "message": "weekEnds is invalid. Must be between 1 and 7."
    },
    {
       "code" : "1002",
       "field" : "dayStartsHour",
       "message": "dayStartsHour is invalid. Must be between 0 and 23."
    },
    {
       "code" : "1003",
       "field" : "dayEndsHour",
       "message": "dayEndsHour is invalid. Must be between 0 and 23."
    },
   {
       "code" : "1004",
       "field" : "dayStartsMin",
       "message": "dayStartsMin is invalid. Must be between 0 and 59."
    },
   {
       "code" : "1005",
       "field" : "dayEndsMin",
       "message": "dayEndsMin is invalid. Must be between 0 and 59."
    },
 {
       "code" : "1006",
       "field" : "timeZoneID",
       "message": "Unrecognized time zone ID."
    }
  ]
}
  • 503—Service Unavailable

Notes

User must have CALENDAR_MODIFY permission. User must have LOCK. The following fields can be updated on a calendar (any other fields passed in will be ignored):

  • name
  • weekStarts
  • weekEnds
  • dayStartsHour
  • dayStartsMin
  • dayEndsHour
  • dayEndsMin
  • timeZoneId

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 16 May 2017, at 01:20.