GET api/User

Gets a list of all users in the database. Can only be executed by admins.

Request Information

URI Parameters

None.

Body Parameters

None.

Response Information

Resource Description

A list of UserModel, populated with user meta-data, groups and roles.

Collection of Trifolia.Web.Models.User.UserModel
NameDescriptionTypeAdditional information
Roles

Collection of integer

None.

Groups

Collection of integer

None.

Id

integer

None.

Email

string

None.

FirstName

string

None.

LastName

string

None.

UserName

string

None.

Phone

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Roles": [
      1,
      2
    ],
    "Groups": [
      1,
      2
    ],
    "Id": 1,
    "Email": "sample string 1",
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "UserName": "sample string 4",
    "Phone": "sample string 5"
  },
  {
    "Roles": [
      1,
      2
    ],
    "Groups": [
      1,
      2
    ],
    "Id": 1,
    "Email": "sample string 1",
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "UserName": "sample string 4",
    "Phone": "sample string 5"
  }
]

application/xml, text/xml

Sample:
<ArrayOfUserModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Trifolia.Web.Models.User">
  <UserModel>
    <Email>sample string 1</Email>
    <FirstName>sample string 2</FirstName>
    <Groups xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
    </Groups>
    <Id>1</Id>
    <LastName>sample string 3</LastName>
    <Phone>sample string 5</Phone>
    <Roles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
    </Roles>
    <UserName>sample string 4</UserName>
  </UserModel>
  <UserModel>
    <Email>sample string 1</Email>
    <FirstName>sample string 2</FirstName>
    <Groups xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
    </Groups>
    <Id>1</Id>
    <LastName>sample string 3</LastName>
    <Phone>sample string 5</Phone>
    <Roles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
    </Roles>
    <UserName>sample string 4</UserName>
  </UserModel>
</ArrayOfUserModel>
URI parameters
=
Headers | Add header
: Delete
Body
Samples:
Status
Headers
Body