GET POST | /GetKey | ||
---|---|---|---|
GET POST | /GetKey/{Id} | ||
GET | /Key | ||
GET | /Key/{Id} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class GetKey
{
@DataMember
public String id = null;
public String getId() { return id; }
public GetKey setId(String value) { this.id = value; return this; }
}
@DataContract
public static class GetKeyResponse
{
@DataMember
public ArrayList<Key> list = null;
@DataMember
public ResponseStatus responseStatus = null;
public ArrayList<Key> getList() { return list; }
public GetKeyResponse setList(ArrayList<Key> value) { this.list = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GetKeyResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class Key
{
@DataMember
public String id = null;
@DataMember
public String name = null;
@DataMember
public String serialNumber = null;
@DataMember
public String keyValid = null;
@DataMember
public String keyExpire = null;
@DataMember
public Boolean isAdmin = null;
@DataMember
public String companyName = null;
@DataMember
public String email = null;
@DataMember
public String mobile = null;
@DataMember
public String phone = null;
@DataMember
public String note = null;
@DataMember
public Date expirationDate = null;
@DataMember
public String employeeNumber = null;
@DataMember
public ArrayList<String> units = null;
@DataMember
public ArrayList<String> groups = null;
public String getId() { return id; }
public Key setId(String value) { this.id = value; return this; }
public String getName() { return name; }
public Key setName(String value) { this.name = value; return this; }
public String getSerialNumber() { return serialNumber; }
public Key setSerialNumber(String value) { this.serialNumber = value; return this; }
public String getKeyValid() { return keyValid; }
public Key setKeyValid(String value) { this.keyValid = value; return this; }
public String getKeyExpire() { return keyExpire; }
public Key setKeyExpire(String value) { this.keyExpire = value; return this; }
public Boolean getIsAdmin() { return isAdmin; }
public Key setIsAdmin(Boolean value) { this.isAdmin = value; return this; }
public String getCompanyName() { return companyName; }
public Key setCompanyName(String value) { this.companyName = value; return this; }
public String getEmail() { return email; }
public Key setEmail(String value) { this.email = value; return this; }
public String getMobile() { return mobile; }
public Key setMobile(String value) { this.mobile = value; return this; }
public String getPhone() { return phone; }
public Key setPhone(String value) { this.phone = value; return this; }
public String getNote() { return note; }
public Key setNote(String value) { this.note = value; return this; }
public Date getExpirationDate() { return expirationDate; }
public Key setExpirationDate(Date value) { this.expirationDate = value; return this; }
public String getEmployeeNumber() { return employeeNumber; }
public Key setEmployeeNumber(String value) { this.employeeNumber = value; return this; }
public ArrayList<String> getUnits() { return units; }
public Key setUnits(ArrayList<String> value) { this.units = value; return this; }
public ArrayList<String> getGroups() { return groups; }
public Key setGroups(ArrayList<String> value) { this.groups = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /GetKey HTTP/1.1
Host: api.trackunit.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"id":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"list":[{"id":"String","name":"String","serialNumber":"String","keyValid":"String","keyExpire":"String","isAdmin":false,"companyName":"String","email":"String","mobile":"String","phone":"String","note":"String","expirationDate":"0001-01-01T00:00:00.0000000Z","employeeNumber":"String","units":["String"],"groups":["String"]}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}