Field Squared API Services

<back to all web services

ApiTrafficLogs

Returns recent log entries
Pagination - /?recstart=0&reccount=1

The following routes are available for this service:
GET/{Workspace}/ApiTrafficLog
import Foundation
import ServiceStack

/**
* Returns recent log entriesPagination - /?recstart=0&reccount=1
*/
public class ApiTrafficLogs : Codable
{
    public var workspace:String
    public var entries:[ApiLogEntry] = []
    public var recordsAvailable:Int

    required public init(){}
}

public class ApiLogEntry : Codable
{
    public var id:String
    public var ruleName:String
    public var date:String
    public var workspace:String
    public var url:String
    public var method:String
    public var payload:String
    public var direction:String

    required public init(){}
}


Swift ApiTrafficLogs DTOs

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.

GET /{Workspace}/ApiTrafficLog HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv