This API will soon be deprecated. Please use another API.

    Get FREE or BUSY Information

    Gets FREE or BUSY information of users.
    It only gets FREE or BUSY information of default calendars.

    API Type

    Service API

    Request URL

    https://apis.worksmobile.com/{API ID}/calendar/getFreeBusy

    HTTP Method

    POST (Content-Type: application/json; charset=UTF-8)

    Request

    Parameter Type Required Description
    accountIdList List<String> Y User accountId list which can include up to 30 accountIds.
    iso8601DateString String Y The date for which FREE or BUSY information is to be retrieved (yyyy-MM-dd)
    freeBusyType String N Type (in uppercase)
    ● FREE: Returns free time (default).
    ● BUSY: Returns busy time.

    Request Example

    {
        "accountIdList":["user1@example.com", "user2@example.com"] ,
        "iso8601DateString" : "2017-02-14",
        "freeBusyType" : "FREE"
    }
    

    Response

    Property Type Required Description
    result String Y API call success
    returnValue List Y List of results retrieved by accountId
      accountId String Y accountId
      freeBusyMask.fbType.name String Y FBTYPE's enum name (fixed value)
      freeBusyMask.fbType.value String Y FBTYPE's enum value. FREE or BUSY
      ranges Object Y List of time ranges during which the calendar is specified as FREE or BUSY.
      ranges.from.epochSecond Long Y Start time of the FREE or BUSY period. It is shown in Unix time, and the unit is seconds.
      ranges.from.nano Long Y Start time of the FREE or BUSY period. It is shown in Unix time, and the unit is nanoseconds.
      ranges.until.epochSecond Long Y End time of the FREE or BUSY period. It is shown in Unix time, and the unit is seconds.
      ranges.until.nano Long Y End time of the FREE or BUSY period. It is shown in Unix time, and the unit is nanoseconds.
      viewRange Object Y Time ranges for which FREE or BUSY information is retrieved.
      viewRange.from.epochSecond Long Y Start time of the period for which FREE or BUSY information is retrieved. It is shown in Unix time, and the unit is seconds.
      viewRange.from.nano Long Y Start time of the period for which FREE or BUSY information is retrieved. It is shown in Unix time, and the unit is nanoseconds.
      viewRange.until.epochSecond Long Y End time of the period for which FREE or BUSY information is retrieved. It is shown in Unix time, and the unit is seconds.
      viewRange.until.nano Long Y End time of the period for which FREE or BUSY information is retrieved. It is shown in Unix time, and the unit is nanoseconds.
      exceptionMessage String N Error message shown when retrieving FREE or BUSY information failed.

    Response Example

    {
      "result": "success",
      "returnValue": [
        {
          "accountId": "test1@sample.com",
          "freeBusyMask": {
            "fbType": {
              "name": "FBTYPE",
              "value": "FREE"
            },
            "ranges": [
              {
                "from": {
                  "nano": 0,
                  "epochSecond": 1486479600
                },
                "until": {
                  "nano": 0,
                  "epochSecond": 1486566000
                }
              }
            ],
            "viewRange": {
              "from": {
                "nano": 0,
                "epochSecond": 1486479600
              },
              "until": {
                "nano": 0,
                "epochSecond": 1486566000
              }
            }
          },
          "exceptionMessage": null
        }
      ]
    }