Field Squared API Services

<back to all web services

DiscreetDocumentSchema

The following routes are available for this service:
GET, PUT, POST, DELETE/{Workspace}/DiscreetDocumentSchema
GET, PUT POST, DELETE/{Workspace}/DiscreetDocumentSchema/{Type}

export class DiscreetDocumentField
{
    public Key: string;
    public Name: string;
    public Description: string;
    public DataType: string;
    public Indexed: boolean;

    public constructor(init?: Partial<DiscreetDocumentField>) { (Object as any).assign(this, init); }
}

export class DiscreetDocumentSchema
{
    public Workspace: string;
    public Created: string;
    public LastUpdated: string;
    public Type: string;
    public Name: string;
    public Description: string;
    public FieldDefs: DiscreetDocumentField[];
    public Enabled?: boolean;

    public constructor(init?: Partial<DiscreetDocumentSchema>) { (Object as any).assign(this, init); }
}

TypeScript DiscreetDocumentSchema 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.

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

{"Workspace":"String","Created":"String","LastUpdated":"String","Type":"String","Name":"String","Description":"String","FieldDefs":[{"Key":"String","Name":"String","Description":"String","DataType":"String","Indexed":false}],"Enabled":false}