| GET | /api/v1/devices |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
public static class GetDeviceList implements IHasBearerToken
{
@ApiMember(IsRequired=true, ParameterType="query")
public String bearerToken = null;
/**
* Optional! Follow the format : /api/v1/devices?filter[ObjektGuid]=*
*/
@DataMember(Name="filter[ObjektGuid]")
@SerializedName("filter[ObjektGuid]")
@ApiMember(Description="Optional! Follow the format : /api/v1/devices?filter[ObjektGuid]=*", ParameterType="query")
public String filterByObjektGuid = null;
/**
* Optional! Follow the format : /api/v1/devices?filter[NutzerGuid]=*
*/
@DataMember(Name="filter[NutzerGuid]")
@SerializedName("filter[NutzerGuid]")
@ApiMember(Description="Optional! Follow the format : /api/v1/devices?filter[NutzerGuid]=*", ParameterType="query")
public String filterByNutzeinheitGuid = null;
public String getBearerToken() { return bearerToken; }
public GetDeviceList setBearerToken(String value) { this.bearerToken = value; return this; }
public String getFilterByObjektGuid() { return filterByObjektGuid; }
public GetDeviceList setFilterByObjektGuid(String value) { this.filterByObjektGuid = value; return this; }
public String getFilterByNutzeinheitGuid() { return filterByNutzeinheitGuid; }
public GetDeviceList setFilterByNutzeinheitGuid(String value) { this.filterByNutzeinheitGuid = value; return this; }
}
public static class GetDeviceListResponse
{
public ArrayList<Device> deviceList = null;
public ResponseStatus responseStatus = null;
public ArrayList<Device> getDeviceList() { return deviceList; }
public GetDeviceListResponse setDeviceList(ArrayList<Device> value) { this.deviceList = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GetDeviceListResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class Device
{
@DataMember(Name="Guid")
@SerializedName("Guid")
public String guid = null;
@DataMember(Name="Geraetenummer")
@SerializedName("Geraetenummer")
public String number = null;
@DataMember(Name="Bezeichnung")
@SerializedName("Bezeichnung")
public String label = null;
@DataMember(Name="Beschreibung")
@SerializedName("Beschreibung")
public String description = null;
@DataMember(Name="Einbaudatum")
@SerializedName("Einbaudatum")
public Date installationDate = null;
@DataMember(Name="Ausbaudatum")
@SerializedName("Ausbaudatum")
public Date deinstallationDate = null;
@DataMember(Name="Eichdatum")
@SerializedName("Eichdatum")
public Date calibrationDate = null;
@DataMember(Name="Einheit")
@SerializedName("Einheit")
public String unit = null;
@DataMember(Name="Memo")
@SerializedName("Memo")
public String note = null;
@DataMember(Name="DeviceCatalogGuid")
@SerializedName("DeviceCatalogGuid")
public String deviceCatalogGuid = null;
public String getGuid() { return guid; }
public Device setGuid(String value) { this.guid = value; return this; }
public String getNumber() { return number; }
public Device setNumber(String value) { this.number = value; return this; }
public String getLabel() { return label; }
public Device setLabel(String value) { this.label = value; return this; }
public String getDescription() { return description; }
public Device setDescription(String value) { this.description = value; return this; }
public Date getInstallationDate() { return installationDate; }
public Device setInstallationDate(Date value) { this.installationDate = value; return this; }
public Date getDeinstallationDate() { return deinstallationDate; }
public Device setDeinstallationDate(Date value) { this.deinstallationDate = value; return this; }
public Date getCalibrationDate() { return calibrationDate; }
public Device setCalibrationDate(Date value) { this.calibrationDate = value; return this; }
public String getUnit() { return unit; }
public Device setUnit(String value) { this.unit = value; return this; }
public String getNote() { return note; }
public Device setNote(String value) { this.note = value; return this; }
public String getDeviceCatalogGuid() { return deviceCatalogGuid; }
public Device setDeviceCatalogGuid(String value) { this.deviceCatalogGuid = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v1/devices HTTP/1.1 Host: heat-syke-servdesk.eras-online.de Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}