/
Add/Remove Student from Program

Add/Remove Student from Program

Using the LinkIt! REST API, you can add a student to or remove a student from a program.

Resource URI

Add

/programs/{id}?verb=assign

Remove

/programs/{id}?verb=deassign
HTTPS PUT

Add

/programs/{id}?verb=assign&timestamp={TimeStamp}&accesskey={AccessKey}&tag={Token}

Remove

/programs/{id}?verb=deassign&timestamp={TimeStamp}&accesskey={AccessKey}&tag={Token}
Parameters for Request URL

The following parameters should be included in the request URL of the HTTPS PUT call to add/remove a student from a program.

Parameter
Required?
Data Type
Description
idYesINTEGER

the unique ID that identifies the program in the LinkIt! database.

TimeStampYesDATETIMEthe GMT time at which the call is generated. EXAMPLE: 5/1/2013+5:10:5+PM
AccessKeyYesSTRING (128)a unique key associated with the API user. EXAMPLE: 123456789-987654321
TagYesSTRING (128)token generated for authorization and authentication.
Parameters for Request Header

The following parameter should be included in the request header of the HTTPS PUT call to add/remove a student from a program.

ParameterRequiredData TypeDescription
StudentIDYesINTEGER

the ID of the student that you would like to add/remove from the program.

Response

The following fields are included in the response following an HTTPS PUT call to add/remove a student from a program.

Field NameData TypeDescriptionExample
ResultSTRING (10)indicates whether the staff is added/removed successfully.

SUCCESS

ERROR

DataJSON/XML

returns the following data is result is SUCCESS to indicate all the programs the student is currently enrolled in:

  • StudentID
  • Programs
    • ProgramID
    • Name
See below for detailed examples.
ErrorSTRING (100)

provides explanation if result is ERROR."Null" is returned if result is SUCCESS.

Click here for a list of error messages.
Examples

Example 1

Add the student (StudentID: 151557) to the program (ProgramID: 19740).
 


 

 JSON
Method

PUT

Request URL
/programs/19740?verb=assign&timestamp=6%2f26%2f2013+1%3a32%3a07+PM&accesskey=123456789-987654321&tag=3eac83099631c2d40e4239594c45bf840bedbc08 
Request Header
{ "StudentID": "151557" } 
Response Content
{"Result":"SUCCESS", "Data":{"StudentID":"151557", "Programs":[{"ProgramID":1552, "Name":"LEP"}, {"ProgramID":19740, "Name":"Free and Reduced"}]}, "Error":null} 
 XML
Method

PUT

Request URL
/programs/19740?verb=assign&timestamp=6%2f26%2f2013+1%3a32%3a07+PM&accesskey=123456789-987654321&tag=3eac83099631c2d40e4239594c45bf840bedbc08 
Request Header
<ProgramElement xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <StudentID>151557</StudentID> </ProgramElement> 
Response Content
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Result>SUCCESS</Result><Data><StudentID>151557</StudentID><Programs><Program><ProgramID>1552</ProgramID><Name>LEP</Name></Program><Program><ProgramID>19740</ProgramID><Name>Free and Reduced</Name></Program></Programs></Data></Response> 

Example 2

Remove the student (StudentID: 151557) from the program (ProgramID: 19740).
 


 

 JSON
Method

PUT

Request URL
/programs/19740?verb=deassign&timestamp=6%2f26%2f2013+1%3a34%3a29+PM&accesskey=123456789-987654321&tag=39a5390433bc4ea7f977e7acc7c548656c22956b 
Request Header
{ "StudentID": "151557" } 
Response Content
{"Result":"SUCCESS", "Data":{"StudentID":"151557", "Programs":[{"ProgramID":1552, "Name":"LEP"}]}, "Error":null} 
 XML
Method

PUT

Request URL
/programs/19740?verb=deassign&timestamp=6%2f26%2f2013+1%3a34%3a29+PM&accesskey=123456789-987654321&tag=39a5390433bc4ea7f977e7acc7c548656c22956b  
Request Header
<ProgramElement xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <StudentID>151557</StudentID> </ProgramElement> 
Response Content
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Result>SUCCESS</Result><Data><StudentID>151557</StudentID><Programs><Program><ProgramID>1552</ProgramID><Name>LEP</Name></Program></Programs></Data></Response> 

Navigation and Reference