Click or drag to resize

ServiceRouterGetUserBasic Method

Returns a GetUserBasicOut response with a result model List<GetUserBasicModel>

Namespace: AppOne.Services.V2
Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax
public GetUserBasicOut GetUserBasic(
	GetUserBasicIn input
)

Parameters

input  GetUserBasicIn
A new GetUserBasicIn object

Return Value

GetUserBasicOut
A GetUserBasicOut object
Remarks
Use this method to get a results list of GetUserBasicModel

Note  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

NameDescriptionValues Example
SELECT-ALLReturns all users in system regardless of any state.[ignored]
SELECT-EMPIDReturns only the users with the specified employee ID passed in the values property."abc-123","123","efg"...
SELECT-BADGEReturns only the users with the specified badge ID passed in the values property."abc","123-1B","111"...
SELECT-LNAMEReturns only the users with the specified case insensitive last name passed in the values property."Smith","jones","Adams"...
Example
JSON Request
{
    "AuthToken":"...==",
    "EffectiveDate":"\/Date(928174800000-0700)\/",
    "DataAction":{
        "Name":"SELECT-EMPID",
        "Values":["3539A"]
    }
}
JSON Response
{
    "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"
        }
    ]
}
SOAP: C# WCF Sample
// ==================================
//TEST 1: SELECT-ALL
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;

// ==================================
//TEST 2: SELECT-EMPIDID 
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