search mobile facets autocomplete spellcheck crawler rankings weights synonyms analytics engage api customize documentation install setup technology content domains user history info home business cart chart contact email activate analyticsalt analytics autocomplete cart contact content crawling custom documentation domains email engage faceted history info install mobile person querybuilder search setup spellcheck synonyms weights engage_search_term engage_related_content engage_next_results engage_personalized_results engage_recent_results success add arrow-down arrow-left arrow-right arrow-up caret-down caret-left caret-right caret-up check close content conversions-small conversions details edit grid help small-info error live magento minus move photo pin plus preview refresh search settings small-home stat subtract text trash unpin wordpress x alert case_deflection advanced-permissions keyword-detection predictive-ai sso

API Logs

A mysterious black box can be intriguing. Less so when that black box is an integral part of your application infrastructure! App Search provides a robust endpoint for API Logs. You will always have a clear window into what is happening within your Engines.

The API Log displays API request and response data at the Engine level. This means that account-level operations, such as requests to Credentials, do not appear. What does appear? Everything else!

API Endpoint Logged?
engines Yes
documents Yes
search Yes
synonyms Yes
clickthrough Yes
analytics Yes
curations Yes
logs/api Yes
credentials No

Every authenticated GET, PUT, POST or DELETE received during a Search query, Analytics request, Document creation - any event of any kind - will be recorded within the API Log. Even requests against the API Log itself are recorded within the API Log.


API Log data is robust. The examples each show one result in full, for clarity.

Authentication

For authentication, the API Logs endpoint requires your unique Host Identifier, the name of your Engine and a Private API Key. The key begins with private- and was created for you upon account creation. You can find it, along with your Host Identifier, within the Credentials menu.

They fit into your requests like so:

curl -X GET 'https://[HOST_IDENTIFIER].api.swiftype.com/api/as/v1/engines/[ENGINE]/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [PRIVATE_API_KEY]'

API Logs

The logs/api endpoint responds to GET and POST requests. The payload you receive will include results, meta-data and page size parameters. A result will include: a time-stamp, the HTTP method, the path which the User Agent queried, a full request path for posterity, a status code, the request body and response, and the User Agent.

By default, you will receive 10 results per page in ascending order.

// An example JSON payload from the logs/api endpoint.
{
  "results": [
    {
      "timestamp": string,
      "http_method": string,
      "path": string,
      "full_request_path": string,
      "status": number,
      "request_body": string,
      "response_body": string,
      "user_agent": string
    }
  ],
  "meta": {
    "query": string,
    "filters": {
      "date": {
        "from": string,
        "to": string
      }
    },
    "page": {
      "current": number,
      "total_pages": number,
      "total_results": number,
      "size": number
    }
  }
}

Reading the API Log

For any request made against the logs/api endpoint, a time-frame must be provided.

filters/date
required
Requires a nested date object under filters containing from and to keys. The keys must contain dates formatted in accordance with RFC3339. You may omit the time: YYYY-MM-DD. Non-premium plans can query up to 24 hours. Premium plans may query up to 7 days.
GET /api/as/v1/engines/[ENGINE]/logs/api
POST /api/as/v1/engines/[ENGINE]/logs/api
Example - A GET request to receive all API Log events between July 20th to July 23rd.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-23T00:00:00+00:00"
    }
  }
}'
Example Response
{
  "results": [
    {
      "timestamp": "2018-07-20T00:13:56Z",
      "http_method": "POST",
      "path": "/api/as/v1/engines/ruby-gems/search",
      "full_request_path": "/api/as/v1/engines/ruby-gems/search",
      "status": 200,
      "request_body": "{\"search_fields\":{\"name\":{\"weight\":2.0},\"info\":{},\"authors\":{}},\"page\":{\"current\":1,\"size\":30},\"query\":\"rack\"}",
      "response_body": "{\"meta\":{\"warnings\":[],\"page\":{\"current\":1,\"total_pages\":108,\"total_results\":3212,\"size\":30},\"request_id\":\"abd16697a89f4074667cd695926f27d8\"},\"results\":[{\"name\":{\"raw\":\"rack\"},\"id\":{\"raw\":\"12785\"},\"authors\":{\"raw\":\"Christian Neukirchen\"},\"downloads\":{\"raw\":195108649.0},\"info\":{\"raw\":\"Rack pro
vides a minimal, modular and adaptable interface for developing\\nweb applications in Ruby.  By wrapping HTTP requests and responses in\\nthe simplest way possible, it unifies and distills the API for web\\nservers, web frameworks, and software in between (the so-called\\nmiddleware) into a single method call.\\n\\nAlso see https://rack.github.io/.\\n\"},\"_meta
\":{\"score\":24.994833}},{\"name\":{\"raw\":\"Rack\"},\"id\":{\"raw\":\"6510\"},\"authors\":{\"raw\":\"bonghits heavy industries, _blindwhitecrabs\"},\"downloads\":{\"raw\":127258.0},\"info\":{\"raw\":\"Rack generates racks\"},\"_meta\":{\"score\":24.994833}},{\"name\":{\"raw\":\"Rack\"},\"id\":{\"raw\":\"19293\"},\"authors\":{\"raw\":\"bonghits heavy industrie
s, _blindwhitecrabs\"},\"downloads\":{\"raw\":127258.0},\"info\":{\"raw\":\"Rack generates racks\"},\"_meta\":{\"score\":24.524525}},{\"name\":{\"raw\":\"rack\"},\"id\":{\"raw\":\"2\"},\"authors\":{\"raw\":\"Christian Neukirchen\"},\"downloads\":{\"raw\":195108649.0},\"info\":{\"raw\":\"Rack provides a minimal, modular and adaptable interface for developing\\nwe
b applications in Ruby.  By wrapping HTTP requests and responses in\\nthe simplest way possible, it unifies and distills the API for web\\nservers, web frameworks, and software in between (the so-called\\nmiddleware) into a single method call.\\n\\nAlso see https://rack.github.io/.\\n\"},\"_meta\":{\"score\":24.524525}},{\"name\":{\"raw\":\"rack-cas\"},\"id\":{\
"raw\":\"19298\"},\"authors\":{\"raw\":\"Adam Crownoble\"},\"downloads\":{\"raw\":112443.0},\"info\":{\"raw\":\"Simple CAS authentication for Rails, Sinatra or any Rack-based site\"},\"_meta\":{\"score\":17.611862}},{\"name\":{\"raw\":\"rack-app\"},\"id\":{\"raw\":\"19596\"},\"authors\":{\"raw\":\"Adam Luzsi\"},\"downloads\":{\"raw\":63672.0},\"info\":{\"raw\":\
"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!\"},\"_meta\":{\"score\":17.611862}},{\"name\":{\"raw\":\"rack-www\"},\"id\":{\"raw\":\"6767\"},\"authors\":{\"raw\":\"Jhimy Fernandes Villar\"},\"downloads\":{\"raw\":69109.0},\"info\":{\"raw\":\"Rack middleware to
 force subdomain redirects.\"},\"_meta\":{\"score\":17.611862}},{\"name\":{\"raw\":\"rack-www\"},\"id\":{\"raw\":\"19550\"},\"authors\":{\"raw\":\"Jhimy Fernandes Villar\"},\"downloads\":{\"raw\":69109.0},\"info\":{\"raw\":\"Rack middleware to force subdomain redirects.\"},\"_meta\":{\"score\":17.280138}},{\"name\":{\"raw\":\"rack-ssl\"},\"id\":{\"raw\":\"12962\
"},\"authors\":{\"raw\":\"Joshua Peek\"},\"downloads\":{\"raw\":26031354.0},\"info\":{\"raw\":\"    Rack middleware to force SSL/TLS.\\n\"},\"_meta\":{\"score\":17.280138}},{\"name\":{\"raw\":\"rack-ssl\"},\"id\":{\"raw\":\"179\"},\"authors\":{\"raw\":\"Joshua Peek\"},\"downloads\":{\"raw\":26031354.0},\"info\":{\"raw\":\"    Rack middleware to force SSL/TLS.\\n
\"},\"_meta\":{\"score\":17.280138}},{\"name\":{\"raw\":\"rack-app\"},\"id\":{\"raw\":\"6813\"},\"authors\":{\"raw\":\"Adam Luzsi\"},\"downloads\":{\"raw\":63672.0},\"info\":{\"raw\":\"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!\"},\"_meta\":{\"score\":17.280
138}},{\"name\":{\"raw\":\"rack-cas\"},\"id\":{\"raw\":\"6515\"},\"authors\":{\"raw\":\"Adam Crownoble\"},\"downloads\":{\"raw\":112443.0},\"info\":{\"raw\":\"Simple CAS authentication for Rails, Sinatra or any Rack-based site\"},\"_meta\":{\"score\":17.280138}},{\"name\":{\"raw\":\"ripl-rack\"},\"id\":{\"raw\":\"19264\"},\"authors\":{\"raw\":\"Gabriel Horner\"}
,\"downloads\":{\"raw\":152425.0},\"info\":{\"raw\":\"This ripl plugin provides a console for rack apps.\"},\"_meta\":{\"score\":17.215015}},{\"name\":{\"raw\":\"rack-jspm\"},\"id\":{\"raw\":\"18506\"},\"authors\":{\"raw\":\"Michal Cichra\"},\"downloads\":{\"raw\":28733.0},\"info\":{\"raw\":\"Aids development by adding caching headers for jspm packages\"},\"_met
a\":{\"score\":17.215015}},{\"name\":{\"raw\":\"rack-cors\"},\"id\":{\"raw\":\"59\"},\"authors\":{\"raw\":\"Calvin Yu\"},\"downloads\":{\"raw\":13088910.0},\"info\":{\"raw\":\"Middleware that will make Rack-based apps CORS compatible.  Read more here: http://blog.sourcebender.com/2010/06/09/introducin-rack-cors.html.  Fork the project here: https://github.com/cy
u/rack-cors\"},\"_meta\":{\"score\":17.215015}},{\"name\":{\"raw\":\"rack-jspm\"},\"id\":{\"raw\":\"5723\"},\"authors\":{\"raw\":\"Michal Cichra\"},\"downloads\":{\"raw\":28733.0},\"info\":{\"raw\":\"Aids development by adding caching headers for jspm packages\"},\"_meta\":{\"score\":17.215015}},{\"name\":{\"raw\":\"rack-client\"},\"id\":{\"raw\":\"19306\"},\"au
thors\":{\"raw\":\"Tim Carey-Smith\"},\"downloads\":{\"raw\":142814.0},\"info\":{\"raw\":\"A client wrapper around a Rack app or HTTP\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-jsonr\"},\"id\":{\"raw\":\"18911\"},\"authors\":{\"raw\":\"Caleb Clark\"},\"downloads\":{\"raw\":18855.0},\"info\":{\"raw\":\"A Rack middleware for providing enhanced J
SONP-type access, but with get, post, put, and delete verbs as well as http status, headers, and a json body that can be read when there are errors.\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-statsd\"},\"id\":{\"raw\":\"19330\"},\"authors\":{\"raw\":\"Ryan Tomayko, Rick Olson\"},\"downloads\":{\"raw\":118404.0},\"info\":{\"raw\":\"Tools for mo
nitoring Rack apps in production.\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"guard-rack\"},\"id\":{\"raw\":\"17521\"},\"authors\":{\"raw\":\"Daniel Doubrovkine\"},\"downloads\":{\"raw\":150904.0},\"info\":{\"raw\":\"Automatically reloads your Rack based app on file change using Guard.\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-pa
rser\"},\"id\":{\"raw\":\"13825\"},\"authors\":{\"raw\":\"Arthur Chiu\"},\"downloads\":{\"raw\":1042910.0},\"info\":{\"raw\":\"Rack Middleware for parsing post body data for json, xml and various content types\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"redis-rack\"},\"id\":{\"raw\":\"240\"},\"authors\":{\"raw\":\"Luca Guidi\"},\"downloads\":{\"raw\
":9873006.0},\"info\":{\"raw\":\"Redis Store for Rack applications\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-accept\"},\"id\":{\"raw\":\"193\"},\"authors\":{\"raw\":\"Michael Jackson\"},\"downloads\":{\"raw\":7516583.0},\"info\":{\"raw\":\"HTTP Accept, Accept-Charset, Accept-Encoding, and Accept-Language for Ruby/Rack\"},\"_meta\":{\"score\":
17.029045}},{\"name\":{\"raw\":\"rack-cache\"},\"id\":{\"raw\":\"99\"},\"authors\":{\"raw\":\"Ryan Tomayko\"},\"downloads\":{\"raw\":28462313.0},\"info\":{\"raw\":\"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) informa
tion.\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-attack\"},\"id\":{\"raw\":\"13037\"},\"authors\":{\"raw\":\"Aaron Suggs\"},\"downloads\":{\"raw\":6355728.0},\"info\":{\"raw\":\"A rack middleware for throttling and blocking abusive requests\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"redis-rack\"},\"id\":{\"raw\":\"13023\"},\"auth
ors\":{\"raw\":\"Luca Guidi\"},\"downloads\":{\"raw\":9873006.0},\"info\":{\"raw\":\"Redis Store for Rack applications\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-mount\"},\"id\":{\"raw\":\"13013\"},\"authors\":{\"raw\":\"Joshua Peek\"},\"downloads\":{\"raw\":14068812.0},\"info\":{\"raw\":\"    A stackable dynamic tree based Rack router.\\n\"},
\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-jsonp\"},\"id\":{\"raw\":\"15419\"},\"authors\":{\"raw\":\"Cyril Rohr\"},\"downloads\":{\"raw\":472707.0},\"info\":{\"raw\":\"A Rack middleware for providing JSON-P support.\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-cache\"},\"id\":{\"raw\":\"12882\"},\"authors\":{\"raw\":\"Ryan Tomay
ko\"},\"downloads\":{\"raw\":28462313.0},\"info\":{\"raw\":\"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) information.\"},\"_meta\":{\"score\":17.029045}},{\"name\":{\"raw\":\"rack-proxy\"},\"id\":{\"raw\":\"563\"},\"
authors\":{\"raw\":\"Jacek Becela\"},\"downloads\":{\"raw\":2713474.0},\"info\":{\"raw\":\"A Rack app that provides request/response rewriting proxy capabilities with streaming.\"},\"_meta\":{\"score\":17.029045}}]}",
      "user_agent": "Ruby"
  },
  ... # Truncated!
 ],
 "meta": {
   "query": "",
   "filters": {
     "date": {
       "from": "2018-07-20T00:00:00+00:00",
       "to": "2018-07-23T00:00:00+00:00"
     }
   },
   "page": {
     "current": 1,
     "total_pages": 40,
     "total_results": 400,
     "size": 10
   }
 }
}

