ServiceRouterGetUserBasic Method | |
Namespace: AppOne.Services.V2Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax Remarks
Use this method to get a results list of
GetUserBasicModel Note |
---|
To get a larger set of meta data about a user see the WSUserDetail method. For a higher level overview of the business rules for user info
see the class WSUserBasic of this web method.
|
DataAction Names
Name | Description | Values Example |
---|
SELECT-ALL | Returns all users in system regardless of any state. | [ignored] |
SELECT-EMPID | Returns only the users with the specified employee ID passed in the values property. | "abc-123","123","efg"... |
SELECT-BADGE | Returns only the users with the specified badge ID passed in the values property. | "abc","123-1B","111"... |
SELECT-LNAME | Returns only the users with the specified case insensitive last name passed in the values property. | "Smith","jones","Adams"... |
Example {
"AuthToken":"...==",
"EffectiveDate":"\/Date(928174800000-0700)\/",
"DataAction":{
"Name":"SELECT-EMPID",
"Values":["3539A"]
}
}
{
"Report": {
"APIVersion": "2.0",
"ProcessTime": "0.0139185",
"RequestTime": "/Date(1490132471621-0700)/",
"ResponseTime": "/Date(1490132471635-0700)/",
"Results": 1
},
"Results": [
{
"Badge": "3539",
"EmpIdentifier": "3539",
"FirstName": "Sarah",
"LastName": "Apples",
"Status": "Inactive",
"TimeZoneDisplayName": "(UTC-07:00) Arizona",
"TimeZoneIsDST": false,
"TimeZoneKey": "US Mountain Standard Time",
"TimeZoneUTCOffset": -7,
"Title": "Supervisor"
}
]
}
int countTest_1 = 0;
SoapServiceV2.GetUserBasicRequest request1 = new SoapServiceV2.GetUserBasicRequest();
request1.input = new SoapServiceV2.GetUserBasicIn
{
AuthToken = AuthToken,
DataAction = new DataAction
{
Name = "SELECT-ALL",
},
EffectiveDate=DateTime.Now
};
SoapServiceV2.GetUserBasicResponse response1 = client.GetUserBasic(request1);
countTest_1 = (response1.GetUserBasicResult.Results != null) ? response1.GetUserBasicResult.Results.Count : 0;
int countTest_2 = 0;
SoapServiceV2.GetUserBasicRequest request2 = new SoapServiceV2.GetUserBasicRequest();
request2.input = new SoapServiceV2.GetUserBasicIn
{
AuthToken = AuthToken,
DataAction = new DataAction
{
Name = "SELECT-EMPIDID",
Values = new List<string></string>() {
response1.GetUserBasicResult.Results[0].Profile.EmpID.ToString(),
response1.GetUserBasicResult.Results[1].Profile.EmpID.ToString()
}
},
EffectiveDate=DateTime.Now
};
SoapServiceV2.GetUserBasicResponse response2 = client.GetUserBasic(request2);
countTest_2 = (response2.GetUserBasicResult.Results != null) ? response2.GetUserBasicResult.Results.Count : 0;
Assert.IsTrue(countTest_2 > 0 && countTest_1 > 0);
See Also