Required role: | REGISUserRole |
POST | /Grades |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GradesRequest
{
}
public static class GradesResponse
{
public ResponseStatus responseStatus = null;
public ArrayList<GradeResponse> grades = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public GradesResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
public ArrayList<GradeResponse> getGrades() { return grades; }
public GradesResponse setGrades(ArrayList<GradeResponse> value) { this.grades = value; return this; }
}
public static class GradeResponse
{
public ResponseStatus responseStatus = null;
public Integer id = null;
public String grade_code = null;
public String grade_name = null;
public BigDecimal grade_points = null;
public Boolean gpa_credit = null;
public Boolean completed_credit = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public GradeResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
public Integer getId() { return id; }
public GradeResponse setId(Integer value) { this.id = value; return this; }
public String getGradeCode() { return grade_code; }
public GradeResponse setGradeCode(String value) { this.grade_code = value; return this; }
public String getGradeName() { return grade_name; }
public GradeResponse setGradeName(String value) { this.grade_name = value; return this; }
public BigDecimal getGradePoints() { return grade_points; }
public GradeResponse setGradePoints(BigDecimal value) { this.grade_points = value; return this; }
public Boolean isGpaCredit() { return gpa_credit; }
public GradeResponse setGpaCredit(Boolean value) { this.gpa_credit = value; return this; }
public Boolean isCompletedCredit() { return completed_credit; }
public GradeResponse setCompletedCredit(Boolean value) { this.completed_credit = value; return this; }
}
}
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 /Grades HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GradesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests" />
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GradesResponse 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> <grades> <GradeResponse> <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> <completed_credit>false</completed_credit> <gpa_credit>false</gpa_credit> <grade_code>String</grade_code> <grade_name>String</grade_name> <grade_points>0</grade_points> <id>0</id> </GradeResponse> </grades> </GradesResponse>