Example - A GET request to receive all API Log events between July 20th to July 23rd.
No Java example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-23T00:00:00+00:00"
    }
  }
}'
Example Response
No Java example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-20T00:13:56Z",
      "http_method": "POST",
      "path": "/api/as/v1/engines/ruby-gems/search",
      "full_request_path": "/api/as/v1/engines/ruby-gems/search",
      "status": 200,
      "request_body": "{"search_fields":{"name":{"weight":2.0},"info":{},"authors":{}},"page":{"current":1,"size":30},"query":"rack"}",
      "response_body": "{"meta":{"warnings":[],"page":{"current":1,"total_pages":108,"total_results":3212,"size":30},"request_id":"abd16697a89f4074667cd695926f27d8"},"results":[{"name":{"raw":"rack"},"id":{"raw":"12785"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack pro
vides a minimal, modular and adaptable interface for developing\nweb applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta
":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"6510"},"authors":{"raw":"bonghits heavy industries, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"19293"},"authors":{"raw":"bonghits heavy industrie
s, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.524525}},{"name":{"raw":"rack"},"id":{"raw":"2"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack provides a minimal, modular and adaptable interface for developing\nwe
b applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta":{"score":24.524525}},{"name":{"raw":"rack-cas"},"id":{\
"raw":"19298"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-app"},"id":{"raw":"19596"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":\
"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"6767"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to
 force subdomain redirects."},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"19550"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to force subdomain redirects."},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"12962\
"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"179"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n
"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-app"},"id":{"raw":"6813"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.280
138}},{"name":{"raw":"rack-cas"},"id":{"raw":"6515"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.280138}},{"name":{"raw":"ripl-rack"},"id":{"raw":"19264"},"authors":{"raw":"Gabriel Horner"}
,"downloads":{"raw":152425.0},"info":{"raw":"This ripl plugin provides a console for rack apps."},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"18506"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_met
a":{"score":17.215015}},{"name":{"raw":"rack-cors"},"id":{"raw":"59"},"authors":{"raw":"Calvin Yu"},"downloads":{"raw":13088910.0},"info":{"raw":"Middleware that will make Rack-based apps CORS compatible.  Read more here: http://blog.sourcebender.com/2010/06/09/introducin-rack-cors.html.  Fork the project here: https://github.com/cy
u/rack-cors"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"5723"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-client"},"id":{"raw":"19306"},"au
thors":{"raw":"Tim Carey-Smith"},"downloads":{"raw":142814.0},"info":{"raw":"A client wrapper around a Rack app or HTTP"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonr"},"id":{"raw":"18911"},"authors":{"raw":"Caleb Clark"},"downloads":{"raw":18855.0},"info":{"raw":"A Rack middleware for providing enhanced J
SONP-type access, but with get, post, put, and delete verbs as well as http status, headers, and a json body that can be read when there are errors."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-statsd"},"id":{"raw":"19330"},"authors":{"raw":"Ryan Tomayko, Rick Olson"},"downloads":{"raw":118404.0},"info":{"raw":"Tools for mo
nitoring Rack apps in production."},"_meta":{"score":17.029045}},{"name":{"raw":"guard-rack"},"id":{"raw":"17521"},"authors":{"raw":"Daniel Doubrovkine"},"downloads":{"raw":150904.0},"info":{"raw":"Automatically reloads your Rack based app on file change using Guard."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-pa
rser"},"id":{"raw":"13825"},"authors":{"raw":"Arthur Chiu"},"downloads":{"raw":1042910.0},"info":{"raw":"Rack Middleware for parsing post body data for json, xml and various content types"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"240"},"authors":{"raw":"Luca Guidi"},"downloads":{"raw\
":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-accept"},"id":{"raw":"193"},"authors":{"raw":"Michael Jackson"},"downloads":{"raw":7516583.0},"info":{"raw":"HTTP Accept, Accept-Charset, Accept-Encoding, and Accept-Language for Ruby/Rack"},"_meta":{"score":
17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"99"},"authors":{"raw":"Ryan Tomayko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) informa
tion."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-attack"},"id":{"raw":"13037"},"authors":{"raw":"Aaron Suggs"},"downloads":{"raw":6355728.0},"info":{"raw":"A rack middleware for throttling and blocking abusive requests"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"13023"},"auth
ors":{"raw":"Luca Guidi"},"downloads":{"raw":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-mount"},"id":{"raw":"13013"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":14068812.0},"info":{"raw":"    A stackable dynamic tree based Rack router.\n"},
"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonp"},"id":{"raw":"15419"},"authors":{"raw":"Cyril Rohr"},"downloads":{"raw":472707.0},"info":{"raw":"A Rack middleware for providing JSON-P support."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"12882"},"authors":{"raw":"Ryan Tomay
ko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) information."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-proxy"},"id":{"raw":"563"},"
authors":{"raw":"Jacek Becela"},"downloads":{"raw":2713474.0},"info":{"raw":"A Rack app that provides request/response rewriting proxy capabilities with streaming."},"_meta":{"score":17.029045}}]}",
      "user_agent": "Ruby"
  },
  ... # Truncated!
 ],
 "meta": {
   "query": "",
   "filters": {
     "date": {
       "from": "2018-07-20T00:00:00+00:00",
       "to": "2018-07-23T00:00:00+00:00"
     }
   },
   "page": {
     "current": 1,
     "total_pages": 40,
     "total_results": 400,
     "size": 10
   }
 }
}

