Get booking statuses
get
/rest/ofscCapacity/v1/bookingStatuses
This operation retrieves a collection of booking statuses for the specified dates and capacity areas.
Request
Query Parameters
-
areas: array[string]
Collection Format:
csvThe label of the capacity area. -
dates(required): string
The dates for which the booking statuses must be retrieved. The date is specified in YYYY-MM-DD format.
Response
Supported Media Types
- application/schema+json
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : Booking Status List
Type:
objectTitle:
Booking Status ListThe collection of booking statuses.
Show Source
-
items:
array Items
Title:
ItemsThe list of booking statuses.
Nested Schema : Items
Type:
arrayTitle:
ItemsThe list of booking statuses.
Show Source
-
Array of:
object Booking Status
Title:
Booking StatusAn array of booking statuses.
Nested Schema : Booking Status
Type:
objectTitle:
Booking StatusAn array of booking statuses.
Show Source
-
area:
string
Title:
AreaMinimum Length:1Maximum Length:40The label of the capacity area specified in the request. -
date:
string(date)
Title:
DateThe date specified in the request.Example:2016-07-22 -
statuses:
array Statuses
Title:
StatusesThe list of statuses.
Nested Schema : items
Type:
Show Source
object-
bookingStatus:
object Booking Status
Title:
Booking StatusThe booking status of an item. -
category:
string
Title:
CategoryThe label of the capacity category. -
timeFrom:
string
Title:
Time FromThe start time in HH:MM format from where the booking should be closed. By default, start time of the day. -
timeTo:
string
Title:
Time ToThe end time in HH:MM format until where the booking should be closed. By default, end time of the day. -
workZone:
string
Title:
Work ZoneThe label of the work zone.
Nested Schema : Booking Status
Type:
objectTitle:
Booking StatusThe booking status of an item.
Show Source
-
closedAt:
string
Title:
Closed AtThe date and time when the booking was closed (manually or by a closing condition). -
scheduledCloseTime:
string
Title:
Scheduled Close TimeThe scheduled date and time when the booking closes. For example, 2016-10-30 11:00:00. -
state:
string
Title:
StateAllowed Values:[ "open", "closed" ]The state of the booking status.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to get the booking statuses by submitting a GET request on the REST resource.
Example of Request Header
The following shows an example of the request header.
GET /rest/ofscCapacity/v1/bookingStatuses?dates=2017-08-23&areas=CapacityArea Connection: close Accept-Encoding: gzip,deflate Authorization: Basic bXlyb290QHFhNTUwMzox Host: <instance_name>.fs.ocs.oraclecloud.com User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx Date: Wed, 23 Aug 2017 12:51:13 GMT Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Access-Control-Allow-Credentials: true Strict-Transport-Security: max-age=31536000; includeSubDomains;
Example of Response Body
The following example shows the contents of the response body in JSON format.
{"items": [{
"date": "2017-08-23",
"area": "CapacityArea",
"statuses": [
{"bookingStatus": {"state": "open"}},
{
"category": "IN",
"bookingStatus": {"state": "open"}
},
{
"category": "TC",
"bookingStatus": {
"state": "closed",
"closedAt": "2017-08-23 09:00:47"
}
},
{
"category": "DI",
"bookingStatus": {
"state": "closed",
"closedAt": "2017-08-16 05:29:01"
}
},
{
"bookingStatus": {"state": "open"},
"timeFrom": "12:00",
"timeTo": "18:00"
},
{
"bookingStatus": {"state": "open"},
"timeFrom": "08:00",
"timeTo": "12:00"
},
{
"category": "IN",
"bookingStatus": {"state": "open"},
"timeFrom": "12:00",
"timeTo": "18:00"
},
{
"category": "IN",
"bookingStatus": {"state": "open"},
"timeFrom": "08:00",
"timeTo": "12:00"
},
{
"category": "TC",
"bookingStatus": {"state": "open"},
"timeFrom": "12:00",
"timeTo": "18:00"
},
{
"category": "TC",
"bookingStatus": {"state": "open"},
"timeFrom": "08:00",
"timeTo": "12:00"
},
{
"category": "DI",
"bookingStatus": {"state": "open"},
"timeFrom": "12:00",
"timeTo": "18:00"
},
{
"category": "DI",
"bookingStatus": {"state": "open"},
"timeFrom": "08:00",
"timeTo": "12:00"
}
]
}]}