GET /ws/rest/service/v1/space
Purpose:
Get list of Space records from Unifier. This works only at project or shell .
Input:
All parameters should be URL encoded.
URL query parameter -
- 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.
URL query parameters
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"
}
]
}
}
filter_condition key definition
- "space_type" is mandatory .
- "record_fields" ( optional ) is list of fields i.e. 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": List of filter conditions. Each condition will have "field", "value" ("value2" if condition_type is range) and condition_type.
- "field": BP form DE name for which the filter condition has to be applied.
- "value": value for the DE to filter the data.
- "value2": second value for the range condition. Not required to be specified for other conditions.
Possible value for condition_type:
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.
Output:
JSON object containing 'status', 'data', 'message'
Get Space List output JSON
{
"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
}
Status codes are:
1> 200 , for success