Viewtracker Add-on
Space shortcuts
Skip to end of metadata
Go to start of metadata

The endpoint of the Viewtracker API is /rest/viewtracker/1.0/

/reporting/timeline/

An endpoint to retrieve the aggregated views and unique visits per day ordered by date, filtered by spaces(see spaceKeys parameter). If parameter spaceKeys is missing return statistic globally.

Resource URL  /rest/viewtracker/1.0/reporting/timeline/

Methods: GET

 

Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)

deviceType


String

If given, the result is only for a specific device type.

Possible values: mobile, desktop

(Fehler)
spaceKeysStringIf given, filter views by spaces. Possible to specify multiple spaces separated by comma.(Fehler)

 Response

{
  "success": true,
  "error": "",
  "size": 1,
  "maxViews": 27,
  "results": [
    {
      "formattedViewDate": "Oct 31, 2017",
      "viewDate": 1509400800000,
      "uniqueUsers": 0,
      "views": 27
    }
  ],
  "total": 27,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}

/reporting/contents/{contentId}/timeline/

An endpoint to retrieve the aggregated views and unique visits per day for defined content ordered by date.

Resource URL  /rest/viewtracker/1.0/reporting/contents/{contentId}/timeline/

Methods: GET

 

Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)
deviceTypeString

If given, the result is only for a specific device type.

Possible values: mobile, desktop

(Fehler)

 Response

{
  "success": true,
  "error": "",
  "size": 1,
  "maxViews": 6,
  "results": [
    {
      "formattedViewDate": "Oct 31, 2017",
      "viewDate": 1509400800000,
      "uniqueUsers": 0,
      "views": 6
    }
  ],
  "total": 6,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}

/reporting/most-active/users/

An endpoint to retrieve the most active users filtered by spaces(see spaceKeys parameter). If parameter spaceKeys is missing return statistic globally. The return list ordered depending on sort parameter.

Resource URL  /rest/viewtracker/1.0/reporting/most-active/users/

Methods: GET

 

Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)
deviceTypeString

If given, the result is only for a specific device type.

Possible values: mobile, desktop

(Fehler)
limitIntegerThe top x users. The max accepted value is 100(Fehler)10
startIntegerWhere to start with response (used for "paging and load more features)(Fehler)0
anonymousBooleanInclude the "anonymous" views or not(Fehler)false
spaceKeysStringIf given, filter views by spaces. Possible to specify multiple spaces separated by comma.(Fehler)
sortString

 Defines an ordering behaviour. Possible values:

  • asc - the most inactive on top
  • desc - the most active on top
(Fehler)desc

 Response

{
  "start": 0,
  "limit": 10,
  "success": true,
  "error": "",
  "size": 1,
  "maxViews": 26,
  "results": [
    {
      "views": 26,
      "user": {
        "type": "known",
        "username": "admin",
        "userKey": "ff8081815d839d8f015d839e508f0002",
        "profilePicture": {
          "path": "/images/icons/profilepics/default.png",
          "width": 48,
          "height": 48,
          "isDefault": true
        },
        "displayName": "admin",
        "_links": {
          "self": "http://localhost:51080/rest/experimental/user?key=ff8081815d839d8f015d839e508f0002"
        }
      }
    }
  ],
  "total": 26,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}

 /reporting/most-active/contents/

An endpoint to retrieve the most viewed contents filtered by spaces(see parameter spaceKeys). If parameter spaceKeys is missing return statistic globally. The return list ordered depending on sort parameter.

Resource URL  /rest/viewtracker/1.0/reporting/most-active/contents/

Methods: GET

 

Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)
deviceTypeString

If given, the result is only for a specific device type.

Possible values: mobile, desktop

