/locations/buildings
This endpoint allows you to list all Locations of type building.
The query parameters described below are to be used with the JQL.
getLocationsBuildings
| Name | Type | Description |
|---|---|---|
filter[client_id]
|
integer |
Filter buildings by client ID. Only returns buildings that belong to the specified client. |
with_assets_count
|
boolean |
Include cumulative assets count for each location (includes all descendant locations) |
sort
|
string |
Sorts the results by the specified field and direction. The format is `{field}{direction}` where direction is `+` for ascending and `-` for descending. If no direction symbol is provided, ascending order is used by default. Example: |
data
array<object>
id
string
required
read-only
ID of the Location
type
string
required
read-only
Model type
building
attributes
object
required
local_id
integer
ID of the Local of type Building
Example: 1
name
string
required
Location name
Example: Building Name
full_name
string
required
read-only
Names of the location's parents concatenated by hyphen with location name.
Example: Building Full Name
code
string
required
Location code.
Example: B1
full_code
string
required
read-only
Codes of the location's parents concatenated by dot with location code.
Example: B1
original_full_code
string | null
read-only
Location original full code.
observation
string | null
required
Additional information
Example: This is a observation
entity_id
integer
ID of the Entity
date_updated
string (date-time) | null
required
read-only
Example: 2020-12-03 12:45:00
has_children
boolean
required
read-only
Indicates whether the location has other locations below it or not.
Example: 1
client_id
integer
required
ID of the associated client.
Example: 1
local_uuid
string (uuid)
UUID of the Local of type Building
Example: aaaaaaa-0000-1111-bbbbbbb
is_from_network
boolean
read-only
If Building is from network
Example:
assets_count
integer | null
read-only
Cumulative count of assets in this building (including all nested locations). Only returned when `with_assets_count=true` query parameter is provided.
Example: 5
matched
boolean
read-only
Indicates whether this building is matched.
Example:
relationships
object
files
object
data
array<object>
type
string
read-only
file
id
string
read-only
operators
object
data
array<object>
type
string
read-only
operator
id
string
read-only
included
array<union>
List of relationships to be included
id
string
read-only
ID of the Operator
type
string
read-only
Model type
operator
attributes
object
operator_id
integer
read-only
ID of the Operator
operator_uuid
string (uuid)
read-only
Uuid of the Operator
full_name
string
email
string (email)
phone
string | null
cellphone
string | null
account
string
Type of account which determines the access permission level.
admin
manager
technician
operator
reporter
language
string
ar
ca
da_dk
en
es
fr_fr
pl_pl
pt_br
pt_pt
ko
zh_cn
nl_nl
de_de
cost_per_hour
number
Example: 10
warehouse_id
integer
ID of the warehouse associated to the Operator by default.
entity_id
integer
read-only
timezone
string
Valid PHP timezone identifier. See the full list here: https://www.php.net/manual/en/timezones.php.
Example: Europe/Lisbon
is_from_network
boolean
created_at
string (date-time)
phone_country_code
string
Example: US
is_first_web_login
boolean | null
read-only
status
string
WORKING
AVAILABLE
OFFLINE
Example: WORKING
meta
object
custom_fields
object | null
id
string
required
read-only
ID of the File
type
string
required
read-only
Model type
file
attributes
object
required
file_id
integer
read-only
File Id
file_uuid
string
read-only
File UUID
related_to
string
Object which the File is related to
BUILDING
CATEGORY
CLIENT
ELEMENT
ELEMENT_REGISTRY
FAILURE
METERING_REGISTRY
OPERATOR
ORDER
QUOTE
QUOTE_REQUEST
RECEIVED_QUOTE
RECEIVED_QUOTE_REQUEST
REQUEST
SELL_ORDER
SUPPLIER
SCHEDULE_WORK
WORK
SCHEDULED_WORK
PURCHASE
PURCHASE_MATERIAL_LINE
PURCHASE_SERVICE_LINE
SALE
related_to_id
integer
Relations Id
related_type
string
read-only
Object which the File is related to
BUILDING
CATEGORY
CLIENT
ELEMENT
ELEMENT_REGISTRY
FAILURE
METERING_REGISTRY
OPERATOR
ORDER
QUOTE
QUOTE_REQUEST
RECEIVED_QUOTE
RECEIVED_QUOTE_REQUEST
REQUEST
SELL_ORDER
SUPPLIER
SCHEDULE_WORK
WORK
file_label_id
integer | null
File Label Id
name
string
File name
Example: my_example_file
thumb
string | null
read-only
URL to the thumbnail, in case the File is an image.
file_url
string (uri)
read-only
URL to the File
description
string | null
expire_date
string (date-time) | null
read-only
Example: 2020-08-28T17:12:00.000Z
has_reminder
boolean
read-only
file_type
string
read-only
Internal type of the file
cad
compressed
file
image
office
other
pdf
signature
video
permission_to_technician
boolean
permission_to_manager
boolean
permission_to_direct
boolean
extension
string
read-only
3gp
3gpp
bin
bmp
cad
csv
doc
docx
gif
jpeg
jpg
kmz
mov
mp4
odf
odp
pdf
png
ppt
pptx
qt
rar
txt
xls
xlsx
zip
network_status
string
Show the network status of the file.
SHARED
RECEIVED
NOT_SHARED
shared_with_supplier
boolean
Show if the file is currently in a shared status with the supplier.
shared_with_client
boolean
Show if the file is currently in a shared status with the client.
file_size
integer
read-only
created_at
string | null
read-only
Example: 2021-07-21 18:38:00
meta
object
Meta model structure details
pagination
object
total
integer
required
Total items.
Example: 1
count
integer
required
Total items returned for the current page.
Example: 1
per_page
integer
required
Maximum number of records per page.
Example: 1
current_page
integer
required
Number of the current page.
total_pages
integer
required
Number of the total pages.
links
object
Requests that return multiple items include a `links` attribute, with links related to request's context.
self
string
required
read-only
Current response link.
Example: /path?page=1
first
string
required
read-only
Link to the first page result.
Example: /path?page=1
last
string
required
read-only
Link to the previous page result.
Example: /path?page=1
next
string
read-only
Link to the next page result.
Example: /path?page=1
status
string
error
error
object
properties
object
Only present when related to property validation error
dev_message
string
Example: Property validation error. Check the "properties" section in the response.
http_code
integer
400
message
string
Example: Property validation error.
more_info
string
status
string
error
error
object
http_code
integer
401
message
string
Example: Authentication token invalid.
more_info
string
status
string
error
error
object
http_code
integer
429
message
string
Example: Too Many Requests.
more_info
string
status
string
error
error
object
http_code
integer
500
message
string
Example: An error has occurred during the request.
more_info
string
curl -X GET \
'https://api.sandbox.infraspeak.com/v3/locations/buildings' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/locations/buildings', {
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->get('https://api.sandbox.infraspeak.com/v3/locations/buildings');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/locations/buildings',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()