This service returns information about PCN and the Hours associated with their PayClasses
Type | Description |
---|---|
System.String | If a PCN number is supplied, only information for that postion will be returned |
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms){
string uri = "https://fusion.superion.com/FusionOSServices/v1/ONESolution/HumanResources/Positions/HOURS?fields=cdhno,cdhtitle,longdesc,pcn,cdhrelcd06+TCPType&cdhrelcd05=TCP";
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 items = (JContainer)response["RequestResponse"]["DATA"]["POSITION"];
foreach (var item in items )
{
// Your code goes here
}
// responses with more then 1000 positions are broken up into multiple requests
uri = (string)response["RequestResponse"]["NextUri"];
}
}
}
{
"RequestResponse": {
"Count": "5",
"DATA": {
"POSITION": [
{
"LONGDESC": "MANAGEMENT ANALYST",
"PCN": "02200000"
},
{
"LONGDESC": "ASSISTANT CITY CLERK",
"PCN": "02202000"
},
{
"LONGDESC": "CITY CLERK",
"PCN": "02204000"
},
{
"LONGDESC": "RECORDS MANAGER",
"PCN": "02206000"
},
{
"LONGDESC": "HUMAN RESOURCES MANAGER",
"PCN": "02208000"
}
]
}
}
}
Query string options SkipRows: The number of rows at the begining of the query to not report. TakeRows: The number of rows from the query to report. If left blank the default is 1000. ?TakeRows=10 results in only 10 rows being returned. ?SkipRows=10 results in all rows after row 10 being returned. ?SkipRows=10&TakeRows=10 results in rows 11 through 20 being returned. Fields: A list of table columns to be included in the query. If this is included in the query string then only the listed columns will be reported. (note that the examples below are for HREmpmstr, but similar ideas can be applied to any table) ?fields=fname,lname results in only the first and last name being reported. Columns can be renamed by appending the new name after the default name. ?fields=fname+FirstName,lname+LastName Filters: Any column name can be added to the query string as a filter. For example ?fname=Dan ?hdt=1/1/2017 By default the filter comparison is equality. Other comparison are available and can be appended to the filter "?fname=Dan+like " will select Dan, Daniel and Dannie "?hdt=1/1/2017+gt" will include all dates after 1/1/2017 Available comparisons are: "ge", greater than or equal to (>=) "gt", greater than (>) "isnotnull", is not null "isnull", is null "le", less than or equal to (<=) "like", like "lt", less than (<) "ne", not equal (!= , <>) "notlike", not like