StarterTemplate ASP.NET Host

<back to all web services

RequestLogs

The following routes are available for this service:
All Verbs/api/requestlogs
RequestLogs Parameters:
NameParameterData TypeRequiredDescription
BeforeSecsqueryint?No
AfterSecsqueryint?No
IpAddressquerystringNo
ForwardedForquerystringNo
UserAuthIdquerystringNo
SessionIdquerystringNo
RefererquerystringNo
PathInfoquerystringNo
Idsquerylong[]No
BeforeIdqueryint?No
AfterIdqueryint?No
HasResponsequerybool?No
WithErrorsquerybool?No
SkipqueryintNo
Takequeryint?No
EnableSessionTrackingquerybool?No
EnableResponseTrackingquerybool?No
EnableErrorTrackingquerybool?No
DurationLongerThanqueryTimeSpan?No
DurationLessThanqueryTimeSpan?No
RequestLogsResponse Parameters:
NameParameterData TypeRequiredDescription
ResultsformList<RequestLogEntry>No
UsageformDictionary<string, string>No
ResponseStatusformResponseStatusNo
RequestLogEntry Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
DateTimeformDateTimeNo
HttpMethodformstringNo
AbsoluteUriformstringNo
PathInfoformstringNo
RequestBodyformstringNo
RequestDtoformObjectNo
UserAuthIdformstringNo
SessionIdformstringNo
IpAddressformstringNo
ForwardedForformstringNo
RefererformstringNo
HeadersformDictionary<string, string>No
FormDataformDictionary<string, string>No
ItemsformDictionary<string, string>No
SessionformObjectNo
ResponseDtoformObjectNo
ErrorResponseformObjectNo
RequestDurationformTimeSpanNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /csv/reply/RequestLogs HTTP/1.1 
Host: bootstrapapi.servicestack.net 
Content-Type: text/csv
Content-Length: length

{"beforeSecs":0,"afterSecs":0,"ipAddress":"String","forwardedFor":"String","userAuthId":"String","sessionId":"String","referer":"String","pathInfo":"String","ids":[0],"beforeId":0,"afterId":0,"hasResponse":false,"withErrors":false,"skip":0,"take":0,"enableSessionTracking":false,"enableResponseTracking":false,"enableErrorTracking":false,"durationLongerThan":"PT0S","durationLessThan":"PT0S"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"results":[{"id":0,"dateTime":"\/Date(-62135596800000-0000)\/","httpMethod":"String","absoluteUri":"String","pathInfo":"String","requestBody":"String","requestDto":{},"userAuthId":"String","sessionId":"String","ipAddress":"String","forwardedFor":"String","referer":"String","headers":{"String":"String"},"formData":{"String":"String"},"items":{"String":"String"},"session":{},"responseDto":{},"errorResponse":{},"requestDuration":"PT0S"}],"usage":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}