Method ITEmployee

Type: FusionOSServices.Controllers.IntelliTimeController

Summary

This service returns the following information about employees: employee ID, First Name, Last Name, email address department and calendar.

Example

GET https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/Employees/E01010

Parameters

TypeDescription
System.String If an employee ID is provided only information for that employee will be returned.

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms){

    string uri = "https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/Employees";
    

    using (WebClient wc = new WebClient())
    {
        wc.Headers.Add("Content-Type", "application/json");
        // Replace "ID" with supplied AppID
        wc.Headers.Set("X-APPID", "ID");
        // Replace "KEY" with supplied AppKey
        wc.Headers.Set("X-APPKEY", "KEY");

        while (uri != null)
        {
            string result = wc.DownloadString(uri);

            var response = JObject.Parse(result);

            var count = (string)response["RequestResponse"]["Count"];
            var employees = (JContainer)response["RequestResponse"]["DATA"]["EMPLOYEES"];

            foreach (var employee in employees)
            {
                // Your code goes here
                string fName = (string)employee["FNAME"];
                string lName = (string)employee["LNAME"];
            }
            // responses with more then 1000 employees are broken up into multiple requests
            uri = (string)response["RequestResponse"]["NextUri"];
        }
    }
}

Sample Responses


                        
            {
             "RequestResponse": {
               "Count": "1",
               "DATA": {
                 "EMPLOYEES": [
                   {
                     "CALENDAR": "STANDARD",
                     "DEPARTMENT": "03",
                      "EMAIL": "eramund@qmail.com",
                      "FNAME": "ENRIQUE",
                      "HDT": "5/21/2013 12:00:00 AM",
                      "IDA": "E01010",
                      "LNAME": "RAMUNDSEN"
                    }
                  ]
                }
              }
            }