GET /files/{relatedTo}/{relatedToId}

List Files

This endpoint allows you to list all Files related to a given Infraspeak object.

Operation ID: getFiles
lock This endpoint requires a Bearer token in the Authorization header.

Path Parameters

Name Type Description
relatedTo required
path
string

The type of relation to the file

ELEMENT ELEMENT_REGISTRY SCHEDULE_WORK FAILURE failure BUILDING CATEGORY OPERATOR operator CLIENT WORK METERING_REGISTRY REQUEST SELL_ORDER SUPPLIER supplier ORDER QUOTE QUOTE_REQUEST quote_request RECEIVED_QUOTE received_quote RECEIVED_QUOTE_REQUEST received_quote_request
relatedToId required
path
string

The ID of the related object

Responses

data array<object>
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
404
message string

Example: Resource not found

more_info string | null
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