NAV
shell ruby python csharp php

GradeScale

The GradeScale object

The GradeScale object looks like this in JSON:

{
    "object": "grade_scale",
    "id": 1,
    "parent_id": 1,
    "owner_type": "year",
    "owner_id": 1,
    "pass_fail": false,
    "retake_threshold_grade_point_id": null,
    "retake_threshold_inclusive_direction": "higher",
    "retake_threshold_logic": "include_retakes_in_calculation",
    "sandbox": true
}
Attribute Required Data Type
id Yes int
parent_id Yes int
owner_type Yes enum (year, term)
owner_id Yes int
pass_fail Yes bool
retake_threshold_grade_point_id No int
retake_threshold_inclusive_direction Yes enum (higher, lower)
retake_threshold_logic Yes enum (include_retakes_in_calculation, exclude_retakes_from_calculation)
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/gradescales" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/gradescales',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/gradescales',
 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/gradescales"), 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/gradescales');
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": 2,
    "results": 2,
    "results_per_page": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "grade_scale",
            "id": 1,
            "parent_id": 1,
            "owner_type": "year",
            "owner_id": 1,
            "pass_fail": false,
            "retake_threshold_grade_point_id": null,
            "retake_threshold_inclusive_direction": "higher",
            "retake_threshold_logic": "include_retakes_in_calculation"
        }
    ],
    "sandbox": true
}

Retrieves all GradeScale objects.

HTTP Request

GET /gradescales

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/gradescales/(gradescale)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/gradescales/(gradescale)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/gradescales/(gradescale)',
 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/gradescales/(gradescale)"), 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/gradescales/(gradescale)');
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": "grade_scale",
    "id": 1,
    "parent_id": 1,
    "owner_type": "year",
    "owner_id": 1,
    "pass_fail": false,
    "retake_threshold_grade_point_id": null,
    "retake_threshold_inclusive_direction": "higher",
    "retake_threshold_logic": "include_retakes_in_calculation",
    "sandbox": true
}

Retrieves a specific GradeScale object.

HTTP Request

GET /gradescales/(gradescale)

Parameters

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

Expandable Properties

Permissions

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