(Fehler)
limitIntegerThe top x content objects. max accepted value is 100(Fehler)10
startIntegerWhere to start with response (used for "paging and load more features)(Fehler)0
expandString

A comma separated list of the elements which need to expand in the response for more informations .

Values: container, metadata, operations, children, history, ancestors, body, version, descendants, space

(Fehler)
anonymousBooleanInclude the "anonymous" views or not(Fehler)false
spaceKeysStringIf given, filter views by spaces. Possible to specify multiple spaces separated by comma.(Fehler)
sortString

 Defines an ordering behaviour. Possible values:

  • asc - the most inactive on top
  • desc - the most active on top
(Fehler)desc

 Response

without expand
{
  "start": 0,
  "limit": 1,
  "success": true,
  "error": "",
  "size": 1,
  "maxViews": 6,
  "results": [
    {
      "views": 6,
      "content": {
        "id": "65573",
        "type": "page",
        "status": "current",
        "title": "Page 01",
        "extensions": {
          "position": 9
        },
        "_links": {
          "webui": "/display/ds/Page+01",
          "tinyui": "/x/JQAB",
          "self": "http://localhost:51080/rest/api/content/65573"
        },
        "_expandable": {
          "container": "/rest/api/space/ds",
          "metadata": "",
          "operations": "",
          "children": "/rest/api/content/65573/child",
          "history": "/rest/api/content/65573/history",
          "ancestors": "",
          "body": "",
          "version": "",
          "descendants": "/rest/api/content/65573/descendant",
          "space": "/rest/api/space/ds"
        }
      }
    }
  ],
  "total": 6,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}
with expand parameter 'space'
{
  "start": 0,
  "limit": 1,
  "success": true,
  "error": "",
  "size": 1,
  "maxViews": 6,
  "results": [
    {
      "views": 6,
      "content": {
        "id": "65573",
        "type": "page",
        "status": "current",
        "title": "Page 01",
        "space": {
          "id": 98305,
          "key": "ds",
          "name": "Demonstration Space",
          "type": "global",
          "_links": {
            "webui": "/display/ds",
            "self": "http://localhost:51080/rest/api/space/ds"
          },
          "_expandable": {
            "metadata": "",
            "icon": "",
            "description": "",
            "homepage": "/rest/api/content/65541"
          }
        },
        "extensions": {
          "position": 9
        },
        "_links": {
          "webui": "/display/ds/Page+01",
          "tinyui": "/x/JQAB",
          "self": "http://localhost:51080/rest/api/content/65573"
        },
        "_expandable": {
          "container": "/rest/api/space/ds",
          "metadata": "",
          "operations": "",
          "children": "/rest/api/content/65573/child",
          "history": "/rest/api/content/65573/history",
          "ancestors": "",
          "body": "",
          "version": "",
          "descendants": "/rest/api/content/65573/descendant"
        }
      }
    }
  ],
  "total": 6,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}
with expand parameter 'space.description'
{
  "start": 0,
  "limit": 1,
  "success": true,
  "error": "",
  "size": 1,
  "maxViews": 6,
  "results": [
    {
      "views": 6,
      "content": {
        "id": "65573",
        "type": "page",
        "status": "current",
        "title": "Page 01",
        "space": {
          "id": 98305,
          "key": "ds",
          "name": "Demonstration Space",
          "description": {
            "_expandable": {
              "view": "",
              "plain": ""
            }
          },
          "type": "global",
          "_links": {
            "webui": "/display/ds",
            "self": "http://localhost:51080/rest/api/space/ds"
          },
          "_expandable": {
            "metadata": "",
            "icon": "",
            "homepage": "/rest/api/content/65541"
          }
        },
        "extensions": {
          "position": 9
        },
        "_links": {
          "webui": "/display/ds/Page+01",
          "tinyui": "/x/JQAB",
          "self": "http://localhost:51080/rest/api/content/65573"
        },
        "_expandable": {
          "container": "/rest/api/space/ds",
          "metadata": "",
          "operations": "",
          "children": "/rest/api/content/65573/child",
          "history": "/rest/api/content/65573/history",
          "ancestors": "",
          "body": "",
          "version": "",
          "descendants": "/rest/api/content/65573/descendant"
        }
      }
    }
  ],
  "total": 6,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}


/reporting/most-active/spaces/

An endpoint to retrieve the most viewed spaces defined in spacekeys parameter. If parameter spaceKeys is missing return statistic globally. The return list ordered depending on sort param.

Resource URL  /rest/viewtracker/1.0/reporting/most-active/spaces/

Methods: GET

 

Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)
deviceTypeString

If given, the result is only for a specific device type.

Possible values: mobile, desktop

