![]() | DataExportServiceGetAllPersons Method |
Namespace: (Default Namespace)
public Person[] GetAllPersons( string authKey, int numberOfRecords, int lastEntityNumber, DateTime lastUpdateDate, List<WSMethodParam> parameters )
Exception | Condition |
---|---|
ApplicationException | Invalid authorization key |
ApplicationException | Insufficient privileges |
Exception | Internal Parameter Parse Error |
The authorization key provided must be linked to an administrator role.
See the WSMethodParam[].Parameter property for valid parameters values and a description of what each parameter does.
DataExportServiceSoapClient des = new DataExportServiceSoapClient(); int pageSize = 100; int lastEntityNo = 0; DateTime lastUpdate = new DateTime(1900,1,1); //set the parameters for the service call List<WSMethodParam> wsParameters = new List<WSMethodParam>(); //Include students in the returned data wsParameters.Add(new WSMethodParam(){ Parameter=Parameter.IncludeStudents, Value="true"}); //only return students with a student group of Students or Graduated wsParameters.Add(new WSMethodParam(){ Parameter=Parameter.StudentsGroup, Value="Students,Graduated"}); //Include parents in the returned data wsParameters.Add(new WSMethodParam(){ Parameter=Parameter.IncludeParents, Value="true"}); //Include constituents in the returned data wsParameters.Add(new WSMethodParam() { Parameter = Parameter.IncludeConstituents, Value = "true" }); //only return constituent: Alums wsParameters.Add(new WSMethodParam() { Parameter = Parameter.Constituencies, Value = "Alums" }); //Include students for a parent wsParameters.Add(new WSMethodParam(){ Parameter = Parameter.IncludePersonStudents, Value = "true"}); //Only return persons that have a web account wsParameters.Add(new WSMethodParam() { Parameter = Parameter.ReturnOnlyWebUsers, Value = "false" }); //Include the spouse info in the person record wsParameters.Add(new WSMethodParam() { Parameter = Parameter.IncludePersonSpouseInfo, Value = "true" }); //Include faculty in the returned data wsParameters.Add(new WSMethodParam(){ Parameter=Parameter.IncludeFaculty, Value="true"}); Person[] ret = des.GetAllPersons(authKey, pageSize, lastEntityNo, lastUpdate, wsParameters.ToArray()); while (ret.Count() == pageSize) { lastEntityNo = ret[ret.Count() - 1].EntityNo; ret = des.GetAllPersons(authKey, pageSize, lastEntityNo, lastUpdate, wsParameters.ToArray()); }