Example - A GET request to receive all API Log events between July 20th to July 23rd.
No Node example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-23T00:00:00+00:00"
    }
  }
}'
Example Response
No Node example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-20T00:13:56Z",
      "http_method": "POST",
      "path": "/api/as/v1/engines/ruby-gems/search",
      "full_request_path": "/api/as/v1/engines/ruby-gems/search",
      "status": 200,
      "request_body": "{"search_fields":{"name":{"weight":2.0},"info":{},"authors":{}},"page":{"current":1,"size":30},"query":"rack"}",
      "response_body": "{"meta":{"warnings":[],"page":{"current":1,"total_pages":108,"total_results":3212,"size":30},"request_id":"abd16697a89f4074667cd695926f27d8"},"results":[{"name":{"raw":"rack"},"id":{"raw":"12785"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack pro
vides a minimal, modular and adaptable interface for developing\nweb applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta
":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"6510"},"authors":{"raw":"bonghits heavy industries, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"19293"},"authors":{"raw":"bonghits heavy industrie
s, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.524525}},{"name":{"raw":"rack"},"id":{"raw":"2"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack provides a minimal, modular and adaptable interface for developing\nwe
b applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta":{"score":24.524525}},{"name":{"raw":"rack-cas"},"id":{\
"raw":"19298"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-app"},"id":{"raw":"19596"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":\
"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"6767"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to
 force subdomain redirects."},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"19550"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to force subdomain redirects."},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"12962\
"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"179"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n
"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-app"},"id":{"raw":"6813"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.280
138}},{"name":{"raw":"rack-cas"},"id":{"raw":"6515"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.280138}},{"name":{"raw":"ripl-rack"},"id":{"raw":"19264"},"authors":{"raw":"Gabriel Horner"}
,"downloads":{"raw":152425.0},"info":{"raw":"This ripl plugin provides a console for rack apps."},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"18506"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_met
a":{"score":17.215015}},{"name":{"raw":"rack-cors"},"id":{"raw":"59"},"authors":{"raw":"Calvin Yu"},"downloads":{"raw":13088910.0},"info":{"raw":"Middleware that will make Rack-based apps CORS compatible.  Read more here: http://blog.sourcebender.com/2010/06/09/introducin-rack-cors.html.  Fork the project here: https://github.com/cy
u/rack-cors"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"5723"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-client"},"id":{"raw":"19306"},"au
thors":{"raw":"Tim Carey-Smith"},"downloads":{"raw":142814.0},"info":{"raw":"A client wrapper around a Rack app or HTTP"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonr"},"id":{"raw":"18911"},"authors":{"raw":"Caleb Clark"},"downloads":{"raw":18855.0},"info":{"raw":"A Rack middleware for providing enhanced J
SONP-type access, but with get, post, put, and delete verbs as well as http status, headers, and a json body that can be read when there are errors."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-statsd"},"id":{"raw":"19330"},"authors":{"raw":"Ryan Tomayko, Rick Olson"},"downloads":{"raw":118404.0},"info":{"raw":"Tools for mo
nitoring Rack apps in production."},"_meta":{"score":17.029045}},{"name":{"raw":"guard-rack"},"id":{"raw":"17521"},"authors":{"raw":"Daniel Doubrovkine"},"downloads":{"raw":150904.0},"info":{"raw":"Automatically reloads your Rack based app on file change using Guard."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-pa
rser"},"id":{"raw":"13825"},"authors":{"raw":"Arthur Chiu"},"downloads":{"raw":1042910.0},"info":{"raw":"Rack Middleware for parsing post body data for json, xml and various content types"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"240"},"authors":{"raw":"Luca Guidi"},"downloads":{"raw\
":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-accept"},"id":{"raw":"193"},"authors":{"raw":"Michael Jackson"},"downloads":{"raw":7516583.0},"info":{"raw":"HTTP Accept, Accept-Charset, Accept-Encoding, and Accept-Language for Ruby/Rack"},"_meta":{"score":
17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"99"},"authors":{"raw":"Ryan Tomayko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) informa
tion."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-attack"},"id":{"raw":"13037"},"authors":{"raw":"Aaron Suggs"},"downloads":{"raw":6355728.0},"info":{"raw":"A rack middleware for throttling and blocking abusive requests"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"13023"},"auth
ors":{"raw":"Luca Guidi"},"downloads":{"raw":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-mount"},"id":{"raw":"13013"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":14068812.0},"info":{"raw":"    A stackable dynamic tree based Rack router.\n"},
"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonp"},"id":{"raw":"15419"},"authors":{"raw":"Cyril Rohr"},"downloads":{"raw":472707.0},"info":{"raw":"A Rack middleware for providing JSON-P support."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"12882"},"authors":{"raw":"Ryan Tomay
ko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) information."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-proxy"},"id":{"raw":"563"},"
authors":{"raw":"Jacek Becela"},"downloads":{"raw":2713474.0},"info":{"raw":"A Rack app that provides request/response rewriting proxy capabilities with streaming."},"_meta":{"score":17.029045}}]}",
      "user_agent": "Ruby"
  },
  ... # Truncated!
 ],
 "meta": {
   "query": "",
   "filters": {
     "date": {
       "from": "2018-07-20T00:00:00+00:00",
       "to": "2018-07-23T00:00:00+00:00"
     }
   },
   "page": {
     "current": 1,
     "total_pages": 40,
     "total_results": 400,
     "size": 10
   }
 }
}

Example - A GET request to receive all API Log events between July 20th to July 23rd.
No Ruby example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-23T00:00:00+00:00"
    }
  }
}'
Example Response
No Ruby example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-20T00:13:56Z",
      "http_method": "POST",
      "path": "/api/as/v1/engines/ruby-gems/search",
      "full_request_path": "/api/as/v1/engines/ruby-gems/search",
      "status": 200,
      "request_body": "{"search_fields":{"name":{"weight":2.0},"info":{},"authors":{}},"page":{"current":1,"size":30},"query":"rack"}",
      "response_body": "{"meta":{"warnings":[],"page":{"current":1,"total_pages":108,"total_results":3212,"size":30},"request_id":"abd16697a89f4074667cd695926f27d8"},"results":[{"name":{"raw":"rack"},"id":{"raw":"12785"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack pro
vides a minimal, modular and adaptable interface for developing\nweb applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta
":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"6510"},"authors":{"raw":"bonghits heavy industries, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"19293"},"authors":{"raw":"bonghits heavy industrie
s, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.524525}},{"name":{"raw":"rack"},"id":{"raw":"2"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack provides a minimal, modular and adaptable interface for developing\nwe
b applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta":{"score":24.524525}},{"name":{"raw":"rack-cas"},"id":{\
"raw":"19298"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-app"},"id":{"raw":"19596"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":\
"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"6767"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to
 force subdomain redirects."},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"19550"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to force subdomain redirects."},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"12962\
"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"179"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n
"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-app"},"id":{"raw":"6813"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.280
138}},{"name":{"raw":"rack-cas"},"id":{"raw":"6515"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.280138}},{"name":{"raw":"ripl-rack"},"id":{"raw":"19264"},"authors":{"raw":"Gabriel Horner"}
,"downloads":{"raw":152425.0},"info":{"raw":"This ripl plugin provides a console for rack apps."},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"18506"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_met
a":{"score":17.215015}},{"name":{"raw":"rack-cors"},"id":{"raw":"59"},"authors":{"raw":"Calvin Yu"},"downloads":{"raw":13088910.0},"info":{"raw":"Middleware that will make Rack-based apps CORS compatible.  Read more here: http://blog.sourcebender.com/2010/06/09/introducin-rack-cors.html.  Fork the project here: https://github.com/cy
u/rack-cors"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"5723"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-client"},"id":{"raw":"19306"},"au
thors":{"raw":"Tim Carey-Smith"},"downloads":{"raw":142814.0},"info":{"raw":"A client wrapper around a Rack app or HTTP"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonr"},"id":{"raw":"18911"},"authors":{"raw":"Caleb Clark"},"downloads":{"raw":18855.0},"info":{"raw":"A Rack middleware for providing enhanced J
SONP-type access, but with get, post, put, and delete verbs as well as http status, headers, and a json body that can be read when there are errors."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-statsd"},"id":{"raw":"19330"},"authors":{"raw":"Ryan Tomayko, Rick Olson"},"downloads":{"raw":118404.0},"info":{"raw":"Tools for mo
nitoring Rack apps in production."},"_meta":{"score":17.029045}},{"name":{"raw":"guard-rack"},"id":{"raw":"17521"},"authors":{"raw":"Daniel Doubrovkine"},"downloads":{"raw":150904.0},"info":{"raw":"Automatically reloads your Rack based app on file change using Guard."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-pa
rser"},"id":{"raw":"13825"},"authors":{"raw":"Arthur Chiu"},"downloads":{"raw":1042910.0},"info":{"raw":"Rack Middleware for parsing post body data for json, xml and various content types"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"240"},"authors":{"raw":"Luca Guidi"},"downloads":{"raw\
":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-accept"},"id":{"raw":"193"},"authors":{"raw":"Michael Jackson"},"downloads":{"raw":7516583.0},"info":{"raw":"HTTP Accept, Accept-Charset, Accept-Encoding, and Accept-Language for Ruby/Rack"},"_meta":{"score":
17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"99"},"authors":{"raw":"Ryan Tomayko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) informa
tion."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-attack"},"id":{"raw":"13037"},"authors":{"raw":"Aaron Suggs"},"downloads":{"raw":6355728.0},"info":{"raw":"A rack middleware for throttling and blocking abusive requests"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"13023"},"auth
ors":{"raw":"Luca Guidi"},"downloads":{"raw":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-mount"},"id":{"raw":"13013"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":14068812.0},"info":{"raw":"    A stackable dynamic tree based Rack router.\n"},
"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonp"},"id":{"raw":"15419"},"authors":{"raw":"Cyril Rohr"},"downloads":{"raw":472707.0},"info":{"raw":"A Rack middleware for providing JSON-P support."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"12882"},"authors":{"raw":"Ryan Tomay
ko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) information."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-proxy"},"id":{"raw":"563"},"
authors":{"raw":"Jacek Becela"},"downloads":{"raw":2713474.0},"info":{"raw":"A Rack app that provides request/response rewriting proxy capabilities with streaming."},"_meta":{"score":17.029045}}]}",
      "user_agent": "Ruby"
  },
  ... # Truncated!
 ],
 "meta": {
   "query": "",
   "filters": {
     "date": {
       "from": "2018-07-20T00:00:00+00:00",
       "to": "2018-07-23T00:00:00+00:00"
     }
   },
   "page": {
     "current": 1,
     "total_pages": 40,
     "total_results": 400,
     "size": 10
   }
 }
}

Example - A GET request to receive all API Log events between July 20th to July 23rd.
No Python example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-23T00:00:00+00:00"
    }
  }
}'
Example Response
No Python example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-20T00:13:56Z",
      "http_method": "POST",
      "path": "/api/as/v1/engines/ruby-gems/search",
      "full_request_path": "/api/as/v1/engines/ruby-gems/search",
      "status": 200,
      "request_body": "{"search_fields":{"name":{"weight":2.0},"info":{},"authors":{}},"page":{"current":1,"size":30},"query":"rack"}",
      "response_body": "{"meta":{"warnings":[],"page":{"current":1,"total_pages":108,"total_results":3212,"size":30},"request_id":"abd16697a89f4074667cd695926f27d8"},"results":[{"name":{"raw":"rack"},"id":{"raw":"12785"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack pro
vides a minimal, modular and adaptable interface for developing\nweb applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta
":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"6510"},"authors":{"raw":"bonghits heavy industries, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"19293"},"authors":{"raw":"bonghits heavy industrie
s, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.524525}},{"name":{"raw":"rack"},"id":{"raw":"2"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack provides a minimal, modular and adaptable interface for developing\nwe
b applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta":{"score":24.524525}},{"name":{"raw":"rack-cas"},"id":{\
"raw":"19298"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-app"},"id":{"raw":"19596"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":\
"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"6767"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to
 force subdomain redirects."},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"19550"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to force subdomain redirects."},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"12962\
"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"179"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n
"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-app"},"id":{"raw":"6813"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.280
138}},{"name":{"raw":"rack-cas"},"id":{"raw":"6515"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.280138}},{"name":{"raw":"ripl-rack"},"id":{"raw":"19264"},"authors":{"raw":"Gabriel Horner"}
,"downloads":{"raw":152425.0},"info":{"raw":"This ripl plugin provides a console for rack apps."},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"18506"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_met
a":{"score":17.215015}},{"name":{"raw":"rack-cors"},"id":{"raw":"59"},"authors":{"raw":"Calvin Yu"},"downloads":{"raw":13088910.0},"info":{"raw":"Middleware that will make Rack-based apps CORS compatible.  Read more here: http://blog.sourcebender.com/2010/06/09/introducin-rack-cors.html.  Fork the project here: https://github.com/cy
u/rack-cors"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"5723"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-client"},"id":{"raw":"19306"},"au
thors":{"raw":"Tim Carey-Smith"},"downloads":{"raw":142814.0},"info":{"raw":"A client wrapper around a Rack app or HTTP"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonr"},"id":{"raw":"18911"},"authors":{"raw":"Caleb Clark"},"downloads":{"raw":18855.0},"info":{"raw":"A Rack middleware for providing enhanced J
SONP-type access, but with get, post, put, and delete verbs as well as http status, headers, and a json body that can be read when there are errors."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-statsd"},"id":{"raw":"19330"},"authors":{"raw":"Ryan Tomayko, Rick Olson"},"downloads":{"raw":118404.0},"info":{"raw":"Tools for mo
nitoring Rack apps in production."},"_meta":{"score":17.029045}},{"name":{"raw":"guard-rack"},"id":{"raw":"17521"},"authors":{"raw":"Daniel Doubrovkine"},"downloads":{"raw":150904.0},"info":{"raw":"Automatically reloads your Rack based app on file change using Guard."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-pa
rser"},"id":{"raw":"13825"},"authors":{"raw":"Arthur Chiu"},"downloads":{"raw":1042910.0},"info":{"raw":"Rack Middleware for parsing post body data for json, xml and various content types"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"240"},"authors":{"raw":"Luca Guidi"},"downloads":{"raw\
":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-accept"},"id":{"raw":"193"},"authors":{"raw":"Michael Jackson"},"downloads":{"raw":7516583.0},"info":{"raw":"HTTP Accept, Accept-Charset, Accept-Encoding, and Accept-Language for Ruby/Rack"},"_meta":{"score":
17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"99"},"authors":{"raw":"Ryan Tomayko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) informa
tion."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-attack"},"id":{"raw":"13037"},"authors":{"raw":"Aaron Suggs"},"downloads":{"raw":6355728.0},"info":{"raw":"A rack middleware for throttling and blocking abusive requests"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"13023"},"auth
ors":{"raw":"Luca Guidi"},"downloads":{"raw":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-mount"},"id":{"raw":"13013"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":14068812.0},"info":{"raw":"    A stackable dynamic tree based Rack router.\n"},
"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonp"},"id":{"raw":"15419"},"authors":{"raw":"Cyril Rohr"},"downloads":{"raw":472707.0},"info":{"raw":"A Rack middleware for providing JSON-P support."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"12882"},"authors":{"raw":"Ryan Tomay
ko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) information."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-proxy"},"id":{"raw":"563"},"
authors":{"raw":"Jacek Becela"},"downloads":{"raw":2713474.0},"info":{"raw":"A Rack app that provides request/response rewriting proxy capabilities with streaming."},"_meta":{"score":17.029045}}]}",
      "user_agent": "Ruby"
  },
  ... # Truncated!
 ],
 "meta": {
   "query": "",
   "filters": {
     "date": {
       "from": "2018-07-20T00:00:00+00:00",
       "to": "2018-07-23T00:00:00+00:00"
     }
   },
   "page": {
     "current": 1,
     "total_pages": 40,
     "total_results": 400,
     "size": 10
   }
 }
}

Example - A GET request to receive all API Log events between July 20th to July 23rd.
No Javascript example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-23T00:00:00+00:00"
    }
  }
}'
Example Response
No Javascript example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-20T00:13:56Z",
      "http_method": "POST",
      "path": "/api/as/v1/engines/ruby-gems/search",
      "full_request_path": "/api/as/v1/engines/ruby-gems/search",
      "status": 200,
      "request_body": "{"search_fields":{"name":{"weight":2.0},"info":{},"authors":{}},"page":{"current":1,"size":30},"query":"rack"}",
      "response_body": "{"meta":{"warnings":[],"page":{"current":1,"total_pages":108,"total_results":3212,"size":30},"request_id":"abd16697a89f4074667cd695926f27d8"},"results":[{"name":{"raw":"rack"},"id":{"raw":"12785"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack pro
