Loading...

OLD API Endpoint: Student’s Positions

In September 2018 Wisenet released a beta version of a new API named Wisenet API. This became live in December 2018. The Wisenet API is a complete rewrite and is designed to replace the now named OLD API. While we will be keeping the OLD API active for at least a year, it will no longer be updated.

Go to Wisenet API Docs 

The Wisenet Student’s Positions Endpoint allows your applications to get information about StudentPositions for a student.

StudentPositions Properties

List All StudentPositions for Student

ET /students/student/{id}/studentpositions

Returns the list of StudentPositions for the student with the given {id}

Sample request:

 curl _X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/students/student/2/studentpositions

Sample response:

<StudentPositionSet xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://api.mywisenet.com.au/v1/">
	<SetCount>1</SetCount>
	<StudentPositions>
		<StudentPosition>
			<EndDate>2011-06-22T00:00:00</EndDate>
			<Link>
				<Href>studentpositions/studentposition/5</Href>
				<Rel>self</Rel>
				<Title>5: Robin Campbell -- Channel Nine‎</Title>
			</Link>
			<Position>Singer</Position>
			<StartDate>2008-04-09T00:00:00</StartDate>
			<Student>
				<AtsiStatus/>
				<Citizenship/>
				<CountryOfBirth/>
				<Disabilities/>
				<DisabilityAccessed/>
				<DisabilityFlag/>
				<EmploymentStatus/>
				<Ethnicity1/>
				<Ethnicity2/>
				<Ethnicity3/>
				<FeeHelp>
					<CitizenResident/>
					<HighestEducationLevel/>
					<IndigenousStatus/>
					<ParentEducationLevel1/>
					<ParentEducationLevel2/>
				</FeeHelp>
				<FirstName>Robin</FirstName>
				<Gender/>
				<HighestSchoolLevelCompleted/>
				<IwiAffiliation1/>
				<IwiAffiliation2/>
				<IwiAffiliation3/>
				<LanguageSpokenAtHome/>
				<LastName>Campbell</LastName>
				<LastSchoolAttended/>
				<Link>
					<Href>students/student/2</Href>
					<Rel>self</Rel>
					<Title>: Robin Campbell</Title>
				</Link>
				<MainActivityPriorToStudy/>
				<NRICType/>
				<Nationality/>
				<PassportCountry/>
				<PermanentAddress/>
				<PostalAddress/>
				<PriorEducationFlag/>
				<PriorEducationalAchievements/>
				<ResidentialStatus/>
				<SGExtraNationality/>
				<SecondaryQualification/>
				<SpokenEnglishProficiency/>
				<StreetAddress/>
				<StudentId>2</StudentId>
				<SyncToSugar>false</SyncToSugar>
				<SyncToXero>false</SyncToXero>
				<TargetGroup/>
			</Student>
			<StudentPositionId>5</StudentPositionId>
			<Workplace>
				<ANSZIC/>
				<Classification/>
				<Code>Code</Code>
				<Description>Channel Nine‎</Description>
				<IndustrySize/>
				<Link>
					<Href>workplaces/workplace/1</Href>
					<Rel>self</Rel>
					<Title>1: Code -- Channel Nine‎</Title>
				</Link>
				<PostalAddress/>
				<StreetAddress/>
				<WorkplaceId>1</WorkplaceId>
			</Workplace>
		</StudentPosition>
	</StudentPositions>
</StudentPositionSet>

C# Code Sample

public static void GetStudentPositionsSample()
{
    const string url = "https://tst-api.wisenet.co/students/student/2/studentpositions";

    var request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Accept = "application/vnd.mywisenet.api.v1+xml";
    request.Method = "GET";
    request.UserAgent = "C# Sample Client";

    try
    {
        // Get response  
        using (var response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            using (var responseReader = new StreamReader(response.GetResponseStream()))
            {
                string responseBody = responseReader.ReadToEnd();

                // Console application output  
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (WebException ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
}

List modified StudentPositions for Student

ET /students/student/{id}/studentpositions

Set the If-Modified-Since header in the HTTP request. The date must be in UTC format.

Returns the list of StudentPositions for the specified student {id} created or modified since the specified date.

The StudentPositions endpoint will filter on the <LastAuditTimestamp> field and <StudentId> of StudentPosition. The <LastAuditTimestamp> field is set to the current UTC date whenever an StudentPosition is created or edited.

Sample request:

 curl _X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   -H "If-Modified-Since: Fri, 8 Jul 2011 1:43:31 GMT" \
   https://tst-api.wisenet.co/students/student/2/studentpositions

Response format would be the same as for the List All StudentPositions for Student command.

Note: We would recommend that all calls to list StudentPositions from the API use this If-Modified-Since parameter.

C# Code Sample

private static void GetIfModifiedSinceSample()
{
    const string url = "https://tst-api.wisenet.co/students/student/2/studfentpositions";

    var request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Accept = "application/vnd.mywisenet.api.v1+xml";
    request.IfModifiedSince = DateTime.Now.AddDays(-1);
    request.Method = "GET";
    request.UserAgent = "C# Sample Client";

    try
    {
        // Get response  
        using (var response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            using (var responseReader = new StreamReader(response.GetResponseStream()))
            {
                string responseBody = responseReader.ReadToEnd();

                // Console application output  
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (WebException ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
}