Skip to content

Latest commit

 

History

History
191 lines (139 loc) · 7.85 KB

CoursesManagementApi.md

File metadata and controls

191 lines (139 loc) · 7.85 KB

OneRosterClient::CoursesManagementApi

All URIs are relative to /

Method HTTP request Description
get_course GET /courses/{sourcedId} The REST read request message for the getCourse() API call.
get_courses GET /courses The REST read request message for the getCourses() API call.
get_courses_for_school GET /schools/{schoolSourcedId}/courses The REST read request message for the getCoursesForSchool() API call.

get_course

SingleCourseType get_course(sourced_id)

The REST read request message for the getCourse() API call.

To read, get, a specific course.

Example

# load the gem
require 'oneroster_client'
# setup authorization
OneRosterClient.configure do |config|
  # Configure OAuth2 access token for authorization: OAuth2Security
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = OneRosterClient::CoursesManagementApi.new
sourced_id = 'sourced_id_example' # String | The unique identifier for this course.


begin
  #The REST read request message for the getCourse() API call.
  result = api_instance.get_course(sourced_id)
  p result
rescue OneRosterClient::ApiError => e
  puts "Exception when calling CoursesManagementApi->get_course: #{e}"
end

Parameters

Name Type Description Notes
sourced_id String The unique identifier for this course.

Return type

SingleCourseType

Authorization

OAuth2Security

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_courses

CoursesType get_courses(opts)

The REST read request message for the getCourses() API call.

To read, get, a collection of courses i.e. all courses.

Example

# load the gem
require 'oneroster_client'
# setup authorization
OneRosterClient.configure do |config|
  # Configure OAuth2 access token for authorization: OAuth2Security
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = OneRosterClient::CoursesManagementApi.new
opts = { 
  limit: 100, # Integer | To define the download segmentation value i.e. the maximum number of records to be contained in the response.
  offset: 0, # Integer | The number of the first record to be supplied in the segmented response message.
  continuation_token: 'continuation_token_example', # String | Allows the client to resume retrieving results from where the previous page left off
  sort: 'sort_example', # String | Identifies the sort criteria to be used for the records in the response message. Use with the orderBy parameter.
  order_by: 'order_by_example', # String | The form of ordering for response to the sorted request i.e. ascending (asc) or descending (desc).
  filter: 'filter_example', # String | The filtering rules to be applied when identifying the records to be supplied in the response message.
  fields: ['fields_example'] # Array<String> | To identify the range of fields that should be supplied in the response message.
}

begin
  #The REST read request message for the getCourses() API call.
  result = api_instance.get_courses(opts)
  p result
rescue OneRosterClient::ApiError => e
  puts "Exception when calling CoursesManagementApi->get_courses: #{e}"
end

Parameters

Name Type Description Notes
limit Integer To define the download segmentation value i.e. the maximum number of records to be contained in the response. [optional] [default to 100]
offset Integer The number of the first record to be supplied in the segmented response message. [optional] [default to 0]
continuation_token String Allows the client to resume retrieving results from where the previous page left off [optional]
sort String Identifies the sort criteria to be used for the records in the response message. Use with the orderBy parameter. [optional]
order_by String The form of ordering for response to the sorted request i.e. ascending (asc) or descending (desc). [optional]
filter String The filtering rules to be applied when identifying the records to be supplied in the response message. [optional]
fields Array<String> To identify the range of fields that should be supplied in the response message. [optional]

Return type

CoursesType

Authorization

OAuth2Security

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_courses_for_school

CoursesType get_courses_for_school(school_sourced_id, opts)

The REST read request message for the getCoursesForSchool() API call.

...not supplied...

Example

# load the gem
require 'oneroster_client'
# setup authorization
OneRosterClient.configure do |config|
  # Configure OAuth2 access token for authorization: OAuth2Security
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = OneRosterClient::CoursesManagementApi.new
school_sourced_id = 'school_sourced_id_example' # String | ...tbd...
opts = { 
  limit: 100, # Integer | To define the download segmentation value i.e. the maximum number of records to be contained in the response.
  offset: 0, # Integer | The number of the first record to be supplied in the segmented response message.
  continuation_token: 'continuation_token_example', # String | Allows the client to resume retrieving results from where the previous page left off
  sort: 'sort_example', # String | Identifies the sort criteria to be used for the records in the response message. Use with the orderBy parameter.
  order_by: 'order_by_example', # String | The form of ordering for response to the sorted request i.e. ascending (asc) or descending (desc).
  filter: 'filter_example', # String | The filtering rules to be applied when identifying the records to be supplied in the response message.
  fields: ['fields_example'] # Array<String> | To identify the range of fields that should be supplied in the response message.
}

begin
  #The REST read request message for the getCoursesForSchool() API call.
  result = api_instance.get_courses_for_school(school_sourced_id, opts)
  p result
rescue OneRosterClient::ApiError => e
  puts "Exception when calling CoursesManagementApi->get_courses_for_school: #{e}"
end

Parameters

Name Type Description Notes
school_sourced_id String ...tbd...
limit Integer To define the download segmentation value i.e. the maximum number of records to be contained in the response. [optional] [default to 100]
offset Integer The number of the first record to be supplied in the segmented response message. [optional] [default to 0]
continuation_token String Allows the client to resume retrieving results from where the previous page left off [optional]
sort String Identifies the sort criteria to be used for the records in the response message. Use with the orderBy parameter. [optional]
order_by String The form of ordering for response to the sorted request i.e. ascending (asc) or descending (desc). [optional]
filter String The filtering rules to be applied when identifying the records to be supplied in the response message. [optional]
fields Array<String> To identify the range of fields that should be supplied in the response message. [optional]

Return type

CoursesType

Authorization

OAuth2Security

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json