get https://api.visualogyx.com/v1/inspections
This endpoint retrieves a list of inspections that match the provided filtering criteria.
Overview
The Visualogyx API enables developers to manage inspections efficiently. The GET /v1/inspections
endpoint retrieves a list of inspections associated with your organization, offering extensive filtering and data inclusion options to tailor the response to your needs.
Endpoint Details
- Method: GET
- URL:
https://api.visualogyx.com/v1/inspections
- Description: Fetches a list of inspections with customizable filtering and data enrichment options.
Request Information
- Authentication:
- Header: Requires an
access-token
with your private API key for secure access.
- Header: Requires an
- Query Parameters:
page
(integer, default: 1): The page number to retrieve (e.g., 1 for the first page).page_size
(integer, default: 10): Number of inspections per page (max: 100).sort_by
(string, default: 'updated_at'): Field to sort by (options: 'updated_at', 'created_at').sort_order
(string, default: 'asc'): Sort order (options: 'asc', 'desc').includes
(array of strings): Additional data to include (options: 'data' for inspection details, 'files' for attached files, 'shared_with_users' for shared user details).team_id
(string): Filter by the ID of the team.status
(array of strings): Filter by inspection status (options: 'new', 'in_progress', 'completed', 'canceled').updated_after
(date-time): Include inspections updated on or after this timestamp (e.g., '2023-01-01T00:00:00Z').updated_before
(date-time): Include inspections updated on or before this timestamp (e.g., '2023-12-31T23:59:59Z').created_after
(date-time): Include inspections created on or after this timestamp (e.g., '2023-01-01T00:00:00Z').created_before
(date-time): Include inspections created on or before this timestamp (e.g., '2023-12-31T23:59:59Z').data_filter
(object): Filters for inspection data (only works ifincludes
contains 'data'):flagged_items_only
(boolean): Set to 'true' to include only inspections with flagged items.template_control_ids
(array of strings): Filter inspections by specific control (question) IDs.
For date parameters like updated_after, updated_before, created_after, and created_before, make sure to use UTC timestamps to get accurate results
Potential Errors
- 400 Bad Request: Triggered by invalid or missing parameters.
- 401 Unauthorized: Occurs if the API key is missing or invalid, or you attempt to fetch inspections that you do not have permission to access.
- 404 Not Found: Returned if the requested resource cannot be found.
Usage Guidelines
- Authentication: Always include your API key in the
access-token
header. - Pagination: Use
page
andpage_size
to navigate through large datasets. - Filtering: Leverage
team_id
,status
, and date filters to narrow down results. - Data Enrichment: Use
includes
to fetch additional details like inspection data or files. - Advanced Filtering: Apply
data_filter
to refine results further (requiresincludes=data
). - Error Handling: Handle 400, 401, and 404 errors gracefully in your application.
Additional Features
- Multi-Language Support: Code examples available in Shell, Node, Ruby, PHP, and Python.
- Search Functionality: Use
Ctrl + K
to search the API documentation quickly. - Recent Requests: Monitor API usage and troubleshoot via the recent requests log in the documentation.
This guide simplifies integration with the "Get a List of Inspections" endpoint, helping you manage inspections effectively with the Visualogyx API.