ScheduleService Resource

Service for querying appointment schedules.

GET /schedules/{id}

Returns a schedule given its identifier.

Request Parameters
name type description constraints
id path the schedule identifier long
Response Body
media type data type description
application/json Schedule (JSON) the schedule

Example

Request
GET /schedules/{id}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "slotSize" : 12345,
  "id" : 12345,
  "name" : "..."
}
                
              

GET /schedules/{id}/appointmentTypes

Returns the appointment types associated with a schedule.

Request Parameters
name type description constraints
id path the schedule identifier long
Response Body
media type data type description
application/json array of AppointmentType (JSON) the appointment types

Example

Request
GET /schedules/{id}/appointmentTypes
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "slots" : 12345,
  "id" : 12345,
  "name" : "..."
} ]
                
              

GET /schedules/{id}/busy

Returns busy time ranges for a schedule between two dates.

Request Parameters
name type description constraints
id path the schedule identifier long
from query the start of the date range, in ISO date/time format  
slots query if true, split ranges into slots boolean
to query the end of the date range, in ISO date/time format  
Response Body
media type data type description
application/json array of Range (JSON) the busy time ranges

Example

Request
GET /schedules/{id}/busy
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "start" : "...",
  "end" : "..."
} ]
                
              

GET /schedules/{id}/free

Returns free time ranges for a schedule between two dates.

Request Parameters
name type description constraints
id path the schedule identifier long
from query the start of the date range, in ISO date/time format  
slots query if true, split ranges into slots boolean
to query the end of the date range, in ISO date/time format  
Response Body
media type data type description
application/json array of Range (JSON) the free time ranges

Example

Request
GET /schedules/{id}/free
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "start" : "...",
  "end" : "..."
} ]
                
              

GET /schedules/{id}/freebusy

Returns free and busy time ranges for a schedule between two dates.

Request Parameters
name type description constraints
id path the schedule identifier long
from query the start of the date range, in ISO date/time format  
slots query if true, split ranges into slots boolean
to query the end of the date range, in ISO date/time format  
Response Body
media type data type description
application/json FreeBusy (JSON) the free and busy time ranges

Example

Request
GET /schedules/{id}/freebusy
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "free" : [ {
    "start" : "...",
    "end" : "..."
  }, {
    "start" : "...",
    "end" : "..."
  } ],
  "busy" : [ {
    "start" : "...",
    "end" : "..."
  }, {
    "start" : "...",
    "end" : "..."
  } ]
}