Field Squared API Services

<back to all web services

Search

This service needs to be called with a query filter. It will fail otherwise.
Usage is /{Workspace}/Search?QUERY=John Smith (where John Smith is the text query to use for the search).
CLASSES=classlist (where classlist is an optional comma separated list of classes to search. i.e. Document,Task,Contact,Feedback
If this parameter is not specified, all classes are searched.

The following routes are available for this service:
GET/{Workspace}/Search
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * This service needs to be called with a query filter.  It will fail otherwise. Usage is /{Workspace}/Search?QUERY=John Smith (where John Smith is the text query to use for the search). CLASSES=classlist (where classlist is an optional comma separated list of classes to search.  i.e. Document,Task,Contact,Feedback If this parameter is not specified, all classes are searched.
    */
    public static class Search
    {
        public String Workspace = null;
        public String DateGenerated = null;
        public ArrayList<NamedItem> Results = null;
        
        public String getWorkspace() { return Workspace; }
        public Search setWorkspace(String value) { this.Workspace = value; return this; }
        public String getDateGenerated() { return DateGenerated; }
        public Search setDateGenerated(String value) { this.DateGenerated = value; return this; }
        public ArrayList<NamedItem> getResults() { return Results; }
        public Search setResults(ArrayList<NamedItem> value) { this.Results = value; return this; }
    }

    public static class NamedItem
    {
        public String Workspace = null;
        public String ObjectId = null;
        public String Class = null;
        public String VersionId = null;
        public String Name = null;
        public String LastUpdated = null;
        
        public String getWorkspace() { return Workspace; }
        public NamedItem setWorkspace(String value) { this.Workspace = value; return this; }
        public String getObjectId() { return ObjectId; }
        public NamedItem setObjectId(String value) { this.ObjectId = value; return this; }
        public String getClass() { return Class; }
        public NamedItem setClass(String value) { this.Class = value; return this; }
        public String getVersionId() { return VersionId; }
        public NamedItem setVersionId(String value) { this.VersionId = value; return this; }
        public String getName() { return Name; }
        public NamedItem setName(String value) { this.Name = value; return this; }
        public String getLastUpdated() { return LastUpdated; }
        public NamedItem setLastUpdated(String value) { this.LastUpdated = value; return this; }
    }

}

Java Search DTOs

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

HTTP + CSV

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

GET /{Workspace}/Search HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv