GET UserStats?Page={Page}&PageSize={PageSize}&NextPage={NextPage}&PreviousPage={PreviousPage}&FirstPage={FirstPage}&LastPage={LastPage}&byQuestions={byQuestions}

Get user rankings. User Authorization Optional.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
Page

The page number to return.

integer

None.

PageSize

The size of the page to return.

integer

None.

NextPage

Next page.

integer

None.

PreviousPage

Previous page.

integer

None.

FirstPage

First page.

integer

None.

LastPage

Last page.

integer

None.

byQuestions

true if order by number of questions answered. default false.

boolean

Default value is False

Body Parameters

None.

Response Information

Resource Description

Collection of user stats.

ResponseCollectionOfUserStats
NameDescriptionTypeAdditional information
Data

Collection of UserStats

None.

Count

integer

None.

Data

UserStats

None.

ResultType

ResultType

None.

Messages

Collection of string

None.

Links

Links

None.

ApiBaseUrl

string

None.

responseObjectType

string

None.

Response Formats

application/json, text/json

Sample:
{
  "data": [
    {
      "userId": 1,
      "questions": 2,
      "correct": 3,
      "percentCorrect": 4.0,
      "userName": "sample string 5",
      "apiUrl": {
        "href": "/userstats/sample string 7"
      },
      "resourceObjectType": "userStats"
    },
    {
      "userId": 1,
      "questions": 2,
      "correct": 3,
      "percentCorrect": 4.0,
      "userName": "sample string 5",
      "apiUrl": {
        "href": "/userstats/sample string 7"
      },
      "resourceObjectType": "userStats"
    }
  ],
  "count": 1,
  "resultType": {
    "code": 0,
    "message": "Success"
  },
  "messages": [
    "sample string 1",
    "sample string 2"
  ],
  "links": {},
  "apiBaseUrl": "sample string 2",
  "responseObjectType": "responseCollection<userStats>"
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Type 'BibleTrivia.WebApi.Models.UserStats' with data contract name 'UserStats:' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Type 'BibleTrivia.WebApi.Models.UserStats' with data contract name 'UserStats:' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.