Required role: | REGISUserRole |
POST | /Academic/Institution/{institution_id}/Students |
---|
import Foundation
import ServiceStack
public class InstitutionStudentsRequest : Codable
{
public var institution_id:Int
required public init(){}
}
public class InstitutionStudentsResponse : InstitutionResponse
{
public var student_transfer_credentials:[StudentTransferCredentialsResponse] = []
public var student_previous_degrees:[ExternalDegreesResponse] = []
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case student_transfer_credentials
case student_previous_degrees
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
student_transfer_credentials = try container.decodeIfPresent([StudentTransferCredentialsResponse].self, forKey: .student_transfer_credentials) ?? []
student_previous_degrees = try container.decodeIfPresent([ExternalDegreesResponse].self, forKey: .student_previous_degrees) ?? []
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if student_transfer_credentials.count > 0 { try container.encode(student_transfer_credentials, forKey: .student_transfer_credentials) }
if student_previous_degrees.count > 0 { try container.encode(student_previous_degrees, forKey: .student_previous_degrees) }
}
}
public class InstitutionResponse : Codable
{
public var responseStatus:ResponseStatus
public var institution_id:Int
public var institution_name:String
public var institution_previous_names:String
public var institution_other_names:String
public var institution_type:String
public var accreditation_status:String
public var accreditation_status_notes:String
public var related_institutions:[String] = []
public var accreditation_status_changed_date:Date?
public var gpa_conversion:String
public var credit_hour_conversion:String
public var addr1:String
public var addr2:String
public var city:String
public var state:String
public var country:String
public var zip:String
required public init(){}
}
public class StudentTransferCredentialsResponse : Codable
{
public var responseStatus:ResponseStatus
public var regent_id:Int
public var uuid:String
public var studentTransferCredentialPackage:[StudentTransferCredentialPackageResponse] = []
required public init(){}
}
public class StudentTransferCredentialPackageResponse : Codable
{
public var responseStatus:ResponseStatus
public var equivalent_id:Int
public var is_advanced_standing:Bool
public var institution:InstitutionResponse
public var studentAcademicCredentials:[StudentAcademicCredentialResponse] = []
public var studentTransferCredentials:[StudentTransferCredentialResponse] = []
required public init(){}
}
public class StudentAcademicCredentialResponse : Codable
{
public var responseStatus:ResponseStatus
public var uuid:String
public var stac_uuid:String
public var section_id:Int?
public var course_name:String
public var section_code:String
public var subject:String
public var course_level:Int?
public var title:String
public var pretty_title:String
public var location:String
public var is_audio:Bool
public var is_oncampus:Bool
public var credit_value:Double?
public var audit_value:Double?
public var is_audit:Bool
public var is_pass_fail:Bool
public var grade:String
public var is_grade_final:Bool
public var gpa_credits:Double?
public var grade_points:Double?
public var academic_level:String
public var printed_comments:String
public var term:String
public var reporting_term:String
public var reporting_year:Int?
public var current_status:String
public var added_by:String
public var added_date:Date?
public var changed_by:String
public var changed_date:Date?
required public init(){}
}
public class StudentTransferCredentialResponse : Codable
{
public var responseStatus:ResponseStatus
public var uuid:String
public var stran_uuid:String
public var course_name:String
public var title:String
public var credit_value:Double?
public var is_advanced_standing:Bool
public var equivalent_id:Int
public var institution_id:Int
public var added_by:String
public var added_date:Date?
public var changed_by:String
public var changed_date:Date?
required public init(){}
}
public class ExternalDegreesResponse : Codable
{
public var responseStatus:ResponseStatus
public var person:PersonSimpleResponse
public var gpa:Double?
public var student_programs:[StudentProgramSimpleResponse] = []
public var degrees:[ExternalDegreeResponse] = []
public var valid_degrees:[ExternalDegreesAdminResponse] = []
required public init(){}
}
public class PersonSimpleResponse : Codable
{
public var responseStatus:ResponseStatus
public var regent_id:Int
public var ubc_id:Int?
public var uuid:String
public var regent_login:String
public var first_name:String
public var preferred_name:String
public var middle_name:String
public var last_name:String
public var email:String
public var phone_home:String
public var phone_cell:String
public var phone_bus:String
public var addr1:String
public var addr2:String
public var city:String
public var state:String
public var country:String
public var code:String
public var citizenship:String
public var citizenship_other:String
public var permanent_resident:String
public var dob:Date?
public var is_student:Bool
public var is_faculty:Bool
public var is_vendor:Bool
required public init(){}
}
public class StudentProgramSimpleResponse : Codable
{
public var responseStatus:ResponseStatus
public var regent_id:Int
public var uuid:String
public var program_id:Int
public var program_code:String
public var program_name:String
public var concentration_code:String
public var concentration_name:String
public var start_date:Date?
public var end_date:Date?
public var catalog:String
public var is_active:Bool
public var is_graduated:Bool
required public init(){}
}
public class ExternalDegreeResponse : Codable
{
public var id:Int?
public var institution_id:Int?
public var degree_name:String
public var degree_override_name:String
public var institution_name:String
public var graduation_month:String
public var start_year:Int?
public var end_year:Int?
public var is_only_in_d365:Bool
required public init(){}
}
public class ExternalDegreesAdminResponse : Codable
{
public var degree_code:String
public var degree_name:String
public var degree_type:String
required public init(){}
}
Swift InstitutionStudentsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Academic/Institution/{institution_id}/Students HTTP/1.1
Host: data.regent-college.edu
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"institution_id":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"student_transfer_credentials":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"regent_id":0,"uuid":"String","studentTransferCredentialPackage":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"equivalent_id":0,"is_advanced_standing":false,"institution":{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"institution_id":0,"institution_name":"String","institution_previous_names":"String","institution_other_names":"String","institution_type":"String","accreditation_status":"String","accreditation_status_notes":"String","related_institutions":["String"],"accreditation_status_changed_date":"0001-01-01T00:00:00.0000000","gpa_conversion":"String","credit_hour_conversion":"String","addr1":"String","addr2":"String","city":"String","state":"String","country":"String","zip":"String"},"studentAcademicCredentials":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"uuid":"String","stac_uuid":"String","section_id":0,"course_name":"String","section_code":"String","subject":"String","course_level":0,"title":"String","pretty_title":"String","location":"String","is_audio":false,"is_oncampus":false,"credit_value":0,"audit_value":0,"is_audit":false,"is_pass_fail":false,"grade":"String","is_grade_final":false,"gpa_credits":0,"grade_points":0,"academic_level":"String","printed_comments":"String","term":"String","reporting_term":"String","reporting_year":0,"current_status":"String","added_by":"String","added_date":"0001-01-01T00:00:00.0000000","changed_by":"String","changed_date":"0001-01-01T00:00:00.0000000"}],"studentTransferCredentials":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"uuid":"String","stran_uuid":"String","course_name":"String","title":"String","credit_value":0,"is_advanced_standing":false,"equivalent_id":0,"institution_id":0,"added_by":"String","added_date":"0001-01-01T00:00:00.0000000","changed_by":"String","changed_date":"0001-01-01T00:00:00.0000000"}]}]}],"student_previous_degrees":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"person":{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"regent_id":0,"ubc_id":0,"uuid":"String","regent_login":"String","first_name":"String","preferred_name":"String","middle_name":"String","last_name":"String","email":"String","phone_home":"String","phone_cell":"String","phone_bus":"String","addr1":"String","addr2":"String","city":"String","state":"String","country":"String","code":"String","citizenship":"String","citizenship_other":"String","permanent_resident":"String","dob":"0001-01-01T00:00:00.0000000","is_student":false,"is_faculty":false,"is_vendor":false},"gpa":0,"student_programs":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"regent_id":0,"uuid":"String","program_id":0,"program_code":"String","program_name":"String","concentration_code":"String","concentration_name":"String","start_date":"0001-01-01T00:00:00.0000000","end_date":"0001-01-01T00:00:00.0000000","catalog":"String","is_active":false,"is_graduated":false}],"degrees":[{"id":0,"institution_id":0,"degree_name":"String","degree_override_name":"String","institution_name":"String","graduation_month":"String","start_year":0,"end_year":0,"is_only_in_d365":false}],"valid_degrees":[{"degree_code":"String","degree_name":"String","degree_type":"String"}]}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"institution_id":0,"institution_name":"String","institution_previous_names":"String","institution_other_names":"String","institution_type":"String","accreditation_status":"String","accreditation_status_notes":"String","related_institutions":["String"],"accreditation_status_changed_date":"0001-01-01T00:00:00.0000000","gpa_conversion":"String","credit_hour_conversion":"String","addr1":"String","addr2":"String","city":"String","state":"String","country":"String","zip":"String"}