vides a minimal, modular and adaptable interface for developing\nweb applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta
":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"6510"},"authors":{"raw":"bonghits heavy industries, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.994833}},{"name":{"raw":"Rack"},"id":{"raw":"19293"},"authors":{"raw":"bonghits heavy industrie
s, _blindwhitecrabs"},"downloads":{"raw":127258.0},"info":{"raw":"Rack generates racks"},"_meta":{"score":24.524525}},{"name":{"raw":"rack"},"id":{"raw":"2"},"authors":{"raw":"Christian Neukirchen"},"downloads":{"raw":195108649.0},"info":{"raw":"Rack provides a minimal, modular and adaptable interface for developing\nwe
b applications in Ruby.  By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n\nAlso see https://rack.github.io/.\n"},"_meta":{"score":24.524525}},{"name":{"raw":"rack-cas"},"id":{\
"raw":"19298"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-app"},"id":{"raw":"19596"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":\
"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"6767"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to
 force subdomain redirects."},"_meta":{"score":17.611862}},{"name":{"raw":"rack-www"},"id":{"raw":"19550"},"authors":{"raw":"Jhimy Fernandes Villar"},"downloads":{"raw":69109.0},"info":{"raw":"Rack middleware to force subdomain redirects."},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"12962\
"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-ssl"},"id":{"raw":"179"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":26031354.0},"info":{"raw":"    Rack middleware to force SSL/TLS.\n
"},"_meta":{"score":17.280138}},{"name":{"raw":"rack-app"},"id":{"raw":"6813"},"authors":{"raw":"Adam Luzsi"},"downloads":{"raw":63672.0},"info":{"raw":"Your next favourite rack based micro framework that is totally addition free! Have a cup of awesomeness with your to performance designed framework!"},"_meta":{"score":17.280
138}},{"name":{"raw":"rack-cas"},"id":{"raw":"6515"},"authors":{"raw":"Adam Crownoble"},"downloads":{"raw":112443.0},"info":{"raw":"Simple CAS authentication for Rails, Sinatra or any Rack-based site"},"_meta":{"score":17.280138}},{"name":{"raw":"ripl-rack"},"id":{"raw":"19264"},"authors":{"raw":"Gabriel Horner"}
,"downloads":{"raw":152425.0},"info":{"raw":"This ripl plugin provides a console for rack apps."},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"18506"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_met
a":{"score":17.215015}},{"name":{"raw":"rack-cors"},"id":{"raw":"59"},"authors":{"raw":"Calvin Yu"},"downloads":{"raw":13088910.0},"info":{"raw":"Middleware that will make Rack-based apps CORS compatible.  Read more here: http://blog.sourcebender.com/2010/06/09/introducin-rack-cors.html.  Fork the project here: https://github.com/cy
u/rack-cors"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-jspm"},"id":{"raw":"5723"},"authors":{"raw":"Michal Cichra"},"downloads":{"raw":28733.0},"info":{"raw":"Aids development by adding caching headers for jspm packages"},"_meta":{"score":17.215015}},{"name":{"raw":"rack-client"},"id":{"raw":"19306"},"au
thors":{"raw":"Tim Carey-Smith"},"downloads":{"raw":142814.0},"info":{"raw":"A client wrapper around a Rack app or HTTP"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonr"},"id":{"raw":"18911"},"authors":{"raw":"Caleb Clark"},"downloads":{"raw":18855.0},"info":{"raw":"A Rack middleware for providing enhanced J
SONP-type access, but with get, post, put, and delete verbs as well as http status, headers, and a json body that can be read when there are errors."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-statsd"},"id":{"raw":"19330"},"authors":{"raw":"Ryan Tomayko, Rick Olson"},"downloads":{"raw":118404.0},"info":{"raw":"Tools for mo
nitoring Rack apps in production."},"_meta":{"score":17.029045}},{"name":{"raw":"guard-rack"},"id":{"raw":"17521"},"authors":{"raw":"Daniel Doubrovkine"},"downloads":{"raw":150904.0},"info":{"raw":"Automatically reloads your Rack based app on file change using Guard."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-pa
rser"},"id":{"raw":"13825"},"authors":{"raw":"Arthur Chiu"},"downloads":{"raw":1042910.0},"info":{"raw":"Rack Middleware for parsing post body data for json, xml and various content types"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"240"},"authors":{"raw":"Luca Guidi"},"downloads":{"raw\
":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-accept"},"id":{"raw":"193"},"authors":{"raw":"Michael Jackson"},"downloads":{"raw":7516583.0},"info":{"raw":"HTTP Accept, Accept-Charset, Accept-Encoding, and Accept-Language for Ruby/Rack"},"_meta":{"score":
17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"99"},"authors":{"raw":"Ryan Tomayko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) informa
tion."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-attack"},"id":{"raw":"13037"},"authors":{"raw":"Aaron Suggs"},"downloads":{"raw":6355728.0},"info":{"raw":"A rack middleware for throttling and blocking abusive requests"},"_meta":{"score":17.029045}},{"name":{"raw":"redis-rack"},"id":{"raw":"13023"},"auth
ors":{"raw":"Luca Guidi"},"downloads":{"raw":9873006.0},"info":{"raw":"Redis Store for Rack applications"},"_meta":{"score":17.029045}},{"name":{"raw":"rack-mount"},"id":{"raw":"13013"},"authors":{"raw":"Joshua Peek"},"downloads":{"raw":14068812.0},"info":{"raw":"    A stackable dynamic tree based Rack router.\n"},
"_meta":{"score":17.029045}},{"name":{"raw":"rack-jsonp"},"id":{"raw":"15419"},"authors":{"raw":"Cyril Rohr"},"downloads":{"raw":472707.0},"info":{"raw":"A Rack middleware for providing JSON-P support."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-cache"},"id":{"raw":"12882"},"authors":{"raw":"Ryan Tomay
ko"},"downloads":{"raw":28462313.0},"info":{"raw":"Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) information."},"_meta":{"score":17.029045}},{"name":{"raw":"rack-proxy"},"id":{"raw":"563"},"
authors":{"raw":"Jacek Becela"},"downloads":{"raw":2713474.0},"info":{"raw":"A Rack app that provides request/response rewriting proxy capabilities with streaming."},"_meta":{"score":17.029045}}]}",
      "user_agent": "Ruby"
  },
  ... # Truncated!
 ],
 "meta": {
   "query": "",
   "filters": {
     "date": {
       "from": "2018-07-20T00:00:00+00:00",
       "to": "2018-07-23T00:00:00+00:00"
     }
   },
   "page": {
     "current": 1,
     "total_pages": 40,
     "total_results": 400,
     "size": 10
   }
 }
}

Parameterizing the API Log

query
optional
You can search over the full_request_path of an API Log event. Use this when you would like to specify a particular endpoint, like analytics, search, curations and so on.
sort_direction
optional
Would you like to have your results ascending, oldest to newest, or descending, newest to oldest? The key accepts asc or desc. Defaults to ascending.
page
optional
Can provide...
current for current page
total_pages for the net number of pages
total_results for the overall number of results
size for the amount of results per page.
Expects integers within all fields.
GET /api/as/v1/engines/[ENGINE]/logs/api
POST /api/as/v1/engines/[ENGINE]/logs/api
Example - A GET request for 5 pages of analytics events between July 20th and 25th with 20 results on each page, in descending order.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-25T00:00:00+00:00"
    }
  },
  "page": {
    "total_results": 100,
    "size": 20
  },
  "query": "analytics",
  "sort_direction": "desc"
}'
Example Response
{
  "results": [
    {
      "timestamp": "2018-07-24T22:58:51Z",
      "http_method": "GET",
      "path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "full_request_path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "status": 200,
      "request_body": "",
      "response_body": "{\"meta\":{\"page\":{\"size\":10,\"current\":1}},\"results\":[{\"term\":\"rack\",\"clicks\":0,\"queries\":8},{\"term\":\"rake\",\"clicks\":0,\"queries\":5},{\"term\":\"ccheese\",\"clicks\":0,\"queries\":2},{\"term\":\"spark\",\"clicks\":0,\"queries\":2},{\"term\":\"swiftype\",\"clicks\":0,\"queries\":2},{\"term\":\"</html>\",\"clicks\":0,
\"queries\":1},{\"term\":\"boo\",\"clicks\":0,\"queries\":1},{\"term\":\"boop\",\"clicks\":0,\"queries\":1},{\"term\":\"doop\",\"clicks\":0,\"queries\":1},{\"term\":\"hello kellen\",\"clicks\":0,\"queries\":1}]}",
      "user_agent": "curl/7.54.0"
    },
    ... # Truncated!
  ],
  "meta": {
    "query": "analytics",
    "filters": {
      "date": {
        "from": "2018-07-20T00:00:00+00:00",
        "to": "2018-07-25T00:00:00+00:00"
      }
    },
    "page": {
      "current": 1,
      "total_pages": 5,
      "total_results": 100,
      "size": 20
    }
  }
}

Example - A GET request for 5 pages of analytics events between July 20th and 25th with 20 results on each page, in descending order.
No Java example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-25T00:00:00+00:00"
    }
  },
  "page": {
    "total_results": 100,
    "size": 20
  },
  "query": "analytics",
  "sort_direction": "desc"
}'
Example Response
No Java example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-24T22:58:51Z",
      "http_method": "GET",
      "path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "full_request_path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "status": 200,
      "request_body": "",
      "response_body": "{&quot;meta&quot;:{&quot;page&quot;:{&quot;size&quot;:10,&quot;current&quot;:1}},&quot;results&quot;:[{&quot;term&quot;:&quot;rack&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:8},{&quot;term&quot;:&quot;rake&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:5},{&quot;term&quot;:&quot;ccheese&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;spark&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;swiftype&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;</html>&quot;,&quot;clicks&quot;:0,
