NAV
shell ruby python csharp php

StudentFlag

The StudentFlag object

The StudentFlag object looks like this in JSON:

{
    "object": "student_flag",
    "id": 2,
    "student_id": 2,
    "advisor_id": null,
    "course_offering_id": 22524,
    "color": "red",
    "reason": null,
    "attendance_percent": 0,
    "consecutive_absences": 3,
    "average_assignment_grade": 20,
    "low_assignment_grade": 20,
    "auto_generated": true,
    "notified_at": null,
    "resolved_by_id": null,
    "resolved_at": null,
    "ended_at": null,
    "course_student_id": 1,
    "added_at": "2022-07-19T16:43:57+00:00",
    "added_by_id": 10,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
student_id Yes int
advisor_id No int
course_offering_id No int
color Yes enum (red, yellow, green)
reason No text
attendance_percent No decimal
consecutive_absences No int
average_assignment_grade No decimal
low_assignment_grade No decimal
auto_generated No bool
notified_at No datetime
resolved_by_id No int
resolved_at No datetime
ended_at No datetime
course_student_id No int
added_at No datetime
added_by_id No int
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/flags" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/people/(person)/flags',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/flags',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/people/(person)/flags"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/people/(person)/flags');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "list",
    "count": 1,
    "results": 1,
    "results_per_page": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "student_flag",
            "id": 3,
            "student_id": 16,
            "advisor_id": null,
            "course_offering_id": 21908,
            "color": "yellow",
            "reason": null,
            "attendance_percent": 0,
            "consecutive_absences": 3,
            "average_assignment_grade": 20,
            "low_assignment_grade": 20,
            "auto_generated": true,
            "notified_at": null,
            "resolved_by_id": null,
            "resolved_at": null,
            "ended_at": null,
            "course_student_id": 6000000,
            "added_at": "2022-08-19T16:43:57+00:00",
            "added_by_id": 10
        }
    ],
    "sandbox": true
}

Retrieves all StudentFlag objects tied to a specific Person.

HTTP Request

GET /people/(person)/flags

Parameters

None

Permissions

One of the following roles is required to call this method:

show

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/flags/(studentflag)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/people/(person)/flags/(studentflag)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/flags/(studentflag)',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/people/(person)/flags/(studentflag)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/people/(person)/flags/(studentflag)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "student_flag",
    "id": 3,
    "student_id": 16,
    "advisor_id": null,
    "course_offering_id": 21908,
    "color": "yellow",
    "reason": null,
    "attendance_percent": 0,
    "consecutive_absences": 3,
    "average_assignment_grade": 20,
    "low_assignment_grade": 20,
    "auto_generated": true,
    "notified_at": null,
    "resolved_by_id": null,
    "resolved_at": null,
    "ended_at": null,
    "course_student_id": 6000000,
    "added_at": "2022-08-19T16:43:57+00:00",
    "added_by_id": 10,
    "sandbox": true
}

Retrieves a specific StudentFlag object.

HTTP Request

GET /people/(person)/flags/(studentflag)

Parameters

No additional parameters are needed beyond the ID of the object being requested that appears in the URL.

Permissions

One of the following roles is required to call this method: