# oneroster_client
The OneRoster service binding is available in WSDL/XSD and REST/JSON. The model is based upon the IMS PSM modelling approach.

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
For more information, please visit [http://www.imsglobal.org](http://www.imsglobal.org)

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage

### Install Azure artifacts keyring to get access to StrongMind pip packages
`pip install twine keyring artifacts-keyring`

### pip install

```sh
pip install oneroster_client --extra-index-url https://pkgs.dev.azure.com/strongmind/Strongmind/_packaging/StrongMindPackages/pypi/simple/
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import oneroster_client 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:

```python
import oneroster_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import oneroster_client
from oneroster_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2Security
configuration = oneroster_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = oneroster_client.AcademicSessionsManagementApi(oneroster_client.ApiClient(configuration))
sourced_id = 'sourced_id_example' # str | The unique identifier for this academic session.

try:
    # The REST read request message for the getAcademicSession() API call.
    api_response = api_instance.get_academic_session(sourced_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AcademicSessionsManagementApi->get_academic_session: %s\n" % e)

# Configure OAuth2 access token for authorization: OAuth2Security
configuration = oneroster_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = oneroster_client.AcademicSessionsManagementApi(oneroster_client.ApiClient(configuration))
limit = 100 # int | To define the download segmentation value i.e. the maximum number of records to be contained in the response. (optional) (default to 100)
offset = 0 # int | The number of the first record to be supplied in the segmented response message. (optional) (default to 0)
continuation_token = 'continuation_token_example' # str | Allows the client to resume retrieving results from where the previous page left off (optional)
sort = 'sort_example' # str | Identifies the sort criteria to be used for the records in the response message. Use with the orderBy parameter. (optional)
order_by = 'order_by_example' # str | The form of ordering for response to the sorted request i.e. ascending (asc) or descending (desc). (optional)
filter = 'filter_example' # str | The filtering rules to be applied when identifying the records to be supplied in the response message. (optional)
fields = ['fields_example'] # list[str] | To identify the range of fields that should be supplied in the response message. (optional)

try:
    # The REST read request message for the getAcademicSessions() API call.
    api_response = api_instance.get_academic_sessions(limit=limit, offset=offset, continuation_token=continuation_token, sort=sort, order_by=order_by, filter=filter, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AcademicSessionsManagementApi->get_academic_sessions: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to */*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AcademicSessionsManagementApi* | [**get_academic_session**](docs/AcademicSessionsManagementApi.md#get_academic_session) | **GET** /academicSessions/{sourcedId} | The REST read request message for the getAcademicSession() API call.
*AcademicSessionsManagementApi* | [**get_academic_sessions**](docs/AcademicSessionsManagementApi.md#get_academic_sessions) | **GET** /academicSessions | The REST read request message for the getAcademicSessions() API call.
*CategoriesManagementApi* | [**delete_category**](docs/CategoriesManagementApi.md#delete_category) | **DELETE** /categories/{sourcedId} | The REST delete request message for the deleteCategory() API call.
*CategoriesManagementApi* | [**get_categories**](docs/CategoriesManagementApi.md#get_categories) | **GET** /categories | The REST read request message for the getCategories() API call.
*CategoriesManagementApi* | [**get_category**](docs/CategoriesManagementApi.md#get_category) | **GET** /categories/{sourcedId} | The REST read request message for the getCategory() API call.
*CategoriesManagementApi* | [**put_category**](docs/CategoriesManagementApi.md#put_category) | **PUT** /categories/{sourcedId} | The REST create request message for the putCategory() API call.
*ClassesManagementApi* | [**get_class**](docs/ClassesManagementApi.md#get_class) | **GET** /classes/{sourcedId} | The REST read request message for the getClass() API call.
*ClassesManagementApi* | [**get_classes**](docs/ClassesManagementApi.md#get_classes) | **GET** /classes | The REST read request message for the getClasses() API call.
*ClassesManagementApi* | [**get_classes_for_course**](docs/ClassesManagementApi.md#get_classes_for_course) | **GET** /courses/{courseSourcedId}/classes | The REST read request message for the getClassesForCourse() API call.
*ClassesManagementApi* | [**get_classes_for_school**](docs/ClassesManagementApi.md#get_classes_for_school) | **GET** /schools/{schoolSourcedId}/classes | The REST read request message for the getClassesForSchool() API call.
*ClassesManagementApi* | [**get_classes_for_student**](docs/ClassesManagementApi.md#get_classes_for_student) | **GET** /students/{studentSourcedId}/classes | The REST read request message for the getClassesForStudent() API call.
*ClassesManagementApi* | [**get_classes_for_teacher**](docs/ClassesManagementApi.md#get_classes_for_teacher) | **GET** /teachers/{teacherSourcedId}/classes | The REST read request message for the getClassesForTeacher() API call.
*ClassesManagementApi* | [**get_classes_for_term**](docs/ClassesManagementApi.md#get_classes_for_term) | **GET** /terms/{termSourcedId}/classes | The REST read request message for the getClassesForTerm() API call.
*ClassesManagementApi* | [**get_classes_for_user**](docs/ClassesManagementApi.md#get_classes_for_user) | **GET** /users/{userSourcedId}/classes | The REST read request message for the getClassesForUser() API call.
*CoursesManagementApi* | [**get_course**](docs/CoursesManagementApi.md#get_course) | **GET** /courses/{sourcedId} | The REST read request message for the getCourse() API call.
*CoursesManagementApi* | [**get_courses**](docs/CoursesManagementApi.md#get_courses) | **GET** /courses | The REST read request message for the getCourses() API call.
*CoursesManagementApi* | [**get_courses_for_school**](docs/CoursesManagementApi.md#get_courses_for_school) | **GET** /schools/{schoolSourcedId}/courses | The REST read request message for the getCoursesForSchool() API call.
*DemographicsManagementApi* | [**get_demographic**](docs/DemographicsManagementApi.md#get_demographic) | **GET** /demographics/{sourcedId} | The REST read request message for the getDemographic() API call.
*DemographicsManagementApi* | [**get_demographics**](docs/DemographicsManagementApi.md#get_demographics) | **GET** /demographics | The REST read request message for the getDemographics() API call.
*EnrollmentsManagementApi* | [**get_enrollment**](docs/EnrollmentsManagementApi.md#get_enrollment) | **GET** /enrollments/{sourcedId} | The REST read request message for the getEnrollment() API call.
*EnrollmentsManagementApi* | [**get_enrollments**](docs/EnrollmentsManagementApi.md#get_enrollments) | **GET** /enrollments | The REST read request message for the getEnrollments() API call.
*EnrollmentsManagementApi* | [**get_enrollments_for_class_in_school**](docs/EnrollmentsManagementApi.md#get_enrollments_for_class_in_school) | **GET** /schools/{schoolSourcedId}/classes/{classSourcedId}/enrollments | The REST read request message for the getEnrollmentsForClassInSchool() API call.
*EnrollmentsManagementApi* | [**get_enrollments_for_school**](docs/EnrollmentsManagementApi.md#get_enrollments_for_school) | **GET** /schools/{schoolSourcedId}/enrollments | The REST read request message for the getEnrollmentsForSchool() API call.
*GradingPeriodsManagementApi* | [**get_grading_period**](docs/GradingPeriodsManagementApi.md#get_grading_period) | **GET** /gradingPeriods/{sourcedId} | The REST read request message for the getGradingPeriod() API call.
*GradingPeriodsManagementApi* | [**get_grading_periods**](docs/GradingPeriodsManagementApi.md#get_grading_periods) | **GET** /gradingPeriods | The REST read request message for the getGradingPeriods() API call.
*GradingPeriodsManagementApi* | [**get_grading_periods_for_term**](docs/GradingPeriodsManagementApi.md#get_grading_periods_for_term) | **GET** /terms/{termSourcedId}/gradingPeriods | The REST read request message for the getGradingPeriodsForTerm() API call.
*LineItemsManagementApi* | [**delete_line_item**](docs/LineItemsManagementApi.md#delete_line_item) | **DELETE** /lineItems/{sourcedId} | The REST delete request message for the deleteLineItem() API call.
*LineItemsManagementApi* | [**get_line_item**](docs/LineItemsManagementApi.md#get_line_item) | **GET** /lineItems/{sourcedId} | The REST read request message for the getLineItem() API call.
*LineItemsManagementApi* | [**get_line_items**](docs/LineItemsManagementApi.md#get_line_items) | **GET** /lineItems | The REST read request message for the getLineItems() API call.
*LineItemsManagementApi* | [**get_line_items_for_class**](docs/LineItemsManagementApi.md#get_line_items_for_class) | **GET** /classes/{classSourcedId}/lineitems | The REST read request message for the getLineItemsForClass() API call.
*LineItemsManagementApi* | [**put_line_item**](docs/LineItemsManagementApi.md#put_line_item) | **PUT** /lineItems/{sourcedId} | The REST create request message for the putLineItem() API call.
*OrgsManagementApi* | [**get_org**](docs/OrgsManagementApi.md#get_org) | **GET** /orgs/{sourcedId} | The REST read request message for the getOrg() API call.
*OrgsManagementApi* | [**get_orgs**](docs/OrgsManagementApi.md#get_orgs) | **GET** /orgs | The REST read request message for the getOrgs() API call.
*ResourcesManagementApi* | [**get_resource**](docs/ResourcesManagementApi.md#get_resource) | **GET** /resources/{sourcedId} | The REST read request message for the getResource() API call.
*ResourcesManagementApi* | [**get_resources**](docs/ResourcesManagementApi.md#get_resources) | **GET** /resources | The REST read request message for the getResources() API call.
*ResourcesManagementApi* | [**get_resources_for_class**](docs/ResourcesManagementApi.md#get_resources_for_class) | **GET** /classes/{classSourcedId}/resources | The REST read request message for the getResourcesForClass() API call.
*ResourcesManagementApi* | [**get_resources_for_course**](docs/ResourcesManagementApi.md#get_resources_for_course) | **GET** /courses/{courseSourcedId}/resources | The REST read request message for the getResourcesForCourse() API call.
*ResultsManagementApi* | [**delete_result**](docs/ResultsManagementApi.md#delete_result) | **DELETE** /results/{sourcedId} | The REST delete request message for the deleteResult() API call.
*ResultsManagementApi* | [**get_result**](docs/ResultsManagementApi.md#get_result) | **GET** /results/{sourcedId} | The REST read request message for the getResult() API call.
*ResultsManagementApi* | [**get_results**](docs/ResultsManagementApi.md#get_results) | **GET** /results | The REST read request message for the getResults() API call.
*ResultsManagementApi* | [**get_results_for_class**](docs/ResultsManagementApi.md#get_results_for_class) | **GET** /classes/{classSourcedId}/results | The REST read request message for the getResultsForClass() API call.
*ResultsManagementApi* | [**get_results_for_line_item_for_class**](docs/ResultsManagementApi.md#get_results_for_line_item_for_class) | **GET** /classes/{classSourcedId}/lineItems/{lineItemSourcedId}/results | The REST read request message for the getResultsForLineItemForClass() API call.
*ResultsManagementApi* | [**get_results_for_student_for_class**](docs/ResultsManagementApi.md#get_results_for_student_for_class) | **GET** /classes/{classSourcedId}/students/{studentSourcedId}/results | The REST read request message for the getResultsForStudentForClass() API call.
*ResultsManagementApi* | [**put_result**](docs/ResultsManagementApi.md#put_result) | **PUT** /results/{sourcedId} | The REST create request message for the putResult() API call.
*SchoolsManagementApi* | [**get_school**](docs/SchoolsManagementApi.md#get_school) | **GET** /schools/{sourcedId} | The REST read request message for the getSchool() API call.
*SchoolsManagementApi* | [**get_schools**](docs/SchoolsManagementApi.md#get_schools) | **GET** /schools | The REST read request message for the getSchools() API call.
*StudentsManagementApi* | [**get_student**](docs/StudentsManagementApi.md#get_student) | **GET** /students/{sourcedId} | The REST read request message for the getStudent() API call.
*StudentsManagementApi* | [**get_students**](docs/StudentsManagementApi.md#get_students) | **GET** /students | The REST read request message for the getStudents() API call.
*StudentsManagementApi* | [**get_students_for_class**](docs/StudentsManagementApi.md#get_students_for_class) | **GET** /classes/{classSourcedId}/students | The REST read request message for the getStudentsForClass() API call.
*StudentsManagementApi* | [**get_students_for_class_in_school**](docs/StudentsManagementApi.md#get_students_for_class_in_school) | **GET** /schools/{schoolSourcedId}/classes/{classSourcedId}/students | The REST read request message for the getStudentsForClassInSchool() API call.
*StudentsManagementApi* | [**get_students_for_school**](docs/StudentsManagementApi.md#get_students_for_school) | **GET** /schools/{schoolSourcedId}/students | The REST read request message for the getStudentsForSchool() API call.
*TeachersManagementApi* | [**get_teacher**](docs/TeachersManagementApi.md#get_teacher) | **GET** /teachers/{sourcedId} | The REST read request message for the getTeacher() API call.
*TeachersManagementApi* | [**get_teachers**](docs/TeachersManagementApi.md#get_teachers) | **GET** /teachers | The REST read request message for the getTeachers() API call.
*TeachersManagementApi* | [**get_teachers_for_class**](docs/TeachersManagementApi.md#get_teachers_for_class) | **GET** /classes/{classSourcedId}/teachers | The REST read request message for the getTeachersForClass() API call.
*TeachersManagementApi* | [**get_teachers_for_class_in_school**](docs/TeachersManagementApi.md#get_teachers_for_class_in_school) | **GET** /schools/{schoolSourcedId}/classes/{classSourcedId}/teachers | The REST read request message for the getTeachersForClassInSchool() API call.
*TeachersManagementApi* | [**get_teachers_for_school**](docs/TeachersManagementApi.md#get_teachers_for_school) | **GET** /schools/{schoolSourcedId}/teachers | The REST read request message for the getTeachersForSchool() API call.
*TermsManagementApi* | [**get_term**](docs/TermsManagementApi.md#get_term) | **GET** /terms/{sourcedId} | The REST read request message for the getTerm() API call.
*TermsManagementApi* | [**get_terms**](docs/TermsManagementApi.md#get_terms) | **GET** /terms | The REST read request message for the getTerms() API call.
*TermsManagementApi* | [**get_terms_for_school**](docs/TermsManagementApi.md#get_terms_for_school) | **GET** /schools/{schoolSourcedId}/terms | The REST read request message for the getTermsForSchool() API call.
*UsersManagementApi* | [**get_user**](docs/UsersManagementApi.md#get_user) | **GET** /users/{sourcedId} | The REST read request message for the getUser() API call.
*UsersManagementApi* | [**get_users**](docs/UsersManagementApi.md#get_users) | **GET** /users | The REST read request message for the getUsers() API call.

## Documentation For Models

 - [AcademicSessionType](docs/AcademicSessionType.md)
 - [AcademicSessionTypeAllOf](docs/AcademicSessionTypeAllOf.md)
 - [BaseType](docs/BaseType.md)
 - [CategoriesType](docs/CategoriesType.md)
 - [CategoryType](docs/CategoryType.md)
 - [CategoryTypeAllOf](docs/CategoryTypeAllOf.md)
 - [ClassType](docs/ClassType.md)
 - [ClassTypeAllOf](docs/ClassTypeAllOf.md)
 - [ClassesType](docs/ClassesType.md)
 - [CourseType](docs/CourseType.md)
 - [CourseTypeAllOf](docs/CourseTypeAllOf.md)
 - [CoursesType](docs/CoursesType.md)
 - [DemographicType](docs/DemographicType.md)
 - [DemographicTypeAllOf](docs/DemographicTypeAllOf.md)
 - [DemographicsType](docs/DemographicsType.md)
 - [EnrollmentType](docs/EnrollmentType.md)
 - [EnrollmentTypeAllOf](docs/EnrollmentTypeAllOf.md)
 - [EnrollmentsType](docs/EnrollmentsType.md)
 - [GUIDRefType](docs/GUIDRefType.md)
 - [GUIDType](docs/GUIDType.md)
 - [IdentifierType](docs/IdentifierType.md)
 - [ImsxCodeMinorFieldType](docs/ImsxCodeMinorFieldType.md)
 - [ImsxCodeMinorType](docs/ImsxCodeMinorType.md)
 - [ImsxStatusInfoType](docs/ImsxStatusInfoType.md)
 - [LineItemType](docs/LineItemType.md)
 - [LineItemTypeAllOf](docs/LineItemTypeAllOf.md)
 - [LineItemsType](docs/LineItemsType.md)
 - [MetadataType](docs/MetadataType.md)
 - [MultipleAcademicSessionsType](docs/MultipleAcademicSessionsType.md)
 - [OrgType](docs/OrgType.md)
 - [OrgTypeAllOf](docs/OrgTypeAllOf.md)
 - [OrgsType](docs/OrgsType.md)
 - [ResourceType](docs/ResourceType.md)
 - [ResourceTypeAllOf](docs/ResourceTypeAllOf.md)
 - [ResourcesType](docs/ResourcesType.md)
 - [ResultType](docs/ResultType.md)
 - [ResultTypeAllOf](docs/ResultTypeAllOf.md)
 - [ResultsType](docs/ResultsType.md)
 - [SingleAcademicSessionType](docs/SingleAcademicSessionType.md)
 - [SingleCategoryType](docs/SingleCategoryType.md)
 - [SingleClassType](docs/SingleClassType.md)
 - [SingleCourseType](docs/SingleCourseType.md)
 - [SingleDemographicsType](docs/SingleDemographicsType.md)
 - [SingleEnrollmentType](docs/SingleEnrollmentType.md)
 - [SingleLineItemType](docs/SingleLineItemType.md)
 - [SingleOrgType](docs/SingleOrgType.md)
 - [SingleResourceType](docs/SingleResourceType.md)
 - [SingleResultType](docs/SingleResultType.md)
 - [SingleUserType](docs/SingleUserType.md)
 - [UserIdType](docs/UserIdType.md)
 - [UserType](docs/UserType.md)
 - [UserTypeAllOf](docs/UserTypeAllOf.md)
 - [UsersType](docs/UsersType.md)

## Documentation For Authorization


## OAuth2Security

- **Type**: OAuth
- **Flow**: application
- **Authorization URL**: 
- **Scopes**: 
 - **StrongMind.Platform.OneRoster.Read**: Read access to OneRoster resources


## Author

platform@strongmind.com