&quot;queries&quot;:1},{&quot;term&quot;:&quot;boo&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;boop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;doop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;hello kellen&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1}]}",
      "user_agent": "curl/7.54.0"
    },
    ... # Truncated!
  ],
  "meta": {
    "query": "analytics",
    "filters": {
      "date": {
        "from": "2018-07-20T00:00:00+00:00",
        "to": "2018-07-25T00:00:00+00:00"
      }
    },
    "page": {
      "current": 1,
      "total_pages": 5,
      "total_results": 100,
      "size": 20
    }
  }
}

Example - A GET request for 5 pages of analytics events between July 20th and 25th with 20 results on each page, in descending order.
No Node example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-25T00:00:00+00:00"
    }
  },
  "page": {
    "total_results": 100,
    "size": 20
  },
  "query": "analytics",
  "sort_direction": "desc"
}'
Example Response
No Node example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-24T22:58:51Z",
      "http_method": "GET",
      "path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "full_request_path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "status": 200,
      "request_body": "",
      "response_body": "{&quot;meta&quot;:{&quot;page&quot;:{&quot;size&quot;:10,&quot;current&quot;:1}},&quot;results&quot;:[{&quot;term&quot;:&quot;rack&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:8},{&quot;term&quot;:&quot;rake&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:5},{&quot;term&quot;:&quot;ccheese&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;spark&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;swiftype&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;</html>&quot;,&quot;clicks&quot;:0,
&quot;queries&quot;:1},{&quot;term&quot;:&quot;boo&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;boop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;doop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;hello kellen&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1}]}",
      "user_agent": "curl/7.54.0"
    },
    ... # Truncated!
  ],
  "meta": {
    "query": "analytics",
    "filters": {
      "date": {
        "from": "2018-07-20T00:00:00+00:00",
        "to": "2018-07-25T00:00:00+00:00"
      }
    },
    "page": {
      "current": 1,
      "total_pages": 5,
      "total_results": 100,
      "size": 20
    }
  }
}

Example - A GET request for 5 pages of analytics events between July 20th and 25th with 20 results on each page, in descending order.
No Ruby example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-25T00:00:00+00:00"
    }
  },
  "page": {
    "total_results": 100,
    "size": 20
  },
  "query": "analytics",
  "sort_direction": "desc"
}'
Example Response
No Ruby example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-24T22:58:51Z",
      "http_method": "GET",
      "path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "full_request_path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "status": 200,
      "request_body": "",
      "response_body": "{&quot;meta&quot;:{&quot;page&quot;:{&quot;size&quot;:10,&quot;current&quot;:1}},&quot;results&quot;:[{&quot;term&quot;:&quot;rack&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:8},{&quot;term&quot;:&quot;rake&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:5},{&quot;term&quot;:&quot;ccheese&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;spark&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;swiftype&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;</html>&quot;,&quot;clicks&quot;:0,
&quot;queries&quot;:1},{&quot;term&quot;:&quot;boo&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;boop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;doop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;hello kellen&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1}]}",
      "user_agent": "curl/7.54.0"
    },
    ... # Truncated!
  ],
  "meta": {
    "query": "analytics",
    "filters": {
      "date": {
        "from": "2018-07-20T00:00:00+00:00",
        "to": "2018-07-25T00:00:00+00:00"
      }
    },
    "page": {
      "current": 1,
      "total_pages": 5,
      "total_results": 100,
      "size": 20
    }
  }
}

Example - A GET request for 5 pages of analytics events between July 20th and 25th with 20 results on each page, in descending order.
No Python example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-25T00:00:00+00:00"
    }
  },
  "page": {
    "total_results": 100,
    "size": 20
  },
  "query": "analytics",
  "sort_direction": "desc"
}'
Example Response
No Python example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-24T22:58:51Z",
      "http_method": "GET",
      "path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "full_request_path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "status": 200,
      "request_body": "",
      "response_body": "{&quot;meta&quot;:{&quot;page&quot;:{&quot;size&quot;:10,&quot;current&quot;:1}},&quot;results&quot;:[{&quot;term&quot;:&quot;rack&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:8},{&quot;term&quot;:&quot;rake&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:5},{&quot;term&quot;:&quot;ccheese&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;spark&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;swiftype&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;</html>&quot;,&quot;clicks&quot;:0,
&quot;queries&quot;:1},{&quot;term&quot;:&quot;boo&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;boop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;doop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;hello kellen&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1}]}",
      "user_agent": "curl/7.54.0"
    },
    ... # Truncated!
  ],
  "meta": {
    "query": "analytics",
    "filters": {
      "date": {
        "from": "2018-07-20T00:00:00+00:00",
        "to": "2018-07-25T00:00:00+00:00"
      }
    },
    "page": {
      "current": 1,
      "total_pages": 5,
      "total_results": 100,
      "size": 20
    }
  }
}

Example - A GET request for 5 pages of analytics events between July 20th and 25th with 20 results on each page, in descending order.
No Javascript example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/ruby-gems/logs/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxx' \
-d '{
  "filters": {
    "date": {
      "from": "2018-07-20T00:00:00+00:00",
      "to": "2018-07-25T00:00:00+00:00"
    }
  },
  "page": {
    "total_results": 100,
    "size": 20
  },
  "query": "analytics",
  "sort_direction": "desc"
}'
Example Response
No Javascript example available, showing cURL
{
  "results": [
    {
      "timestamp": "2018-07-24T22:58:51Z",
      "http_method": "GET",
      "path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "full_request_path": "/api/as/v1/engines/ruby-gems/analytics/queries",
      "status": 200,
      "request_body": "",
      "response_body": "{&quot;meta&quot;:{&quot;page&quot;:{&quot;size&quot;:10,&quot;current&quot;:1}},&quot;results&quot;:[{&quot;term&quot;:&quot;rack&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:8},{&quot;term&quot;:&quot;rake&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:5},{&quot;term&quot;:&quot;ccheese&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;spark&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;swiftype&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:2},{&quot;term&quot;:&quot;</html>&quot;,&quot;clicks&quot;:0,
&quot;queries&quot;:1},{&quot;term&quot;:&quot;boo&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;boop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;doop&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1},{&quot;term&quot;:&quot;hello kellen&quot;,&quot;clicks&quot;:0,&quot;queries&quot;:1}]}",
      "user_agent": "curl/7.54.0"
    },
    ... # Truncated!
  ],
  "meta": {
    "query": "analytics",
    "filters": {
      "date": {
        "from": "2018-07-20T00:00:00+00:00",
        "to": "2018-07-25T00:00:00+00:00"
      }
    },
    "page": {
      "current": 1,
      "total_pages": 5,
      "total_results": 100,
      "size": 20
    }
  }
}

What's Next?

Your API Log is a well-spring of valuable Engine-level insight. If you want to start looking deeper into how visitors run queries against your Engines, the Analytics and Clickthrough endpoints are worth exploring. If you want to start improving the relevance of your queries, Synonyms are an excellent place to start.


Stuck? Looking for help? Contact Support!