Required role: | REGISUserRole |
POST | /Audit |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class AuditRequest
{
public String uuid = null;
public Date created_since_date = null;
public String controller = null;
public String action = null;
public String item_id = null;
public String getUuid() { return uuid; }
public AuditRequest setUuid(String value) { this.uuid = value; return this; }
public Date getCreatedSinceDate() { return created_since_date; }
public AuditRequest setCreatedSinceDate(Date value) { this.created_since_date = value; return this; }
public String getController() { return controller; }
public AuditRequest setController(String value) { this.controller = value; return this; }
public String getAction() { return action; }
public AuditRequest setAction(String value) { this.action = value; return this; }
public String getItemId() { return item_id; }
public AuditRequest setItemId(String value) { this.item_id = value; return this; }
}
public static class AuditsResponse
{
public ResponseStatus responseStatus = null;
public ArrayList<AuditResponse> audits = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public AuditsResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
public ArrayList<AuditResponse> getAudits() { return audits; }
public AuditsResponse setAudits(ArrayList<AuditResponse> value) { this.audits = value; return this; }
}
public static class AuditResponse
{
public ResponseStatus responseStatus = null;
public String uuid = null;
public String ip_address = null;
public String url = null;
public String controller = null;
public String action = null;
public String item_id = null;
public Date timestamp = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public AuditResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
public String getUuid() { return uuid; }
public AuditResponse setUuid(String value) { this.uuid = value; return this; }
public String getIpAddress() { return ip_address; }
public AuditResponse setIpAddress(String value) { this.ip_address = value; return this; }
public String getUrl() { return url; }
public AuditResponse setUrl(String value) { this.url = value; return this; }
public String getController() { return controller; }
public AuditResponse setController(String value) { this.controller = value; return this; }
public String getAction() { return action; }
public AuditResponse setAction(String value) { this.action = value; return this; }
public String getItemId() { return item_id; }
public AuditResponse setItemId(String value) { this.item_id = value; return this; }
public Date getTimestamp() { return timestamp; }
public AuditResponse setTimestamp(Date value) { this.timestamp = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Audit HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AuditRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
<action>String</action>
<controller>String</controller>
<created_since_date>0001-01-01T00:00:00</created_since_date>
<item_id>String</item_id>
<uuid>String</uuid>
</AuditRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <AuditsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <audits> <AuditResponse> <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types"> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:Message>String</d4p1:Message> <d4p1:StackTrace>String</d4p1:StackTrace> <d4p1:Errors> <d4p1:ResponseError> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:FieldName>String</d4p1:FieldName> <d4p1:Message>String</d4p1:Message> <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d4p1:Meta> </d4p1:ResponseError> </d4p1:Errors> <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d4p1:Meta> </ResponseStatus> <action>String</action> <controller>String</controller> <ip_address>String</ip_address> <item_id>String</item_id> <timestamp>0001-01-01T00:00:00</timestamp> <url>String</url> <uuid>String</uuid> </AuditResponse> </audits> </AuditsResponse>