(Fehler)
limitIntegerThe top x content objects. max accepted value is 100(Fehler)10
startIntegerWhere to start with response (used for "paging and load more features)(Fehler)0
expandString

A comma separated list of the elements which need to expand in the response for more informations .

Values: metadata, icon, description, homepage

(Fehler)
anonymousBooleanInclude the "anonymous" views or not(Fehler)false
spaceKeysStringIf given, filter views by spaces. Possible to specify multiple spaces separated by comma.(Fehler)
sortString

Defines an ordering behaviour. Possible values:

  • asc - the most inactive on top
  • desc - the most active on top
(Fehler)desc

 Response

without expand
{
  "start": 0,
  "limit": 1,
  "success": true,
  "error": "",
  "size": 1,
  "maxViews": 146,
  "results": [
    {
      "views": 146,
      "space": {
        "id": 98305,
        "key": "ds",
        "name": "Demonstration Space",
        "type": "global",
        "_links": {
          "webui": "/display/ds",
          "self": "http://localhost:51080/rest/api/space/ds"
        },
        "_expandable": {
          "metadata": "",
          "icon": "",
          "description": "",
          "homepage": "/rest/api/content/65541"
        }
      }
    }
  ],
  "total": 146,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}
with expand 'description'
{
  "start": 0,
  "limit": 1,
  "success": true,
  "error": "",
  "size": 1,
  "maxViews": 146,
  "results": [
    {
      "views": 146,
      "space": {
        "id": 98305,
        "key": "ds",
        "name": "Demonstration Space",
        "description": {
          "_expandable": {
            "view": "",
            "plain": ""
          }
        },
        "type": "global",
        "_links": {
          "webui": "/display/ds",
          "self": "http://localhost:51080/rest/api/space/ds"
        },
        "_expandable": {
          "metadata": "",
          "icon": "",
          "homepage": "/rest/api/content/65541"
        }
      }
    }
  ],
  "total": 146,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}

/reporting/most-active/authors/

An endpoint to retrieve the most active authors filtered by spaces(see spaceKeys parameter). If parameter spaceKeys is missing return statistic globally. The return list ordered depending on sort parameter.

Resource URL  /rest/viewtracker/1.0/reporting/most-active/authors/

Methods: GET

 

Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)
limitIntegerThe top x authors. The max accepted value is 100(Fehler)10
startIntegerWhere to start with response (used for "paging and load more features)(Fehler)0
spaceKeysStringIf given, filter views by spaces. Possible to specify multiple spaces separated by comma.(Fehler)
sortString

 Defines an ordering behaviour. Possible values:

  • asc - the most inactive on top
  • desc - the most active on top
(Fehler)desc

 Response

{
  "start": 0,
  "limit": 1,
  "success": true,
  "error": "",
  "size": 1,
  "results": [
    {
      "user": {
        "type": "known",
        "username": "admin",
        "userKey": "ff8081815d839d8f015d839e508f0002",
        "profilePicture": {
          "path": "/images/icons/profilepics/default.png",
          "width": 48,
          "height": 48,
          "isDefault": true
        },
        "displayName": "admin",
        "_links": {
          "self": "http://localhost:51080/rest/experimental/user?key=ff8081815d839d8f015d839e508f0002"
        }
      },
      "views": 191,
      "pageViews": 180,
      "blogpostViews": 11
    }
  ],
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}

/reporting/views/{contentId}/

An endpoint to retrieve all views per users of a specified content ordered depending on sort parameter.

Resource URL  /rest/viewtracker/1.0/reporting/views/{contentId}/

Methods: GET

 

Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)
deviceTypeString

If given, the result is only for a specific device type.

Possible values: mobile, desktop

(Fehler)
anonymousBooleanInclude the "anonymous" views or not(Fehler)false
startIntegerWhere to start with response (used for "paging and load more features)(Fehler)0
limitIntegerThe top x user views, there is no limit of the number(Fehler)100
sortString

Defines an ordering behaviour. Possible values:

  • asc - the earliest on top
  • desc - the latest on top
(Fehler)desc

 Response

{
  "size": 1,
  "start": 0,
  "limit": 1,
  "success": true,
  "error": "",
  "firstViewDateFormatted": "Oct 31, 2017",
  "firstViewDate": 1509400800000,
  "maxViews": 67,
  "results": [
    {
      "lastViewDateFormatted": "Oct 31, 2017",
      "lastViewDate": 1509400800000,
      "views": 67,
      "user": {
        "type": "known",
        "username": "admin",
        "userKey": "ff8081815d839d8f015d839e508f0002",
        "profilePicture": {
          "path": "/images/icons/profilepics/default.png",
          "width": 48,
          "height": 48,
          "isDefault": true
        },
        "displayName": "admin",
        "_links": {
          "self": "http://localhost:51080/rest/experimental/user?key=ff8081815d839d8f015d839e508f0002"
        }
      }
    }
  ],
  "total": 67,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}

/reporting/views/{contentId}/total/

An endpoint to retrieve the total number of views for defined content.

Resource URL  /rest/viewtracker/1.0/reporting/views/{contentId}/total/

Methods: GET

 

Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)
deviceTypeString

If given, the result is only for a specific device type.

Possible values: mobile, desktop

(Fehler)

 Response

{
  "success": true,
  "error": "",
  "total": 81,
  "firstViewDateFormatted": "Sep 11, 2017",
  "firstViewDate": 1505077200000,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}

/reporting/count

An endpoint to retrieve the total number of views.

Resource URL  /rest/viewtracker/1.0/reporting/count

Methods: GET


Parameters 

ParameterTypeDescriptionRequiredDefault
startDateStringThe start date of the report in the format yyyy-MM-dd(Fehler)now() - 90 days
endDateStringThe end date of the report in the format yyyy-MM-dd(Fehler)today
contentTypeString

If given, the result is only for a specific content type.

Possible values: page, blog

(Fehler)
deviceTypeString

If given, the result is only for a specific device type.

Possible values: mobile, desktop

(Fehler)
anonymousBooleanInclude the "anonymous" views or not(Fehler)false
spaceKeysStringIf given, filter views by spaces. Possible to specify multiple spaces separated by comma.(Fehler)

 Response

{
  "success": true,
  "error": "",
  "count": 1000194,
  "_links": {
    "base": "http://localhost:51080",
    "context": ""
  }
}

  • No labels