Field Squared API Services

<back to all web services

AssetQuery

/{Workspace}/AssetQuery allows flexible querying of assets using structured filters.
Supports various operators (eq, ne, contains, in, gt, lt, exists) for precise asset searches.
Can query by core fields (type, name, created) and custom data fields (data.EID, data.FDH_ID, etc.).
Example: POST with filters for exact matches on type='FDH' and data.EID='specific-value'

The following routes are available for this service:
POST/{Workspace}/AssetQuery
AssetQuery Parameters:
NameParameterData TypeRequiredDescription
WorkspacepathstringNo
FiltersbodyList<QueryFilter>No
RecStartbodyint?No
RecCountbodyint?No
SortbodyList<SortCriteria>No
SuppressGeometrybodybool?No
QueryFilter Parameters:
NameParameterData TypeRequiredDescription
FieldformstringNo
OperatorformstringNo
ValueformObjectNo
SortCriteria Parameters:
NameParameterData TypeRequiredDescription
FieldformstringNo
DirectionformstringNo
AssetQueryResponse Parameters:
NameParameterData TypeRequiredDescription
AssetsformList<Asset>No
TotalCountformlongNo
RecStartformintNo
RecCountformintNo
Asset Parameters:
NameParameterData TypeRequiredDescription
WorkspaceformstringNo
TimeZoneformstringNo
AssignedWorkspaceformstringNo
ObjectIdformstringNo
VersionIdformstringNo
BasedOnformstringNo
ExternalIdformstringNo
CreatedformstringNo
LastUpdatedformstringNo
NameformstringNo
SchedulesformList<Schedule>No
DocumentsformList<DomainItem>No
TasksformList<DomainItem>No
TaskSeriesformList<string>No
TaskSeriesTemplatesformList<string>No
UsersformList<DomainItem>No
TypeformstringNo
SymbolformstringNo
DataformDictionary<string, string>No
GeometryformGeometryNo
MaintenanceHistoryformList<MaintenanceRecord>No
ParentformstringNo
AncestorsformList<string>No
LocationHistoryformList<LocationHistory>No
OwnerformClassedItemNo
IsParentformboolNo
AssetsformList<string>No
ContactsformList<string>No
GeometryStringformstringNo
SourceProjectionformstringNo
EventsformList<EventItem>No
AnnoformAnnoNo
TeamsformList<string>No
AddressformAddressBasicNo
CreatedByformstringNo
InventoryItemsformList<string>No
ActiveLaborTypesformDictionary<string, Object>No
LevelsformintNo
AllAssestsformintNo
BarcodeformstringNo
CustomDataFieldsformList<CustomDataField>No
Schedule Parameters:
NameParameterData TypeRequiredDescription
WorkspaceformstringNo
ObjectIdformstringNo
VersionIdformstringNo
BasedOnformstringNo
StartformstringNo
EndformstringNo
TimeZoneformstringNo
UsersformList<string>No
TeamsformList<string>No
DataformDictionary<string, Object>No
DomainItem Parameters:
NameParameterData TypeRequiredDescription
WorkspaceformstringNo
ObjectIdformstringNo
VersionIdformstringNo
LastUpdatedformstringNo
Geometry Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
CoordinatesformList<Location>No
Location Parameters:
NameParameterData TypeRequiredDescription
yformdoubleNo
xformdoubleNo
MaintenanceRecord Parameters:
NameParameterData TypeRequiredDescription
DateTimeformstringNo
NotesformstringNo
LocationHistory Parameters:
NameParameterData TypeRequiredDescription
DateformstringNo
LocationformLocationNo
BarcodeformstringNo
NotesformstringNo
IsScanformboolNo
ClassedItem Parameters:
NameParameterData TypeRequiredDescription
ObjectIdformstringNo
ClassformstringNo
VersionIdformstringNo
AncestorsformList<string>No
TypeformstringNo
EventItem Parameters:
NameParameterData TypeRequiredDescription
ObjectIdformstringNo
DateformstringNo
LocationformLocationNo
BarcodeformstringNo
DetailsformstringNo
TypeformstringNo
IsScanformboolNo
UserformstringNo
SelectedByformstringNo
StatusformstringNo
StatusTypeformstringNo
DateCreatedformstringNo
AutomaticformboolNo
Anno Parameters:
NameParameterData TypeRequiredDescription
XformdoubleNo
YformdoubleNo
RformdoubleNo
SformdoubleNo
TformstringNo
AddressBasic Parameters:
NameParameterData TypeRequiredDescription
StreetformstringNo
UnitformstringNo
CityformstringNo
StateformstringNo
ZipformstringNo
CountryformstringNo
LocationformLocationNo
CustomDataField Parameters:
NameParameterData TypeRequiredDescription
BindingformstringNo
LabelformstringNo
ValueformObjectNo
DataTypeformstringNo
IsReadOnlyformboolNo
IsHiddenformboolNo
ValuesformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Workspace}/AssetQuery HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Workspace: String,
	Filters: 
	[
		{
			Field: String,
			Operator: String,
			Value: {}
		}
	],
	RecStart: 0,
	RecCount: 0,
	Sort: 
	[
		{
			Field: String,
			Direction: String
		}
	],
	SuppressGeometry: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Assets: 
	[
		{
			Workspace: String,
			TimeZone: String,
			AssignedWorkspace: String,
			ObjectId: String,
			VersionId: String,
			BasedOn: String,
			ExternalId: String,
			Created: String,
			LastUpdated: String,
			Name: String,
			Schedules: 
			[
				{
					Workspace: String,
					ObjectId: String,
					VersionId: String,
					BasedOn: String,
					Start: String,
					End: String,
					TimeZone: String,
					Users: 
					[
						String
					],
					Teams: 
					[
						String
					],
					Data: 
					{
						String: {}
					}
				}
			],
			Documents: 
			[
				{
					Workspace: String,
					ObjectId: String,
					VersionId: String,
					LastUpdated: String
				}
			],
			Tasks: 
			[
				{
					Workspace: String,
					ObjectId: String,
					VersionId: String,
					LastUpdated: String
				}
			],
			TaskSeries: 
			[
				String
			],
			TaskSeriesTemplates: 
			[
				String
			],
			Users: 
			[
				{
					Workspace: String,
					ObjectId: String,
					VersionId: String,
					LastUpdated: String
				}
			],
			Type: String,
			Symbol: String,
			Data: 
			{
				String: String
			},
			Geometry: 
			{
				Type: String,
				Coordinates: 
				[
					{
						y: 0,
						x: 0
					}
				]
			},
			MaintenanceHistory: 
			[
				{
					DateTime: String,
					Notes: String
				}
			],
			Parent: String,
			Ancestors: 
			[
				String
			],
			LocationHistory: 
			[
				{
					Date: String,
					Location: 
					{
						y: 0,
						x: 0
					},
					Barcode: String,
					Notes: String,
					IsScan: False
				}
			],
			Owner: 
			{
				ObjectId: String,
				Class: String,
				VersionId: String,
				Ancestors: 
				[
					String
				],
				Type: String
			},
			IsParent: False,
			Assets: 
			[
				String
			],
			Contacts: 
			[
				String
			],
			GeometryString: String,
			SourceProjection: String,
			Events: 
			[
				{
					ObjectId: String,
					Date: String,
					Location: 
					{
						y: 0,
						x: 0
					},
					Barcode: String,
					Details: String,
					Type: String,
					IsScan: False,
					User: String,
					SelectedBy: String,
					Status: String,
					StatusType: String,
					DateCreated: String,
					Automatic: False
				}
			],
			Anno: 
			{
				X: 0,
				Y: 0,
				R: 0,
				S: 0,
				T: String
			},
			Teams: 
			[
				String
			],
			Address: 
			{
				Street: String,
				Unit: String,
				City: String,
				State: String,
				Zip: String,
				Country: String,
				Location: 
				{
					y: 0,
					x: 0
				}
			},
			CreatedBy: String,
			InventoryItems: 
			[
				String
			],
			ActiveLaborTypes: 
			{
				String: {}
			},
			Levels: 0,
			AllAssests: 0,
			Barcode: String,
			CustomDataFields: 
			[
				{
					Binding: String,
					Label: String,
					Value: {},
					DataType: String,
					IsReadOnly: False,
					IsHidden: False,
					Values: String
				}
			]
		}
	],
	TotalCount: 0,
	RecStart: 0,
	RecCount: 0
}