POST api/Group/UesrDefaultGroupList

Get users' groups and roles [watches]

Request Information

Body Parameters

UserGroupListModel
NameDescriptionTypeAdditional information
UserId

user id

integer

None.

MethodType

Method type [temporary unused]

integer

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

string

None.

Request Formats

application/json, text/json

Sample:
{
  "UserId": 1,
  "MethodType": 2,
  "Token": "sample string 3",
  "Language": "sample string 4",
  "AppId": "sample string 5"
}

application/xml, text/xml

Sample:
<UserGroupListModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 5</AppId>
  <Language>sample string 4</Language>
  <Token>sample string 3</Token>
  <MethodType>2</MethodType>
  <UserId>1</UserId>
</UserGroupListModel>

Response Information

Resource Description

Statestatus code:
0. Indicates success

UserGroupListResult
NameDescriptionTypeAdditional information
Items

Grouped collection

Collection of UserGroupInfo

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Items": [
    {
      "Id": 1,
      "GroupName": "sample string 2",
      "Icon": "sample string 3",
      "UserId": 4,
      "SubGroups": [
        {
          "SubGroupId": 1,
          "GroupName": "sample string 2",
          "Icon": "sample string 3",
          "UserId": 4
        },
        {
          "SubGroupId": 1,
          "GroupName": "sample string 2",
          "Icon": "sample string 3",
          "UserId": 4
        }
      ]
    },
    {
      "Id": 1,
      "GroupName": "sample string 2",
      "Icon": "sample string 3",
      "UserId": 4,
      "SubGroups": [
        {
          "SubGroupId": 1,
          "GroupName": "sample string 2",
          "Icon": "sample string 3",
          "UserId": 4
        },
        {
          "SubGroupId": 1,
          "GroupName": "sample string 2",
          "Icon": "sample string 3",
          "UserId": 4
        }
      ]
    }
  ],
  "State": 1
}

application/xml, text/xml

Sample:
<UserGroupListResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>1</State>
  <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
    <d2p1:UserGroupInfo>
      <d2p1:GroupName>sample string 2</d2p1:GroupName>
      <d2p1:Icon>sample string 3</d2p1:Icon>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:SubGroups>
        <d2p1:SubUserGroupInfo>
          <d2p1:GroupName>sample string 2</d2p1:GroupName>
          <d2p1:Icon>sample string 3</d2p1:Icon>
          <d2p1:SubGroupId>1</d2p1:SubGroupId>
          <d2p1:UserId>4</d2p1:UserId>
        </d2p1:SubUserGroupInfo>
        <d2p1:SubUserGroupInfo>
          <d2p1:GroupName>sample string 2</d2p1:GroupName>
          <d2p1:Icon>sample string 3</d2p1:Icon>
          <d2p1:SubGroupId>1</d2p1:SubGroupId>
          <d2p1:UserId>4</d2p1:UserId>
        </d2p1:SubUserGroupInfo>
      </d2p1:SubGroups>
      <d2p1:UserId>4</d2p1:UserId>
    </d2p1:UserGroupInfo>
    <d2p1:UserGroupInfo>
      <d2p1:GroupName>sample string 2</d2p1:GroupName>
      <d2p1:Icon>sample string 3</d2p1:Icon>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:SubGroups>
        <d2p1:SubUserGroupInfo>
          <d2p1:GroupName>sample string 2</d2p1:GroupName>
          <d2p1:Icon>sample string 3</d2p1:Icon>
          <d2p1:SubGroupId>1</d2p1:SubGroupId>
          <d2p1:UserId>4</d2p1:UserId>
        </d2p1:SubUserGroupInfo>
        <d2p1:SubUserGroupInfo>
          <d2p1:GroupName>sample string 2</d2p1:GroupName>
          <d2p1:Icon>sample string 3</d2p1:Icon>
          <d2p1:SubGroupId>1</d2p1:SubGroupId>
          <d2p1:UserId>4</d2p1:UserId>
        </d2p1:SubUserGroupInfo>
      </d2p1:SubGroups>
      <d2p1:UserId>4</d2p1:UserId>
    </d2p1:UserGroupInfo>
  </Items>
</UserGroupListResult>