• Document Up to Date

Get Log Events

Returns all events recorded in the Crafter Engine log for a given site in a specific time period.

Resource Information

This service uses the tomcat application on port 8080 by default. To see a list of default ports click here

The context for this API is /.

HTTP Verb
GET
URL
/api/1/monitoring/log
Response Formats
JSON

Parameters

Name
Type
Required
Description
site
String
The name of the site
since

Long


The time in milliseconds from which
events should be fetched
token
String
The authorization token

Example

Request

GET .../api/1/monitoring/log.json?site=editorial&since=1396772083660&token=defaultManagementToken

Response

Status 200 OK

 1[
 2  {
 3    "exception":"\n",
 4    "site":"editorial",
 5    "level":"INFO",
 6    "thread":"http-nio-8080-exec-6",
 7    "message":"--------------------------------------------------",
 8    "timestampm":1496849343683,
 9    "timestamp":"2017-06-07T09:29:03.683-0600"
10  },
11  {
12    "exception":"\n",
13    "site":"editorial",
14    "level":"INFO",
15    "thread":"http-nio-8080-exec-6",
16    "message":"Site context created: SiteContext{siteName='editorial', context=FileSystemContext[id='956d5fb84b63a77a74970bb378eca361', storeAdapter='org.craftercms.core.store.impl.filesystem.FileSystemContentStoreAdapter@38783f6c', storeServerUrl='null', rootFolderPath='file:../data/repos/sites/editorial/sandbox/', rootFolder=../data/repos/sites/editorial/sandbox, mergingOn=true, cacheOn=false, maxAllowedItemsInCache=0, ignoreHiddenFiles=true], fallback=false, staticAssetsPath='/static-assets', templatesPath='/', restScriptsPath='/scripts/rest', controllerScriptsPath='/scripts/controllers', configPaths=[/config/site.xml, /config/env/default/site.xml, classpath:crafter/engine/extension/sites/editorial/site.xml], applicationContextPaths=[/config/spring/application-context.xml, /config/env/default/spring/application-context.xml, classpath:crafter/engine/extension/sites/editorial/spring/application-context.xml], groovyClassesPath='/scripts/classes'}",
17    "timestampm":1496849343684,
18    "timestamp":"2017-06-07T09:29:03.684-0600"
19  },
20  {
21    "exception":"\n",
22    "site":"editorial",
23    "level":"INFO",
24    "thread":"http-nio-8080-exec-6",
25    "message":"==================================================",
26    "timestampm":1496849343684,
27    "timestamp":"2017-06-07T09:29:03.684-0600"
28  },
29  {
30    "exception":"\n",
31    "site":"editorial",
32    "level":"INFO",
33    "thread":"http-nio-8080-exec-6",
34    "message":"</Creating site context: editorial>",
35    "timestampm":1496849343684,
36    "timestamp":"2017-06-07T09:29:03.684-0600"
37  },
38  {
39    "exception":"\n",
40    "site":"editorial",
41    "level":"INFO",
42    "thread":"http-nio-8080-exec-6",
43    "message":"==================================================",
44    "timestampm":1496849343684,
45    "timestamp":"2017-06-07T09:29:03.684-0600"
46  },
47  {
48    "exception":"\n",
49    "site":"editorial",
50    "level":"INFO",
51    "thread":"http-nio-8080-exec-7",
52    "message":"Content cache and Freemarker cache have been cleared for site 'editorial'",
53    "timestampm":1496849343708,
54    "timestamp":"2017-06-07T09:29:03.708-0600"
55  }
56]

Responses

Status
Location
Response Body
200

See example above.
400

{"message":"Required String parameter 'token' is not present"}
401

{"message":"Management authorization failed, invalid token."}
500

{ "message" : "Internal server error" }