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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class NamedItem:
    workspace: Optional[str] = None
    object_id: Optional[str] = None
    class_: Optional[str] = field(metadata=config(field_name='class'), default=None)
    version_id: Optional[str] = None
    name: Optional[str] = None
    last_updated: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class 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.
    """

    workspace: Optional[str] = None
    date_generated: Optional[str] = None
    results: Optional[List[NamedItem]] = None

Python 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