Page Stats - Get

Returns page detail corresponding to Page ID.

GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/stats?api-version=6.0-preview.1
GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/stats?pageViewsForDays={pageViewsForDays}&api-version=6.0-preview.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

pageId
path True

integer

int32

Wiki page ID.

project
path True

string

Project ID or project name

wikiIdentifier
path True

string

Wiki ID or wiki name.

api-version
query True

string

Version of the API to use. This should be set to '6.0-preview.1' to use this version of the api.

pageViewsForDays
query

integer

int32

last N days from the current day for which page views is to be returned. It's inclusive of current day.

Responses

Name Type Description
200 OK

WikiPageDetail

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.wiki Grants the ability to read wikis, wiki pages and wiki attachments. Also grants the ability to search wiki pages.

Examples

Get page stats by id

Sample Request

GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/stats?pageViewsForDays=30&api-version=6.0-preview.1

Sample Response

{
  "path": "/Test Page",
  "id": 1,
  "viewStats": [
    {
      "day": "2019-10-15T00:00:00",
      "count": 5
    },
    {
      "day": "2019-10-16T00:00:00",
      "count": 2
    },
    {
      "day": "2019-10-17T00:00:00",
      "count": 1
    }
  ]
}

Definitions

Name Description
WikiPageDetail

Defines a page with its metedata in a wiki.

WikiPageStat

Defines properties for wiki page stat.

WikiPageDetail

Defines a page with its metedata in a wiki.

Name Type Description
id

integer

When present, permanent identifier for the wiki page

path

string

Path of the wiki page.

viewStats

WikiPageStat[]

Path of the wiki page.

WikiPageStat

Defines properties for wiki page stat.

Name Type Description
count

integer

the count of the stat for the Day

day

string

Day of the stat