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
System.NotSupportedException: Unknown language 'mjs', Supported languages: csharp, typescript, dart, java, kotlin, python, swift, vbnet, fsharp
   at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(MetadataTypes metadataTypes, MetadataTypesConfig typesConfig, String lang, IRequest req, Action`1 configure) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/NativeTypes/ILangGenerator.cs:line 53
   at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(List`1 metadataTypes, String lang, IRequest req, Action`1 configure) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/NativeTypes/ILangGenerator.cs:line 26
   at ServiceStack.Metadata.BaseMetadataHandler.d__12.MoveNext() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/Metadata/BaseMetadataHandler.cs:line 207

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

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<AssetQuery xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Assets">
  <Filters>
    <QueryFilter>
      <Field>String</Field>
      <Operator>String</Operator>
      <Value />
    </QueryFilter>
  </Filters>
  <RecCount>0</RecCount>
  <RecStart>0</RecStart>
  <Sort>
    <SortCriteria>
      <Direction>String</Direction>
      <Field>String</Field>
    </SortCriteria>
  </Sort>
  <SuppressGeometry>false</SuppressGeometry>
  <Workspace>String</Workspace>
</AssetQuery>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AssetQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Assets">
  <Assets xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
    <d2p1:Asset>
      <d2p1:ActiveLaborTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringanyType>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value />
        </d4p1:KeyValueOfstringanyType>
      </d2p1:ActiveLaborTypes>
      <d2p1:Address>
        <d2p1:City>String</d2p1:City>
        <d2p1:Country>String</d2p1:Country>
        <d2p1:Location>
          <d2p1:x>0</d2p1:x>
          <d2p1:y>0</d2p1:y>
        </d2p1:Location>
        <d2p1:State>String</d2p1:State>
        <d2p1:Street>String</d2p1:Street>
        <d2p1:Unit>String</d2p1:Unit>
        <d2p1:Zip>String</d2p1:Zip>
      </d2p1:Address>
      <d2p1:AllAssests>0</d2p1:AllAssests>
      <d2p1:Ancestors xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:Ancestors>
      <d2p1:Anno>
        <d2p1:R>0</d2p1:R>
        <d2p1:S>0</d2p1:S>
        <d2p1:T>String</d2p1:T>
        <d2p1:X>0</d2p1:X>
        <d2p1:Y>0</d2p1:Y>
      </d2p1:Anno>
      <d2p1:Assets xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:Assets>
      <d2p1:AssignedWorkspace>String</d2p1:AssignedWorkspace>
      <d2p1:Barcode>String</d2p1:Barcode>
      <d2p1:BasedOn>String</d2p1:BasedOn>
      <d2p1:Contacts xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:Contacts>
      <d2p1:Created>String</d2p1:Created>
      <d2p1:CreatedBy>String</d2p1:CreatedBy>
      <d2p1:CustomDataFields xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.Core.Model.Task">
        <d4p1:CustomDataField>
          <d4p1:Binding>String</d4p1:Binding>
          <d4p1:DataType>String</d4p1:DataType>
          <d4p1:IsHidden>false</d4p1:IsHidden>
          <d4p1:IsReadOnly>false</d4p1:IsReadOnly>
          <d4p1:Label>String</d4p1:Label>
          <d4p1:Value />
          <d4p1:Values>String</d4p1:Values>
        </d4p1:CustomDataField>
      </d2p1:CustomDataFields>
      <d2p1:Data xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d2p1:Data>
      <d2p1:Documents>
        <d2p1:DomainItem>
          <d2p1:LastUpdated>String</d2p1:LastUpdated>
          <d2p1:ObjectId>String</d2p1:ObjectId>
          <d2p1:VersionId>String</d2p1:VersionId>
          <d2p1:Workspace>String</d2p1:Workspace>
        </d2p1:DomainItem>
      </d2p1:Documents>
      <d2p1:Events>
        <d2p1:EventItem>
          <d2p1:Automatic>false</d2p1:Automatic>
          <d2p1:Barcode>String</d2p1:Barcode>
          <d2p1:Date>String</d2p1:Date>
          <d2p1:DateCreated>String</d2p1:DateCreated>
          <d2p1:Details>String</d2p1:Details>
          <d2p1:IsScan>false</d2p1:IsScan>
          <d2p1:Location>
            <d2p1:x>0</d2p1:x>
            <d2p1:y>0</d2p1:y>
          </d2p1:Location>
          <d2p1:ObjectId>String</d2p1:ObjectId>
          <d2p1:SelectedBy>String</d2p1:SelectedBy>
          <d2p1:Status>String</d2p1:Status>
          <d2p1:StatusType>String</d2p1:StatusType>
          <d2p1:Type>String</d2p1:Type>
          <d2p1:User>String</d2p1:User>
        </d2p1:EventItem>
      </d2p1:Events>
      <d2p1:ExternalId>String</d2p1:ExternalId>
      <d2p1:Geometry>
        <d2p1:Coordinates>
          <d2p1:Location>
            <d2p1:x>0</d2p1:x>
            <d2p1:y>0</d2p1:y>
          </d2p1:Location>
        </d2p1:Coordinates>
        <d2p1:Type>String</d2p1:Type>
      </d2p1:Geometry>
      <d2p1:GeometryString>String</d2p1:GeometryString>
      <d2p1:InventoryItems xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:InventoryItems>
      <d2p1:IsParent>false</d2p1:IsParent>
      <d2p1:LastUpdated>String</d2p1:LastUpdated>
      <d2p1:Levels>0</d2p1:Levels>
      <d2p1:LocationHistory>
        <d2p1:LocationHistory>
          <d2p1:Barcode>String</d2p1:Barcode>
          <d2p1:Date>String</d2p1:Date>
          <d2p1:IsScan>false</d2p1:IsScan>
          <d2p1:Location>
            <d2p1:x>0</d2p1:x>
            <d2p1:y>0</d2p1:y>
          </d2p1:Location>
          <d2p1:Notes>String</d2p1:Notes>
        </d2p1:LocationHistory>
      </d2p1:LocationHistory>
      <d2p1:MaintenanceHistory>
        <d2p1:MaintenanceRecord>
          <d2p1:DateTime>String</d2p1:DateTime>
          <d2p1:Notes>String</d2p1:Notes>
        </d2p1:MaintenanceRecord>
      </d2p1:MaintenanceHistory>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:ObjectId>String</d2p1:ObjectId>
      <d2p1:Owner>
        <d2p1:Ancestors xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:Ancestors>
        <d2p1:Class>String</d2p1:Class>
        <d2p1:ObjectId>String</d2p1:ObjectId>
        <d2p1:Type>String</d2p1:Type>
        <d2p1:VersionId>String</d2p1:VersionId>
      </d2p1:Owner>
      <d2p1:Parent>String</d2p1:Parent>
      <d2p1:Schedules xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Schedules">
        <d4p1:Schedule>
          <d4p1:BasedOn>String</d4p1:BasedOn>
          <d4p1:Data xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:KeyValueOfstringanyType>
              <d6p1:Key>String</d6p1:Key>
              <d6p1:Value />
            </d6p1:KeyValueOfstringanyType>
          </d4p1:Data>
          <d4p1:End>String</d4p1:End>
          <d4p1:ObjectId>String</d4p1:ObjectId>
          <d4p1:Start>String</d4p1:Start>
          <d4p1:Teams xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </d4p1:Teams>
          <d4p1:TimeZone>String</d4p1:TimeZone>
          <d4p1:Users xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </d4p1:Users>
          <d4p1:VersionId>String</d4p1:VersionId>
          <d4p1:Workspace>String</d4p1:Workspace>
        </d4p1:Schedule>
      </d2p1:Schedules>
      <d2p1:SourceProjection>String</d2p1:SourceProjection>
      <d2p1:Symbol>String</d2p1:Symbol>
      <d2p1:TaskSeries xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:TaskSeries>
      <d2p1:TaskSeriesTemplates xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:TaskSeriesTemplates>
      <d2p1:Tasks>
        <d2p1:DomainItem>
          <d2p1:LastUpdated>String</d2p1:LastUpdated>
          <d2p1:ObjectId>String</d2p1:ObjectId>
          <d2p1:VersionId>String</d2p1:VersionId>
          <d2p1:Workspace>String</d2p1:Workspace>
        </d2p1:DomainItem>
      </d2p1:Tasks>
      <d2p1:Teams xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:Teams>
      <d2p1:TimeZone>String</d2p1:TimeZone>
      <d2p1:Type>String</d2p1:Type>
      <d2p1:Users>
        <d2p1:DomainItem>
          <d2p1:LastUpdated>String</d2p1:LastUpdated>
          <d2p1:ObjectId>String</d2p1:ObjectId>
          <d2p1:VersionId>String</d2p1:VersionId>
          <d2p1:Workspace>String</d2p1:Workspace>
        </d2p1:DomainItem>
      </d2p1:Users>
      <d2p1:VersionId>String</d2p1:VersionId>
      <d2p1:Workspace>String</d2p1:Workspace>
    </d2p1:Asset>
  </Assets>
  <RecCount>0</RecCount>
  <RecStart>0</RecStart>
  <TotalCount>0</TotalCount>
</AssetQueryResponse>