| GET | /varieties |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@DataContract
public static class VarietiesLookup
{
@DataMember(Order=2)
public Long tenantsId = null;
@DataMember(Order=3)
public Long zonesId = null;
@DataMember(Order=4)
public Long cropsId = null;
@DataMember(Order=5)
public String name = null;
@DataMember(Order=6)
public String about = null;
@DataMember(Order=7)
public Integer heightsCm = null;
@DataMember(Order=8)
public Boolean needSupport = null;
@DataMember(Order=9)
public Boolean needStakes = null;
@DataMember(Order=10)
public Boolean needTrellis = null;
public Long getTenantsId() { return tenantsId; }
public VarietiesLookup setTenantsId(Long value) { this.tenantsId = value; return this; }
public Long getZonesId() { return zonesId; }
public VarietiesLookup setZonesId(Long value) { this.zonesId = value; return this; }
public Long getCropsId() { return cropsId; }
public VarietiesLookup setCropsId(Long value) { this.cropsId = value; return this; }
public String getName() { return name; }
public VarietiesLookup setName(String value) { this.name = value; return this; }
public String getAbout() { return about; }
public VarietiesLookup setAbout(String value) { this.about = value; return this; }
public Integer getHeightsCm() { return heightsCm; }
public VarietiesLookup setHeightsCm(Integer value) { this.heightsCm = value; return this; }
public Boolean isNeedSupport() { return needSupport; }
public VarietiesLookup setNeedSupport(Boolean value) { this.needSupport = value; return this; }
public Boolean isNeedStakes() { return needStakes; }
public VarietiesLookup setNeedStakes(Boolean value) { this.needStakes = value; return this; }
public Boolean isNeedTrellis() { return needTrellis; }
public VarietiesLookup setNeedTrellis(Boolean value) { this.needTrellis = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /varieties HTTP/1.1 Host: api.sfgtec.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{Unable to show example output for type 'IEnumerable`1' using the custom 'csv' filter}Cannot dynamically create an instance of type 'System.Collections.Generic.IEnumerable`1[sfgboxapi.ServiceModel.VarietiesLookupResponse]'. Reason: Cannot create an instance of an interface.