Field Squared API Services

<back to all web services

XWorkspaceList

The following routes are available for this service:
GET/{Workspace}/XWorkspaceList/
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 Location:
    y: float = 0.0
    x: float = 0.0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Address:
    street: Optional[str] = None
    unit: Optional[str] = None
    city: Optional[str] = None
    state: Optional[str] = None
    zip: Optional[str] = None
    contact_title: Optional[str] = None
    contact_name: Optional[str] = None
    contact_phone: Optional[str] = None
    contact_email: Optional[str] = None
    location: Optional[Location] = None
    site_name: Optional[str] = None
    geocode_failed: bool = False
    country: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class XWorkspace:
    object_id: Optional[str] = None
    version_id: Optional[str] = None
    name: Optional[str] = None
    company_name: Optional[str] = None
    company_address: Optional[Address] = None
    form_templates: Optional[str] = None
    assign_task_to_workspace: bool = False
    assign_task_to_user: bool = False
    delete_task: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class XWorkspaceList:
    workspace: Optional[str] = None
    date_generated: Optional[str] = None
    x_workspaces: Optional[List[XWorkspace]] = None

Python XWorkspaceList 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}/XWorkspaceList/ HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv