Create or update a subject track
curl --request PUT \
--url https://api.alpha-1edtech.ai/edubridge/subject-track/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"grade": "3",
"courseId": "<string>",
"orgSourcedId": "<string>"
}
'import requests
url = "https://api.alpha-1edtech.ai/edubridge/subject-track/"
payload = {
"grade": "3",
"courseId": "<string>",
"orgSourcedId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({grade: '3', courseId: '<string>', orgSourcedId: '<string>'})
};
fetch('https://api.alpha-1edtech.ai/edubridge/subject-track/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alpha-1edtech.ai/edubridge/subject-track/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'grade' => '3',
'courseId' => '<string>',
'orgSourcedId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.alpha-1edtech.ai/edubridge/subject-track/"
payload := strings.NewReader("{\n \"grade\": \"3\",\n \"courseId\": \"<string>\",\n \"orgSourcedId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.alpha-1edtech.ai/edubridge/subject-track/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"grade\": \"3\",\n \"courseId\": \"<string>\",\n \"orgSourcedId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpha-1edtech.ai/edubridge/subject-track/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"grade\": \"3\",\n \"courseId\": \"<string>\",\n \"orgSourcedId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subjectTrack": {
"id": "<string>",
"grade": "3",
"subject": "Reading",
"course": {
"status": "active",
"title": "<string>",
"org": {
"sourcedId": "<string>"
},
"sourcedId": "<string>",
"dateLastModified": "2023-11-07T05:31:56Z",
"metadata": {},
"courseCode": "<string>",
"grades": [
"3"
],
"subjects": [
"Reading"
],
"subjectCodes": [
"<string>"
],
"level": "<string>",
"primaryApp": "<string>"
},
"org": {
"sourcedId": "<string>",
"status": "active",
"name": "<string>",
"type": "department",
"identifier": "<string>",
"children": [],
"dateLastModified": "2023-11-07T05:31:56Z",
"metadata": {},
"parent": {
"href": "<string>",
"sourcedId": "<string>",
"type": "<string>"
}
}
}
}Subject Track
Create or update a subject track
Creates a new subject track or updates an existing one for the given organization, subject and grade with upsert behavior. If orgSourcedId is provided, creates an organization-specific track. If omitted, creates a global track that applies to all organizations. There can be only one target course per organization, subject and grade level combination.
PUT
/
edubridge
/
subject-track
/
Create or update a subject track
curl --request PUT \
--url https://api.alpha-1edtech.ai/edubridge/subject-track/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"grade": "3",
"courseId": "<string>",
"orgSourcedId": "<string>"
}
'import requests
url = "https://api.alpha-1edtech.ai/edubridge/subject-track/"
payload = {
"grade": "3",
"courseId": "<string>",
"orgSourcedId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({grade: '3', courseId: '<string>', orgSourcedId: '<string>'})
};
fetch('https://api.alpha-1edtech.ai/edubridge/subject-track/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alpha-1edtech.ai/edubridge/subject-track/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'grade' => '3',
'courseId' => '<string>',
'orgSourcedId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.alpha-1edtech.ai/edubridge/subject-track/"
payload := strings.NewReader("{\n \"grade\": \"3\",\n \"courseId\": \"<string>\",\n \"orgSourcedId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.alpha-1edtech.ai/edubridge/subject-track/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"grade\": \"3\",\n \"courseId\": \"<string>\",\n \"orgSourcedId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpha-1edtech.ai/edubridge/subject-track/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"grade\": \"3\",\n \"courseId\": \"<string>\",\n \"orgSourcedId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subjectTrack": {
"id": "<string>",
"grade": "3",
"subject": "Reading",
"course": {
"status": "active",
"title": "<string>",
"org": {
"sourcedId": "<string>"
},
"sourcedId": "<string>",
"dateLastModified": "2023-11-07T05:31:56Z",
"metadata": {},
"courseCode": "<string>",
"grades": [
"3"
],
"subjects": [
"Reading"
],
"subjectCodes": [
"<string>"
],
"level": "<string>",
"primaryApp": "<string>"
},
"org": {
"sourcedId": "<string>",
"status": "active",
"name": "<string>",
"type": "department",
"identifier": "<string>",
"children": [],
"dateLastModified": "2023-11-07T05:31:56Z",
"metadata": {},
"parent": {
"href": "<string>",
"sourcedId": "<string>",
"type": "<string>"
}
}
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
The subject for the track (required)
Available options:
Reading, Language, Vocabulary, Social Studies, Writing, Science, FastMath, Math, None, Other The grade level for the track (required)
Available options:
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 Example:
"3"
The course ID to associate with this track (required)
Minimum string length:
1Optional organization/school ID. If not provided, creates a global track that applies to all organizations
Response
200 - application/json
Successful response
Show child attributes
Show child attributes
⌘I