Create or update course
curl --request PUT \
--url https://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"course": {
"sourcedId": "<string>",
"title": "<string>",
"courseCode": "<string>",
"org": {
"href": "<string>",
"sourcedId": "<string>"
},
"metadata": {},
"grades": [
"<string>"
],
"subjects": [
"<string>"
],
"subjectCodes": [
"<string>"
],
"schoolYear": {
"href": "<string>",
"sourcedId": "<string>"
}
}
}
'import requests
url = "https://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}"
payload = { "course": {
"sourcedId": "<string>",
"title": "<string>",
"courseCode": "<string>",
"org": {
"href": "<string>",
"sourcedId": "<string>"
},
"metadata": {},
"grades": ["<string>"],
"subjects": ["<string>"],
"subjectCodes": ["<string>"],
"schoolYear": {
"href": "<string>",
"sourcedId": "<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({
course: {
sourcedId: '<string>',
title: '<string>',
courseCode: '<string>',
org: {href: '<string>', sourcedId: '<string>'},
metadata: {},
grades: ['<string>'],
subjects: ['<string>'],
subjectCodes: ['<string>'],
schoolYear: {href: '<string>', sourcedId: '<string>'}
}
})
};
fetch('https://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}', 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://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}",
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([
'course' => [
'sourcedId' => '<string>',
'title' => '<string>',
'courseCode' => '<string>',
'org' => [
'href' => '<string>',
'sourcedId' => '<string>'
],
'metadata' => [
],
'grades' => [
'<string>'
],
'subjects' => [
'<string>'
],
'subjectCodes' => [
'<string>'
],
'schoolYear' => [
'href' => '<string>',
'sourcedId' => '<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://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}"
payload := strings.NewReader("{\n \"course\": {\n \"sourcedId\": \"<string>\",\n \"title\": \"<string>\",\n \"courseCode\": \"<string>\",\n \"org\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n },\n \"metadata\": {},\n \"grades\": [\n \"<string>\"\n ],\n \"subjects\": [\n \"<string>\"\n ],\n \"subjectCodes\": [\n \"<string>\"\n ],\n \"schoolYear\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n }\n }\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://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"course\": {\n \"sourcedId\": \"<string>\",\n \"title\": \"<string>\",\n \"courseCode\": \"<string>\",\n \"org\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n },\n \"metadata\": {},\n \"grades\": [\n \"<string>\"\n ],\n \"subjects\": [\n \"<string>\"\n ],\n \"subjectCodes\": [\n \"<string>\"\n ],\n \"schoolYear\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}")
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 \"course\": {\n \"sourcedId\": \"<string>\",\n \"title\": \"<string>\",\n \"courseCode\": \"<string>\",\n \"org\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n },\n \"metadata\": {},\n \"grades\": [\n \"<string>\"\n ],\n \"subjects\": [\n \"<string>\"\n ],\n \"subjectCodes\": [\n \"<string>\"\n ],\n \"schoolYear\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyCourses
Create or update course
Create a new course or update an existing course by its sourcedId
PUT
/
rostering
/
1.0
/
courses
/
{sourcedId}
Create or update course
curl --request PUT \
--url https://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"course": {
"sourcedId": "<string>",
"title": "<string>",
"courseCode": "<string>",
"org": {
"href": "<string>",
"sourcedId": "<string>"
},
"metadata": {},
"grades": [
"<string>"
],
"subjects": [
"<string>"
],
"subjectCodes": [
"<string>"
],
"schoolYear": {
"href": "<string>",
"sourcedId": "<string>"
}
}
}
'import requests
url = "https://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}"
payload = { "course": {
"sourcedId": "<string>",
"title": "<string>",
"courseCode": "<string>",
"org": {
"href": "<string>",
"sourcedId": "<string>"
},
"metadata": {},
"grades": ["<string>"],
"subjects": ["<string>"],
"subjectCodes": ["<string>"],
"schoolYear": {
"href": "<string>",
"sourcedId": "<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({
course: {
sourcedId: '<string>',
title: '<string>',
courseCode: '<string>',
org: {href: '<string>', sourcedId: '<string>'},
metadata: {},
grades: ['<string>'],
subjects: ['<string>'],
subjectCodes: ['<string>'],
schoolYear: {href: '<string>', sourcedId: '<string>'}
}
})
};
fetch('https://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}', 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://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}",
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([
'course' => [
'sourcedId' => '<string>',
'title' => '<string>',
'courseCode' => '<string>',
'org' => [
'href' => '<string>',
'sourcedId' => '<string>'
],
'metadata' => [
],
'grades' => [
'<string>'
],
'subjects' => [
'<string>'
],
'subjectCodes' => [
'<string>'
],
'schoolYear' => [
'href' => '<string>',
'sourcedId' => '<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://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}"
payload := strings.NewReader("{\n \"course\": {\n \"sourcedId\": \"<string>\",\n \"title\": \"<string>\",\n \"courseCode\": \"<string>\",\n \"org\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n },\n \"metadata\": {},\n \"grades\": [\n \"<string>\"\n ],\n \"subjects\": [\n \"<string>\"\n ],\n \"subjectCodes\": [\n \"<string>\"\n ],\n \"schoolYear\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n }\n }\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://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"course\": {\n \"sourcedId\": \"<string>\",\n \"title\": \"<string>\",\n \"courseCode\": \"<string>\",\n \"org\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n },\n \"metadata\": {},\n \"grades\": [\n \"<string>\"\n ],\n \"subjects\": [\n \"<string>\"\n ],\n \"subjectCodes\": [\n \"<string>\"\n ],\n \"schoolYear\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.dev.timeback.com/rostering/1.0/courses/{sourcedId}")
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 \"course\": {\n \"sourcedId\": \"<string>\",\n \"title\": \"<string>\",\n \"courseCode\": \"<string>\",\n \"org\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n },\n \"metadata\": {},\n \"grades\": [\n \"<string>\"\n ],\n \"subjects\": [\n \"<string>\"\n ],\n \"subjectCodes\": [\n \"<string>\"\n ],\n \"schoolYear\": {\n \"href\": \"<string>\",\n \"sourcedId\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
OAuth 2.0 client credentials flow. Contact timeback@trilogy.com to request credentials for your application.
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Response
Course created successfully
⌘I