All URIs are relative to https://api.flat.io/v2
Method | HTTP request | Description |
---|---|---|
activate_class | POST /classes/{class}/activate | Activate the class |
add_class_user | PUT /classes/{class}/users/{user} | Add a user to the class |
archive_assignment | POST /classes/{class}/assignments/{assignment}/archive | Archive the assignment |
archive_class | POST /classes/{class}/archive | Archive the class |
copy_assignment | POST /classes/{class}/assignments/{assignment}/copy | Copy an assignment |
create_class | POST /classes | Create a new class |
create_class_assignment | POST /classes/{class}/assignments | Assignment creation |
create_submission | PUT /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission |
create_test_student_account | POST /classes/{class}/testStudent | Create a test student account |
delete_class_user | DELETE /classes/{class}/users/{user} | Remove a user from the class |
delete_submission | DELETE /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission |
delete_submission_comment | DELETE /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission |
edit_submission | PUT /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission |
enroll_class | POST /classes/enroll/{enrollmentCode} | Join a class |
export_submissions_reviews_as_csv | GET /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports |
export_submissions_reviews_as_excel | GET /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports |
get_class | GET /classes/{class} | Get the details of a single class |
get_score_submissions | GET /scores/{score}/submissions | List submissions related to the score |
get_submission | GET /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission |
get_submission_comments | GET /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission |
get_submission_history | GET /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission |
get_submissions | GET /classes/{class}/assignments/{assignment}/submissions | List the students' submissions |
list_assignments | GET /classes/{class}/assignments | Assignments listing |
list_class_student_submissions | GET /classes/{class}/students/{user}/submissions | List the submissions for a student |
list_classes | GET /classes | List the classes available for the current user |
post_submission_comment | POST /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission |
unarchive_assignment | DELETE /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. |
unarchive_class | DELETE /classes/{class}/archive | Unarchive the class |
update_class | PUT /classes/{class} | Update the class |
update_submission_comment | PUT /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission |
ClassDetails activate_class(var_class)
Activate the class
Mark the class as active
. This is mainly used for classes synchronized from Clever that are initially with an inactive
state and hidden in the UI.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_details import ClassDetails
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
try:
# Activate the class
api_response = api_instance.activate_class(var_class)
print("The response of ClassApi->activate_class:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->activate_class: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The class details | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
add_class_user(var_class, user)
Add a user to the class
This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
user = 'user_example' # str | Unique identifier of the user
try:
# Add a user to the class
api_instance.add_class_user(var_class, user)
except Exception as e:
print("Exception when calling ClassApi->add_class_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
user | str | Unique identifier of the user |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | The user has been added to the class | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Assignment archive_assignment(var_class, assignment)
Archive the assignment
Archive the assignment
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment import Assignment
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
try:
# Archive the assignment
api_response = api_instance.archive_assignment(var_class, assignment)
print("The response of ClassApi->archive_assignment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->archive_assignment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The assignment details | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClassDetails archive_class(var_class)
Archive the class
Mark the class as archived
. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_details import ClassDetails
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
try:
# Archive the class
api_response = api_instance.archive_class(var_class)
print("The response of ClassApi->archive_class:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->archive_class: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The class details | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssignmentCopyResponse copy_assignment(var_class, assignment, body)
Copy an assignment
Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_copy import AssignmentCopy
from flat_api.models.assignment_copy_response import AssignmentCopyResponse
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
body = flat_api.AssignmentCopy() # AssignmentCopy |
try:
# Copy an assignment
api_response = api_instance.copy_assignment(var_class, assignment, body)
print("The response of ClassApi->copy_assignment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->copy_assignment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
body | AssignmentCopy |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The new created assignment | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClassDetails create_class(body)
Create a new class
Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using PUT /classes/{class}/users/{user}
, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using POST /classes/enroll/{enrollmentCode}
and the enrollmentCode
returned in the ClassDetails
response.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_creation import ClassCreation
from flat_api.models.class_details import ClassDetails
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
body = flat_api.ClassCreation() # ClassCreation |
try:
# Create a new class
api_response = api_instance.create_class(body)
print("The response of ClassApi->create_class:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->create_class: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | ClassCreation |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The new class details | - |
402 | Account overquota | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Assignment create_class_assignment(var_class, body)
Assignment creation
Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment import Assignment
from flat_api.models.class_assignment_update import ClassAssignmentUpdate
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
body = flat_api.ClassAssignmentUpdate() # ClassAssignmentUpdate |
try:
# Assignment creation
api_response = api_instance.create_class_assignment(var_class, body)
print("The response of ClassApi->create_class_assignment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->create_class_assignment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
body | ClassAssignmentUpdate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The assignment has been created | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssignmentSubmission create_submission(var_class, assignment, body)
Create or edit a submission
Use this method as a student to create, update and submit a submission related to an assignment. Students can only set attachments
and submit
. Teachers can use PUT /classes/{class}/assignments/{assignment}/submissions/{submission}
to update a submission by id.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission import AssignmentSubmission
from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate |
try:
# Create or edit a submission
api_response = api_instance.create_submission(var_class, assignment, body)
print("The response of ClassApi->create_submission:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->create_submission: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
body | AssignmentSubmissionUpdate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The submission | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserDetails create_test_student_account(var_class, reset=reset)
Create a test student account
Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.user_details import UserDetails
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
reset = True # bool | If true, the testing account will be re-created. (optional)
try:
# Create a test student account
api_response = api_instance.create_test_student_account(var_class, reset=reset)
print("The response of ClassApi->create_test_student_account:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->create_test_student_account: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
reset | bool | If true, the testing account will be re-created. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Test account created | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_class_user(var_class, user)
Remove a user from the class
This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
user = 'user_example' # str | Unique identifier of the user
try:
# Remove a user from the class
api_instance.delete_class_user(var_class, user)
except Exception as e:
print("Exception when calling ClassApi->delete_class_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
user | str | Unique identifier of the user |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | The user has been removed from the class | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssignmentSubmission delete_submission(var_class, assignment, submission)
Reset a submission
Use this method as a teacher to reset a submission and allow student to start over the assignment
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission import AssignmentSubmission
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
submission = 'submission_example' # str | Unique identifier of the submission
try:
# Reset a submission
api_response = api_instance.delete_submission(var_class, assignment, submission)
print("The response of ClassApi->delete_submission:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->delete_submission: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
submission | str | Unique identifier of the submission |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The submission object once reset | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_submission_comment(var_class, assignment, submission, comment)
Delete a feedback comment to a submission
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
submission = 'submission_example' # str | Unique identifier of the submission
comment = 'comment_example' # str | Unique identifier of the comment
try:
# Delete a feedback comment to a submission
api_instance.delete_submission_comment(var_class, assignment, submission, comment)
except Exception as e:
print("Exception when calling ClassApi->delete_submission_comment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
submission | str | Unique identifier of the submission | |
comment | str | Unique identifier of the comment |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | The comment has been deleted | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssignmentSubmission edit_submission(var_class, assignment, submission, body)
Edit a submission
Use this method as a teacher to update the different submission and give feedback. Teachers can only set return
, draftGrade
and grade
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission import AssignmentSubmission
from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
submission = 'submission_example' # str | Unique identifier of the submission
body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate |
try:
# Edit a submission
api_response = api_instance.edit_submission(var_class, assignment, submission, body)
print("The response of ClassApi->edit_submission:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->edit_submission: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
submission | str | Unique identifier of the submission | |
body | AssignmentSubmissionUpdate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The submission | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClassDetails enroll_class(enrollment_code)
Join a class
Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the ClassDetails
returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_details import ClassDetails
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
enrollment_code = 'enrollment_code_example' # str | The enrollment code, available to the teacher in `ClassDetails`
try:
# Join a class
api_response = api_instance.enroll_class(enrollment_code)
print("The response of ClassApi->enroll_class:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->enroll_class: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
enrollment_code | str | The enrollment code, available to the teacher in `ClassDetails` |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The new class details | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray export_submissions_reviews_as_csv(var_class, assignment)
CSV Grades exports
Export list of submissions grades to a CSV file
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
try:
# CSV Grades exports
api_response = api_instance.export_submissions_reviews_as_csv(var_class, assignment)
print("The response of ClassApi->export_submissions_reviews_as_csv:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->export_submissions_reviews_as_csv: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment |
bytearray
- Content-Type: Not defined
- Accept: text/csv
Status code | Description | Response headers |
---|---|---|
200 | List of submissions | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray export_submissions_reviews_as_excel(var_class, assignment)
Excel Grades exports
Export list of submissions grades to an Excel file
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
try:
# Excel Grades exports
api_response = api_instance.export_submissions_reviews_as_excel(var_class, assignment)
print("The response of ClassApi->export_submissions_reviews_as_excel:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->export_submissions_reviews_as_excel: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment |
bytearray
- Content-Type: Not defined
- Accept: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Status code | Description | Response headers |
---|---|---|
200 | List of submissions | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClassDetails get_class(var_class)
Get the details of a single class
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_details import ClassDetails
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
try:
# Get the details of a single class
api_response = api_instance.get_class(var_class)
print("The response of ClassApi->get_class:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->get_class: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The new class details | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[AssignmentSubmission] get_score_submissions(score)
List submissions related to the score
This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission import AssignmentSubmission
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
score = 'score_example' # str | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
try:
# List submissions related to the score
api_response = api_instance.get_score_submissions(score)
print("The response of ClassApi->get_score_submissions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->get_score_submissions: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
score | str | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List of submissions | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssignmentSubmission get_submission(var_class, assignment, submission)
Get a student submission
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission import AssignmentSubmission
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
submission = 'submission_example' # str | Unique identifier of the submission
try:
# Get a student submission
api_response = api_instance.get_submission(var_class, assignment, submission)
print("The response of ClassApi->get_submission:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->get_submission: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
submission | str | Unique identifier of the submission |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A submission | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[AssignmentSubmissionComment] get_submission_comments(var_class, assignment, submission)
List the feedback comments of a submission
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
submission = 'submission_example' # str | Unique identifier of the submission
try:
# List the feedback comments of a submission
api_response = api_instance.get_submission_comments(var_class, assignment, submission)
print("The response of ClassApi->get_submission_comments:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->get_submission_comments: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
submission | str | Unique identifier of the submission |
List[AssignmentSubmissionComment]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The comments of the score | - |
403 | Not granted to access to this submission | - |
404 | Submission not found | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[AssignmentSubmissionHistory] get_submission_history(var_class, assignment, submission)
Get the history of the submission
For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
submission = 'submission_example' # str | Unique identifier of the submission
try:
# Get the history of the submission
api_response = api_instance.get_submission_history(var_class, assignment, submission)
print("The response of ClassApi->get_submission_history:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->get_submission_history: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
submission | str | Unique identifier of the submission |
List[AssignmentSubmissionHistory]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The history of the submission | - |
403 | Not granted to access to this submission | - |
404 | Submission not found | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[AssignmentSubmission] get_submissions(var_class, assignment)
List the students' submissions
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission import AssignmentSubmission
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
try:
# List the students' submissions
api_response = api_instance.get_submissions(var_class, assignment)
print("The response of ClassApi->get_submissions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->get_submissions: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The submissions | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[ClassAssignment] list_assignments(var_class)
Assignments listing
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_assignment import ClassAssignment
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
try:
# Assignments listing
api_response = api_instance.list_assignments(var_class)
print("The response of ClassApi->list_assignments:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->list_assignments: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List of assignments for the class | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[AssignmentSubmission] list_class_student_submissions(var_class, user)
List the submissions for a student
Use this method as a teacher to list all the assignment submissions sent by a student of the class
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission import AssignmentSubmission
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
user = 'user_example' # str | Unique identifier of the user
try:
# List the submissions for a student
api_response = api_instance.list_class_student_submissions(var_class, user)
print("The response of ClassApi->list_class_student_submissions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->list_class_student_submissions: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
user | str | Unique identifier of the user |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The list of submissions | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[ClassDetails] list_classes(state=state)
List the classes available for the current user
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_details import ClassDetails
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
state = 'active' # str | Filter the classes by state (optional) (default to 'active')
try:
# List the classes available for the current user
api_response = api_instance.list_classes(state=state)
print("The response of ClassApi->list_classes:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->list_classes: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
state | str | Filter the classes by state | [optional] [default to 'active'] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The list of classes | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssignmentSubmissionComment post_submission_comment(var_class, assignment, submission, assignment_submission_comment_creation)
Add a feedback comment to a submission
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment
from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
submission = 'submission_example' # str | Unique identifier of the submission
assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation |
try:
# Add a feedback comment to a submission
api_response = api_instance.post_submission_comment(var_class, assignment, submission, assignment_submission_comment_creation)
print("The response of ClassApi->post_submission_comment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->post_submission_comment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
submission | str | Unique identifier of the submission | |
assignment_submission_comment_creation | AssignmentSubmissionCommentCreation |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The comment | - |
403 | Not granted to access to this submission | - |
404 | Submission not found | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Assignment unarchive_assignment(var_class, assignment)
Unarchive the assignment.
Mark the assignment as active
.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment import Assignment
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
try:
# Unarchive the assignment.
api_response = api_instance.unarchive_assignment(var_class, assignment)
print("The response of ClassApi->unarchive_assignment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->unarchive_assignment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The assignment details | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClassDetails unarchive_class(var_class)
Unarchive the class
Mark the class as active
. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_details import ClassDetails
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
try:
# Unarchive the class
api_response = api_instance.unarchive_class(var_class)
print("The response of ClassApi->unarchive_class:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->unarchive_class: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The class details | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClassDetails update_class(var_class, body)
Update the class
Update the meta information of the class
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.class_details import ClassDetails
from flat_api.models.class_update import ClassUpdate
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
body = flat_api.ClassUpdate() # ClassUpdate | Details of the Class
try:
# Update the class
api_response = api_instance.update_class(var_class, body)
print("The response of ClassApi->update_class:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->update_class: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
body | ClassUpdate | Details of the Class |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The new class details | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssignmentSubmissionComment update_submission_comment(var_class, assignment, submission, comment, assignment_submission_comment_creation)
Update a feedback comment to a submission
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment
from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.ClassApi(api_client)
var_class = 'var_class_example' # str | Unique identifier of the class
assignment = 'assignment_example' # str | Unique identifier of the assignment
submission = 'submission_example' # str | Unique identifier of the submission
comment = 'comment_example' # str | Unique identifier of the comment
assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation |
try:
# Update a feedback comment to a submission
api_response = api_instance.update_submission_comment(var_class, assignment, submission, comment, assignment_submission_comment_creation)
print("The response of ClassApi->update_submission_comment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClassApi->update_submission_comment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
var_class | str | Unique identifier of the class | |
assignment | str | Unique identifier of the assignment | |
submission | str | Unique identifier of the submission | |
comment | str | Unique identifier of the comment | |
assignment_submission_comment_creation | AssignmentSubmissionCommentCreation |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The comment | - |
403 | Not granted to access to this submission | - |
404 | Submission not found | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]