Get Space List
GET /ws/rest/service/v1/space
Purpose
Get list of Space records from Unifier. This works only at project/shell level.
Request Format
All parameters must be URL encoded.
Request Parameters
The following parameters can be included in the request:
- project_number(Required): specify the project/shell number to get project/shell Space record list.
- filter_condition: Required parameter, as "space_type" (Space bp name ) is always required.
- filter_condition key definition
- "space_type" is mandatory.
- "record_fields" (optional) is list of fields, that is, DE names in Space; only those fields (along with space_sp_space_name & uuu_sp_level_picker) will be listed out in result.
- filter_criteria key Definitions
- "join": (optional) Specify if the filter condition has to be combined using OR or AND operator. Default is AND.
- "filter": A list of filter conditions where each condition will have a "field", "value" ("value2" if condition_type is range) and condition_type).
- "field": A BP form DE name for which the filter condition has to be applied.
- "value": A value for the DE to filter the data.
- "value2": A second value for the range condition. Not required to be specified for other conditions.
- filter_condition key definition
Possible Values For condition_type
The following condition-type are supported.
condition_type | Notes | Supported Data Element Types |
---|---|---|
like | For string data types. The value can contain the SQL wildcard characters when like is specified | Text ( String ) |
eq | For string, numeric and date data type. Will perform the exact match. | Text ( String ), Number, Cost, Date |
lt | For numeric values. Will perform less than value. | Number, Cost, Date |
gt | For numeric values. Will perform greater than value. | Number, Cost, Date |
lteq | For numeric values. Will perform less than or equal value. | Number, Cost, Date |
gteq | For numeric values. Will perform greater than or equal value. | Number, Cost, Date |
neq | For numeric values. Will perform not equal value. | Text ( String ), Number, Cost, Date |
range | Numeric, Date values. Will perform range search between value and value2 | Number, Cost, Date |
Note: Input Date fields should be provided in "MM-dd-yyyy HH:mm:ss" or ""MM-dd-yyyy" format in filter_criteria.
Response Format
A JSON object is returned in the following format.
{
"data": [],
"message": [],
"status": <REST status code value>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Sample Request With Query Parameters
This is an example of a request with parameters and filter conditions specified in the following format.
project_number = Building_shell_number
filter_condition = {
"space_type" : "space_bp_name",
"record_fields":"space_sp_space_name; uuu_rsv_overbook; uuu_sp_level_picker; uSiteName; uBuildingName",
"filter_criteria":{
"join":"AND",
"filter":[
{
"field":"space_sp_space_name",
"value":"Space_00%",
"condition_type":"like"
},
{
"field":"uuu_rsv_overbook",
"value":"No overbooking",
"condition_type":"eq"
}
]
}
}
Sample Success Response
This is an example of a successful response with a status code of 200.
{
"data":
[
{
"uuu_rsv_overbook":"No overbooking",
"uBuildingName":"Building_01",
"space_sp_space_name":"Space_001",
"uSiteName":"Site_01",
"uuu_sp_level_picker":"floor_01",
"uplRoomTB250":"sp_901",
"uuu_rsv_reservable":"Yes"
},
{
"uuu_rsv_overbook":"No overbooking",
"uBuildingName":"Building_01",
"space_sp_space_name":"Space_002",
"uSiteName":"Site_01",
"uuu_sp_level_picker":"floor_01",
"uplRoomTB250":"sp_901",
"uuu_rsv_reservable":"Yes"
}
],
"message": [ "success"],
"status":200
}
Related Topics
Last Published Wednesday, April 9, 2025