| GET, PUT, POST, DELETE | /{Workspace}/DiscreetDocumentSchema | ||
|---|---|---|---|
| GET, PUT POST, DELETE | /{Workspace}/DiscreetDocumentSchema/{Type} |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Field2Office.API.Model.DiscreetDocument;
namespace Field2Office.API.Model.DiscreetDocument
{
public partial class DiscreetDocumentField
{
public virtual string Key { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual string DataType { get; set; }
public virtual bool Indexed { get; set; }
}
public partial class DiscreetDocumentSchema
{
public DiscreetDocumentSchema()
{
FieldDefs = new List<DiscreetDocumentField>{};
}
public virtual string Workspace { get; set; }
public virtual string Created { get; set; }
public virtual string LastUpdated { get; set; }
public virtual string Type { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual List<DiscreetDocumentField> FieldDefs { get; set; }
public virtual bool? Enabled { get; set; }
}
}
C# DiscreetDocumentSchema DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
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
}