Loading...

OLD API Endpoint: StudentPosition

CRITICAL:

THIS ENDPOINT IS NO LONGER RECOMMENDED TO USE. Please contact us regarding our new API.

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 StudentPosition Endpoint allows your applications to get information about StudentPositions, add new StudentPositions, update their details.

StudentPosition is a position Student occupies in the Workplace.

StudentPosition Properties

ONLY GET is allowed:

  • Link
  • StudentPositionId
  • Position (maxlength:200)
  • Student (with StudentId field specified)
  • Workplace (with WorkplaceId field specified)
  • EndDate (date)
  • OrgUnit (maxlength:50)
  • StartDate (date)
  • SubGroup (maxlength:50)

List All StudentPositions

GET /studentpositions/

Returns the list of all StudentPositions.

Sample request:

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

Sample response:

<?xml version="1.0"?>
<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 GetSample()
{
    const string url = "https://tst-api.wisenet.co/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

GET /workplaces/

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

Returns the list of StudentPositions created or modified since the specified date.

The StudentPositions endpoint will filter on the <LastUpdated> field on each workplace. This field is updated to the current UTC date whenever a StudentPosition is created or edited.

Sample request:

 curl -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/studentpositions/

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

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

C# Code Sample

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

    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 wex)
    {
        Console.WriteLine("Error: {0}", wex.Message);
    }
}

List StudentPositions by page

GET /studentpositions/?skip={skip}&take={take}

Skips {skip} items in StudentPositions list, then returns {take} items.

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/studentpositions/?skip=100&take=20

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

List StudentPositions by WorkplaceCode

GET /studentpositions/?workplaceCode={somecode}

Returns only items associated with workplace with code {somecode}.

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/studentpositions/?workplaceCode=Code

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

Read StudentPosition

GET /studentpositions/studentposition/{id}

Returns extended information about the studentposition with the specified {id}.

Sample request:

curl -X GET \
  -H "Accept: application/vnd.mywisenet.api.v1+xml" \
  https://tst-api.wisenet.co/studentpositions/studentposition/5

Sample response 1:

<StudentPosition xmlns="http://api.mywisenet.com.au/v1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<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>

Sample Response 2: incorrect ID would return 404 HTTP code

    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">
        The StudentPosition with ID '2' cannot be found.
    </string>

C# Code Sample

private static void ReadSample()
{
    const string url = "https://tst-api.wisenet.co/studentpositions/studentposition/1";

    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);
    }
}

Was this Resource helpful?