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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<InstitutionStudentsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
<institution_id>0</institution_id>
</InstitutionStudentsRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <InstitutionStudentsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <accreditation_status>String</accreditation_status> <accreditation_status_changed_date>0001-01-01T00:00:00</accreditation_status_changed_date> <accreditation_status_notes>String</accreditation_status_notes> <addr1>String</addr1> <addr2>String</addr2> <city>String</city> <country>String</country> <credit_hour_conversion>String</credit_hour_conversion> <gpa_conversion>String</gpa_conversion> <institution_id>0</institution_id> <institution_name>String</institution_name> <institution_other_names>String</institution_other_names> <institution_previous_names>String</institution_previous_names> <institution_type>String</institution_type> <related_institutions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>String</d2p1:string> </related_institutions> <state>String</state> <zip>String</zip> <student_previous_degrees> <ExternalDegreesResponse> <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types"> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:Message>String</d4p1:Message> <d4p1:StackTrace>String</d4p1:StackTrace> <d4p1:Errors> <d4p1:ResponseError> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:FieldName>String</d4p1:FieldName> <d4p1:Message>String</d4p1:Message> <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d4p1:Meta> </d4p1:ResponseError> </d4p1:Errors> <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d4p1:Meta> </ResponseStatus> <degrees> <ExternalDegreeResponse> <degree_name>String</degree_name> <degree_override_name>String</degree_override_name> <end_year>0</end_year> <graduation_month>String</graduation_month> <id>0</id> <institution_id>0</institution_id> <institution_name>String</institution_name> <is_only_in_d365>false</is_only_in_d365> <start_year>0</start_year> </ExternalDegreeResponse> </degrees> <gpa>0</gpa> <person> <ResponseStatus xmlns:d5p1="http://schemas.servicestack.net/types"> <d5p1:ErrorCode>String</d5p1:ErrorCode> <d5p1:Message>String</d5p1:Message> <d5p1:StackTrace>String</d5p1:StackTrace> <d5p1:Errors> <d5p1:ResponseError> <d5p1:ErrorCode>String</d5p1:ErrorCode> <d5p1:FieldName>String</d5p1:FieldName> <d5p1:Message>String</d5p1:Message> <d5p1:Meta xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d8p1:KeyValueOfstringstring> <d8p1:Key>String</d8p1:Key> <d8p1:Value>String</d8p1:Value> </d8p1:KeyValueOfstringstring> </d5p1:Meta> </d5p1:ResponseError> </d5p1:Errors> <d5p1:Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d6p1:KeyValueOfstringstring> <d6p1:Key>String</d6p1:Key> <d6p1:Value>String</d6p1:Value> </d6p1:KeyValueOfstringstring> </d5p1:Meta> </ResponseStatus> <addr1>String</addr1> <addr2>String</addr2> <citizenship>String</citizenship> <citizenship_other>String</citizenship_other> <city>String</city> <code>String</code> <country>String</country> <dob>0001-01-01T00:00:00</dob> <email>String</email> <first_name>String</first_name> <is_faculty>false</is_faculty> <is_student>false</is_student> <is_vendor>false</is_vendor> <last_name>String</last_name> <middle_name>String</middle_name> <permanent_resident>String</permanent_resident> <phone_bus>String</phone_bus> <phone_cell>String</phone_cell> <phone_home>String</phone_home> <preferred_name>String</preferred_name> <regent_id>0</regent_id> <regent_login>String</regent_login> <state>String</state> <ubc_id>0</ubc_id> <uuid>String</uuid> </person> <student_programs> <StudentProgramSimpleResponse> <ResponseStatus xmlns:d6p1="http://schemas.servicestack.net/types"> <d6p1:ErrorCode>String</d6p1:ErrorCode> <d6p1:Message>String</d6p1:Message> <d6p1:StackTrace>String</d6p1:StackTrace> <d6p1:Errors> <d6p1:ResponseError> <d6p1:ErrorCode>String</d6p1:ErrorCode> <d6p1:FieldName>String</d6p1:FieldName> <d6p1:Message>String</d6p1:Message> <d6p1:Meta xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:KeyValueOfstringstring> <d9p1:Key>String</d9p1:Key> <d9p1:Value>String</d9p1:Value> </d9p1:KeyValueOfstringstring> </d6p1:Meta> </d6p1:ResponseError> </d6p1:Errors> <d6p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d6p1:Meta> </ResponseStatus> <catalog>String</catalog> <concentration_code>String</concentration_code> <concentration_name>String</concentration_name> <end_date>0001-01-01T00:00:00</end_date> <is_active>false</is_active> <is_graduated>false</is_graduated> <program_code>String</program_code> <program_id>0</program_id> <program_name>String</program_name> <regent_id>0</regent_id> <start_date>0001-01-01T00:00:00</start_date> <uuid>String</uuid> </StudentProgramSimpleResponse> </student_programs> <valid_degrees> <ExternalDegreesAdminResponse> <degree_code>String</degree_code> <degree_name>String</degree_name> <degree_type>String</degree_type> </ExternalDegreesAdminResponse> </valid_degrees> </ExternalDegreesResponse> </student_previous_degrees> <student_transfer_credentials> <StudentTransferCredentialsResponse> <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types"> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:Message>String</d4p1:Message> <d4p1:StackTrace>String</d4p1:StackTrace> <d4p1:Errors> <d4p1:ResponseError> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:FieldName>String</d4p1:FieldName> <d4p1:Message>String</d4p1:Message> <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d4p1:Meta> </d4p1:ResponseError> </d4p1:Errors> <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d4p1:Meta> </ResponseStatus> <regent_id>0</regent_id> <studentTransferCredentialPackage> <StudentTransferCredentialPackageResponse> <ResponseStatus xmlns:d6p1="http://schemas.servicestack.net/types"> <d6p1:ErrorCode>String</d6p1:ErrorCode> <d6p1:Message>String</d6p1:Message> <d6p1:StackTrace>String</d6p1:StackTrace> <d6p1:Errors> <d6p1:ResponseError> <d6p1:ErrorCode>String</d6p1:ErrorCode> <d6p1:FieldName>String</d6p1:FieldName> <d6p1:Message>String</d6p1:Message> <d6p1:Meta xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:KeyValueOfstringstring> <d9p1:Key>String</d9p1:Key> <d9p1:Value>String</d9p1:Value> </d9p1:KeyValueOfstringstring> </d6p1:Meta> </d6p1:ResponseError> </d6p1:Errors> <d6p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d6p1:Meta> </ResponseStatus> <equivalent_id>0</equivalent_id> <institution> <ResponseStatus xmlns:d7p1="http://schemas.servicestack.net/types"> <d7p1:ErrorCode>String</d7p1:ErrorCode> <d7p1:Message>String</d7p1:Message> <d7p1:StackTrace>String</d7p1:StackTrace> <d7p1:Errors> <d7p1:ResponseError> <d7p1:ErrorCode>String</d7p1:ErrorCode> <d7p1:FieldName>String</d7p1:FieldName> <d7p1:Message>String</d7p1:Message> <d7p1:Meta xmlns:d10p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d10p1:KeyValueOfstringstring> <d10p1:Key>String</d10p1:Key> <d10p1:Value>String</d10p1:Value> </d10p1:KeyValueOfstringstring> </d7p1:Meta> </d7p1:ResponseError> </d7p1:Errors> <d7p1:Meta xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d8p1:KeyValueOfstringstring> <d8p1:Key>String</d8p1:Key> <d8p1:Value>String</d8p1:Value> </d8p1:KeyValueOfstringstring> </d7p1:Meta> </ResponseStatus> <accreditation_status>String</accreditation_status> <accreditation_status_changed_date>0001-01-01T00:00:00</accreditation_status_changed_date> <accreditation_status_notes>String</accreditation_status_notes> <addr1>String</addr1> <addr2>String</addr2> <city>String</city> <country>String</country> <credit_hour_conversion>String</credit_hour_conversion> <gpa_conversion>String</gpa_conversion> <institution_id>0</institution_id> <institution_name>String</institution_name> <institution_other_names>String</institution_other_names> <institution_previous_names>String</institution_previous_names> <institution_type>String</institution_type> <related_institutions xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:string>String</d7p1:string> </related_institutions> <state>String</state> <zip>String</zip> </institution> <is_advanced_standing>false</is_advanced_standing> <studentAcademicCredentials> <StudentAcademicCredentialResponse> <ResponseStatus xmlns:d8p1="http://schemas.servicestack.net/types"> <d8p1:ErrorCode>String</d8p1:ErrorCode> <d8p1:Message>String</d8p1:Message> <d8p1:StackTrace>String</d8p1:StackTrace> <d8p1:Errors> <d8p1:ResponseError> <d8p1:ErrorCode>String</d8p1:ErrorCode> <d8p1:FieldName>String</d8p1:FieldName> <d8p1:Message>String</d8p1:Message> <d8p1:Meta xmlns:d11p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d11p1:KeyValueOfstringstring> <d11p1:Key>String</d11p1:Key> <d11p1:Value>String</d11p1:Value> </d11p1:KeyValueOfstringstring> </d8p1:Meta> </d8p1:ResponseError> </d8p1:Errors> <d8p1:Meta xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:KeyValueOfstringstring> <d9p1:Key>String</d9p1:Key> <d9p1:Value>String</d9p1:Value> </d9p1:KeyValueOfstringstring> </d8p1:Meta> </ResponseStatus> <academic_level>String</academic_level> <added_by>String</added_by> <added_date>0001-01-01T00:00:00</added_date> <audit_value>0</audit_value> <changed_by>String</changed_by> <changed_date>0001-01-01T00:00:00</changed_date> <course_level>0</course_level> <course_name>String</course_name> <credit_value>0</credit_value> <current_status>String</current_status> <gpa_credits>0</gpa_credits> <grade>String</grade> <grade_points>0</grade_points> <is_audio>false</is_audio> <is_audit>false</is_audit> <is_grade_final>false</is_grade_final> <is_oncampus>false</is_oncampus> <is_pass_fail>false</is_pass_fail> <location>String</location> <pretty_title>String</pretty_title> <printed_comments>String</printed_comments> <reporting_term>String</reporting_term> <reporting_year>0</reporting_year> <section_code>String</section_code> <section_id>0</section_id> <stac_uuid>String</stac_uuid> <subject>String</subject> <term>String</term> <title>String</title> <uuid>String</uuid> </StudentAcademicCredentialResponse> </studentAcademicCredentials> <studentTransferCredentials> <StudentTransferCredentialResponse> <ResponseStatus xmlns:d8p1="http://schemas.servicestack.net/types"> <d8p1:ErrorCode>String</d8p1:ErrorCode> <d8p1:Message>String</d8p1:Message> <d8p1:StackTrace>String</d8p1:StackTrace> <d8p1:Errors> <d8p1:ResponseError> <d8p1:ErrorCode>String</d8p1:ErrorCode> <d8p1:FieldName>String</d8p1:FieldName> <d8p1:Message>String</d8p1:Message> <d8p1:Meta xmlns:d11p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d11p1:KeyValueOfstringstring> <d11p1:Key>String</d11p1:Key> <d11p1:Value>String</d11p1:Value> </d11p1:KeyValueOfstringstring> </d8p1:Meta> </d8p1:ResponseError> </d8p1:Errors> <d8p1:Meta xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:KeyValueOfstringstring> <d9p1:Key>String</d9p1:Key> <d9p1:Value>String</d9p1:Value> </d9p1:KeyValueOfstringstring> </d8p1:Meta> </ResponseStatus> <added_by>String</added_by> <added_date>0001-01-01T00:00:00</added_date> <changed_by>String</changed_by> <changed_date>0001-01-01T00:00:00</changed_date> <course_name>String</course_name> <credit_value>0</credit_value> <equivalent_id>0</equivalent_id> <institution_id>0</institution_id> <is_advanced_standing>false</is_advanced_standing> <stran_uuid>String</stran_uuid> <title>String</title> <uuid>String</uuid> </StudentTransferCredentialResponse> </studentTransferCredentials> </StudentTransferCredentialPackageResponse> </studentTransferCredentialPackage> <uuid>String</uuid> </StudentTransferCredentialsResponse> </student_transfer_credentials> </InstitutionStudentsResponse>