UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 170 kB
{"openapi":"3.0.2","servers":[{"url":"https://api.flat.io/v2"}],"info":{"contact":{"email":"developers@flat.io","name":"Flat","url":"https://flat.io/developers/docs/api/"},"description":"The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following:\n\n* Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files\n* Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI)\n* Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments.\n\nThe Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body.\nThe [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/).\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\n\nYou can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference).\n\nGetting Started and learn more:\n\n* [API Overview and introduction](https://flat.io/developers/docs/api/)\n* [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html)\n* [SDKs](https://flat.io/developers/docs/api/sdks.html)\n* [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html)\n* [Changelog](https://flat.io/developers/docs/api/changelog.html)\n","termsOfService":"https://flat.io/legal","title":"Flat API","version":"2.13.0","x-apisguru-categories":["media","collaboration"],"x-logo":{"url":"https://flat.io/img/logo-flat.svg"},"x-origin":[{"format":"openapi","url":"https://raw.githubusercontent.com/FlatIO/api-reference/master/spec/swagger.yaml","version":"3.0"}],"x-providerName":"flat.io"},"tags":[{"description":"These API endpoints are related to the Flat account you are currently using. When using an OAuth2 access token, you can use [`GET /me`](#operation/getAuthenticatedUser) to get information about the account.\n","name":"Account","x-displayName":"Flat Account"},{"description":"Sheet music is the main API object type available for all Flat account.\nHere is a typical lifecycle for a music score document on Flat:\n - An end user can **create a music score** or **import a document** using our [web interface](https://flat.io) or a third-party website/app (e.g. Google Drive) using this API (see [`POST /v2/scores`](#operation/createScore). The creation and import of music scores can be done with this single API endpoint. This one currently supports the [MusicXML](http://www.musicxml.com/) (compressed or not) and [MIDI](https://www.midi.org/specifications).\n - **List scores**:\n - The **owned scores** can be listed using the [collections API methods](#tag/Collection), especially [`GET /collections/{collection}/scores`](#operation/listCollectionScores).\n - The scores from a public account can be listed with [`GET /users/{user}/scores`](#operation/getUserScores).\n - Scores shared with a specific group can be listed with [`GET /groups/{group}/scores`](#operation/getGroupScores).\n - The metadata of a single score can be retrieved with [`GET /scores/{score}`](#operation/getScore).\n - Scores on Flat have **one or multiple revisions**: creating a new score will create a first revision. These **revisions can be listed** using [`GET /scores/{score}/revisions`](#operation/getScoreRevisions) and a specific **revision data can be downloaded** with [`GET /scores/{score}/revisions/{revision}/{format}`](#operation/getScoreRevisionData). New revisions can be created using our [sheet music editor](https://flat.io) or using [`POST /scores/{score}/revisions`](#operation/createScoreRevision) (this endpoint has similar parameters than during the score creation). The last revision of a document may not directly reflect the really last version of a music score: recent modifications can be made offline or not yet consolidated into a new revision. In average, a new revision is created every 100 modifications made with our editor.\n - Scores can be **shared publicly** by changing the privacy option with [`POST /scores/{score}`](#operation/editScore), or **individually shared** using the different collaborators API endpoints (see [`POST /scores/{score}/collaborators`](#operation/addScoreCollaborator)).\n","name":"Score","x-displayName":"Music scores"},{"description":"Collections let you organize your content in a Flat account. They work like a regular _folder_ with some specificities:\n - Our design goal here is to create a system similar to a _book_ or a _playlist of songs_.\n - Collections can't have children collections (except the `trash` and `sharedWithMe` that are special collections).\n - Any score can be added to one or multiple collections. For example, you can have a single private score in two or more collections, or add any public or shared scores to one of your collections.\n\nAll the collections don't have the same capabilities. Capabilities depend on the `type` of collection and the `rights` you have on a collection. They are available when [listing the collection](#operation/listCollections) or [retrieving the collection details](#operation/getCollection).\n\nAt this time, only `private` privacy mode is widely available. Privacy modes `public`, `organizationPublic` and `privateLink`, and 1:1 sharing will be available in an upcoming update later this year.\n","name":"Collection","x-displayName":"Collections of music scores"},{"description":"Flat users","name":"User"},{"description":"Flat for Education organizations","name":"Organization"},{"description":"Flat for Education classes","name":"Class"},{"description":"Flat Groups","name":"Group"}],"paths":{"/classes":{"get":{"operationId":"listClasses","parameters":[{"description":"Filter the classes by state","in":"query","name":"state","schema":{"default":"active","enum":["active","inactive","archived"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClassDetails"},"type":"array"}}},"description":"The list of classes"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.classes.readonly"]}],"summary":"List the classes available for the current user","tags":["Class"]},"post":{"description":"Classrooms on Flat allow you to create activities with assignments and post content to a specific group.\n\nWhen 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.\n\nIf the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated.\n\nYou 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.\n","operationId":"createClass","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassCreation"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassDetails"}}},"description":"The new class details"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Account overquota"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes"]}],"summary":"Create a new class","tags":["Class"],"x-codegen-request-body-name":"body"}},"/classes/enroll/{enrollmentCode}":{"parameters":[{"description":"The enrollment code, available to the teacher in `ClassDetails`\n","in":"path","name":"enrollmentCode","required":true,"schema":{"type":"string"}}],"post":{"description":"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.\n\nFlat will automatically add the user to the corresponding class group based on this role in the organization.\n","operationId":"enrollClass","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassDetails"}}},"description":"The new class details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes"]}],"summary":"Join a class","tags":["Class"]}},"/classes/{class}":{"get":{"operationId":"getClass","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassDetails"}}},"description":"The new class details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.classes.readonly"]}],"summary":"Get the details of a single class","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"}],"put":{"description":"Update the meta information of the class\n","operationId":"updateClass","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassUpdate"}}},"description":"Details of the Class","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassDetails"}}},"description":"The new class details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes"]}],"summary":"Update the class","tags":["Class"],"x-codegen-request-body-name":"body"}},"/classes/{class}/activate":{"parameters":[{"$ref":"#/components/parameters/class"}],"post":{"description":"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.\n","operationId":"activateClass","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassDetails"}}},"description":"The class details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes"]}],"summary":"Activate the class","tags":["Class"]}},"/classes/{class}/archive":{"delete":{"description":"Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.\n","operationId":"unarchiveClass","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassDetails"}}},"description":"The class details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes"]}],"summary":"Unarchive the class","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"}],"post":{"description":"Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.\n","operationId":"archiveClass","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassDetails"}}},"description":"The class details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes"]}],"summary":"Archive the class","tags":["Class"]}},"/classes/{class}/assignments":{"get":{"operationId":"listAssignments","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Assignment"},"type":"array"}}},"description":"List of assignments for the class"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.classes.readonly","edu.assignments","edu.assignments.readonly"]}],"summary":"Assignments listing","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"}],"post":{"description":"Use this method as a teacher to create and post a new assignment to a class.\n\nIf the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course.\n","operationId":"createAssignment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentCreation"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assignment"}}},"description":"The assignment has been created"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.assignments"]}],"summary":"Assignment creation","tags":["Class"],"x-codegen-request-body-name":"body"}},"/classes/{class}/assignments/{assignment}/archive":{"delete":{"description":"Mark the assignment as `active`.\n","operationId":"unarchiveAssignment","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assignment"}}},"description":"The assignment details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.assignments"]}],"summary":"Unarchive the assignment.","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"}],"post":{"description":"Archive the assignment\n","operationId":"archiveAssignment","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assignment"}}},"description":"The assignment details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.assignments"]}],"summary":"Archive the assignment","tags":["Class"]}},"/classes/{class}/assignments/{assignment}/copy":{"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"}],"post":{"description":"Copy an assignment to a specified class.\n\nIf the original assignment has a due date in the past, this new assingment will be created without a due date.\n\nIf the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app.\n","operationId":"copyAssignment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentCopy"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assignment"}}},"description":"The new created assingment"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.assignments"]}],"summary":"Copy an assignment","tags":["Class"],"x-codegen-request-body-name":"body"}},"/classes/{class}/assignments/{assignment}/submissions":{"get":{"operationId":"getSubmissions","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AssignmentSubmission"},"type":"array"}}},"description":"The submissions"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.classes.readonly","edu.assignments","edu.assignments.readonly"]}],"summary":"List the students' submissions","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"}],"put":{"description":"Use this method as a student to create, update and submit a submission related to an assignment.\nStudents can only set `attachments` and `submit`.\nTeachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id.\n","operationId":"createSubmission","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmissionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmission"}}},"description":"The submission"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.assignments"]}],"summary":"Create or edit a submission","tags":["Class"],"x-codegen-request-body-name":"body"}},"/classes/{class}/assignments/{assignment}/submissions/csv":{"get":{"description":"Export list of submissions grades to a CSV file","operationId":"exportSubmissionsReviewsAsCsv","responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"List of submissions"},"default":{"content":{"text/csv":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.classes.readonly","edu.assignments","edu.assignments.readonly"]}],"summary":"CSV Grades exports","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"}]},"/classes/{class}/assignments/{assignment}/submissions/excel":{"get":{"description":"Export list of submissions grades to an Excel file","operationId":"exportSubmissionsReviewsAsExcel","responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}}},"description":"List of submissions"},"default":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.classes.readonly","edu.assignments","edu.assignments.readonly"]}],"summary":"Excel Grades exports","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"}]},"/classes/{class}/assignments/{assignment}/submissions/{submission}":{"delete":{"description":"Use this method as a teacher to delete a submission and allow student to start over the assignment\n","operationId":"deleteSubmission","parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"},{"$ref":"#/components/parameters/submission"}],"responses":{"204":{"description":"The submission has been deleted"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.assignments"]}],"summary":"Delete a submission","tags":["Class"],"x-codegen-request-body-name":"body"},"get":{"operationId":"getSubmission","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmission"}}},"description":"A submission"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.classes.readonly","edu.assignments","edu.assignments.readonly"]}],"summary":"Get a student submission","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"},{"$ref":"#/components/parameters/submission"}],"put":{"description":"Use this method as a teacher to update the different submission and give feedback.\nTeachers can only set `return`, `draftGrade` and `grade`\n","operationId":"editSubmission","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmissionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmission"}}},"description":"The submission"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.assignments"]}],"summary":"Edit a submission","tags":["Class"],"x-codegen-request-body-name":"body"}},"/classes/{class}/assignments/{assignment}/submissions/{submission}/comments":{"get":{"operationId":"getSubmissionComments","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AssignmentSubmissionComment"},"type":"array"}}},"description":"The comments of the score"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this submission"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Submission not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.assignments","edu.assignments.readonly"]}],"summary":"List the feedback comments of a submission","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"},{"$ref":"#/components/parameters/submission"}],"post":{"operationId":"postSubmissionComment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmissionCommentCreation"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmissionComment"}}},"description":"The comment"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this submission"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Submission not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.assignments"]}],"summary":"Add a feedback comment to a submission","tags":["Class"]}},"/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}":{"delete":{"operationId":"deleteSubmissionComment","responses":{"204":{"description":"The comment has been deleted"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.assignments"]}],"summary":"Delete a feedback comment to a submission","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"},{"$ref":"#/components/parameters/submission"},{"$ref":"#/components/parameters/comment"}],"put":{"operationId":"updateSubmissionComment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmissionCommentCreation"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSubmissionComment"}}},"description":"The comment"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this submission"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Submission not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.assignments"]}],"summary":"Update a feedback comment to a submission","tags":["Class"]}},"/classes/{class}/assignments/{assignment}/submissions/{submission}/history":{"get":{"description":"For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories.\n","operationId":"getSubmissionHistory","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AssignmentSubmissionHistory"},"type":"array"}}},"description":"The history of the submission"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this submission"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Submission not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.assignments","edu.assignments.readonly"]}],"summary":"Get the history of the submission","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"$ref":"#/components/parameters/assignment"},{"$ref":"#/components/parameters/submission"}]},"/classes/{class}/students/{user}/submissions":{"get":{"description":"Use this method as a teacher to list all the assignment submissions sent by a student of the class\n","operationId":"listClassStudentSubmissions","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AssignmentSubmission"},"type":"array"}}},"description":"The list of submissions"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes","edu.classes.readonly","edu.assignments","edu.assignments.readonly"]}],"summary":"List the submissions for a student","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"description":"Unique identifier of the user","in":"path","name":"user","required":true,"schema":{"type":"string"}}]},"/classes/{class}/users/{user}":{"delete":{"description":"This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom.\n\nWarning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.\n","operationId":"deleteClassUser","responses":{"204":{"description":"The user has been removed from the class"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes"]}],"summary":"Remove a user from the class","tags":["Class"]},"parameters":[{"$ref":"#/components/parameters/class"},{"description":"Unique identifier of the user","in":"path","name":"user","required":true,"schema":{"type":"string"}}],"put":{"description":"This method can be used by a teacher of the class to enroll another Flat user into the class.\n\nOnly users that are part of your Organization can be enrolled in a class of this same Organization.\n\nWhen enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization.\n","operationId":"addClassUser","responses":{"204":{"description":"The user has been added to the class"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.classes"]}],"summary":"Add a user to the class","tags":["Class"]}},"/collections":{"get":{"description":"Use this method to list the user's collections contained in `parent` (by default in the `root` collection).\nIf no sort option is provided, the collections are sorted by `creationDate` `desc`.\n\nNote that this method will not include the `parent` collection in the listing.\nFor example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`.\n","operationId":"listCollections","parameters":[{"description":"List the collection contained in this `parent` collection.\n\nThis option doesn't provide a complete multi-level collection support.\nWhen sharing a collection with someone, this one will have as `parent` `sharedWithMe`.\n","in":"query","name":"parent","schema":{"default":"root","type":"string"}},{"description":"Sort","in":"query","name":"sort","schema":{"enum":["creationDate","title"],"type":"string"}},{"description":"Sort direction","in":"query","name":"direction","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"This is the maximum number of objects that may be returned","in":"query","name":"limit","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"An opaque string cursor to fetch the next page of data.\nThe paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.\n","in":"query","name":"next","schema":{"type":"string"}},{"description":"An opaque string cursor to fetch the previous page of data.\nThe paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.\n","in":"query","name":"previous","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Collection"},"type":"array"}}},"description":"List of collections"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections","collections.readonly"]}],"summary":"List the collections","tags":["Collection"]},"post":{"description":"This method will create a new collection and add it to your `root` collection.\n","operationId":"createCollection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreation"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"Collection created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Bad collection creation request"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections"]}],"summary":"Create a new collection","tags":["Collection"],"x-codegen-request-body-name":"body"}},"/collections/{collection}":{"delete":{"description":"This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`.\n","operationId":"deleteCollection","responses":{"204":{"description":"Collection deleted"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this collection"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Collection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections"]}],"summary":"Delete the collection","tags":["Collection"]},"get":{"operationId":"getCollection","parameters":[{"description":"This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.\n","in":"query","name":"sharingKey","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"Collection details"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this collection"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Collection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections","collections.readonly"]}],"summary":"Get collection details","tags":["Collection"]},"parameters":[{"description":"Unique identifier of the collection.\nThe following aliases are supported:\n- `root`: The root collection of the account\n- `sharedWithMe`: Automatically contains new resources that have been shared individually\n- `trash`: Automatically contains resources that have been deleted\n","in":"path","name":"collection","required":true,"schema":{"type":"string"}}],"put":{"operationId":"editCollection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionModification"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"Collection details"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this collection"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Collection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections"]}],"summary":"Update a collection's metadata","tags":["Collection"],"x-codegen-request-body-name":"body"}},"/collections/{collection}/scores":{"get":{"description":"Use this method to list the scores contained in a collection.\nIf no sort option is provided, the scores are sorted by `modificationDate` `desc`.\n","operationId":"listCollectionScores","parameters":[{"description":"Sort","in":"query","name":"sort","schema":{"enum":["creationDate","modificationDate","title"],"type":"string"}},{"description":"Sort direction","in":"query","name":"direction","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"This is the maximum number of objects that may be returned","in":"query","name":"limit","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"An opaque string cursor to fetch the next page of data.\nThe paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.\n","in":"query","name":"next","schema":{"type":"string"}},{"description":"An opaque string cursor to fetch the previous page of data.\nThe paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.\n","in":"query","name":"previous","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ScoreDetails"},"type":"array"}}},"description":"List of scores"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections"]}],"summary":"List the scores contained in a collection","tags":["Collection"]},"parameters":[{"description":"Unique identifier of the collection.\nThe following aliases are supported:\n- `root`: The root collection of the account\n- `sharedWithMe`: Automatically contains new resources that have been shared individually\n- `trash`: Automatically contains resources that have been deleted\n","in":"path","name":"collection","required":true,"schema":{"type":"string"}},{"description":"This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.\n","in":"query","name":"sharingKey","schema":{"type":"string"}}]},"/collections/{collection}/scores/{score}":{"delete":{"description":"This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection.\nThis can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections.\n","operationId":"deleteScoreFromCollection","responses":{"204":{"description":"Score removed from the collection"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this collection"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Collection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections"]}],"summary":"Delete a score from the collection","tags":["Collection"]},"parameters":[{"description":"Unique identifier of the collection.\nThe following aliases are supported:\n- `root`: The root collection of the account\n- `sharedWithMe`: Automatically contains new resources that have been shared individually\n- `trash`: Automatically contains resources that have been deleted\n","in":"path","name":"collection","required":true,"schema":{"type":"string"}},{"description":"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`).\n","in":"path","name":"score","required":true,"schema":{"type":"string"}},{"description":"This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.\n","in":"query","name":"sharingKey","schema":{"type":"string"}}],"put":{"description":"This operation will add a score to a collection. The default behavior will make the score available across multiple collections.\nYou must have the capability `canAddScores` on the provided `collection` to perform the action.\n","operationId":"addScoreToCollection","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreDetails"}}},"description":"Score details"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to access to this collection or score"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Collection or score not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections","collections.add_scores"]}],"summary":"Add a score to the collection","tags":["Collection"]}},"/collections/{collection}/untrash":{"parameters":[{"description":"Unique identifier of the collection.\nThe following aliases are supported:\n- `root`: The root collection of the account\n- `sharedWithMe`: Automatically contains new resources that have been shared individually\n- `trash`: Automatically contains resources that have been deleted\n","in":"path","name":"collection","required":true,"schema":{"type":"string"}}],"post":{"description":"This method will restore the collection by removing it from the `trash` and add it back to the `root` collection.\n","operationId":"untrashCollection","responses":{"204":{"description":"The score has been untrashed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not granted to manage this score"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Score not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["collections"]}],"summary":"Untrash a collection","tags":["Collection"]}},"/groups/{group}":{"get":{"operationId":"getGroupDetails","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDetails"}}},"description":"The group details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.admin","edu.admin.users","edu.admin.users.readonly","edu.classes","edu.classes.readonly"]}],"summary":"Get group information","tags":["Group"]},"parameters":[{"$ref":"#/components/parameters/group"}]},"/groups/{group}/scores":{"get":{"description":"Get the list of scores shared with a group.\n","operationId":"getGroupScores","parameters":[{"description":"Filter the score forked from the score id `parent`","in":"query","name":"parent","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ScoreDetails"},"type":"array"}}},"description":"The group's scores"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["scores","scores.readonly"]}],"summary":"List group's scores","tags":["Group","Score"]},"parameters":[{"$ref":"#/components/parameters/group"}]},"/groups/{group}/users":{"get":{"operationId":"listGroupUsers","parameters":[{"description":"Filter the users by their source\n","in":"query","name":"source","schema":{"enum":["googleClassroom","microsoftGraph","clever"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserPublic"},"type":"array"}}},"description":"The list of users member of the group"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.admin","edu.admin.users","edu.admin.users.readonly","edu.classes","edu.classes.readonly"]}],"summary":"List group's users","tags":["Group"]},"parameters":[{"$ref":"#/components/parameters/group"}]},"/me":{"get":{"description":"Get details about the current authenticated User.\n","operationId":"getAuthenticatedUser","parameters":[{"description":"Only return the user id","in":"query","name":"onlyId","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetails"}}},"description":"Current user details"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["account.public_profile","account.education_profile"]}],"summary":"Get current user profile","tags":["Account"]}},"/organizations/invitations":{"get":{"operationId":"listOrganizationInvitations","parameters":[{"description":"Filter users by role","in":"query","name":"role","schema":{"enum":["user","teacher","admin"],"type":"string"}},{"description":"This is the maximum number of objects that may be returned","in":"query","name":"limit","schema":{"default":50,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"An opaque string cursor to fetch the next page of data.\nThe paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.\n","in":"query","name":"next","schema":{"type":"string"}},{"description":"An opaque string cursor to fetch the previous page of data.\nThe paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.\n","in":"query","name":"previous","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationInvitation"},"type":"array"}}},"description":"List of invitations"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.admin","edu.admin.users","edu.admin.users.readonly"]}],"summary":"List the organization invitations","tags":["Organization"]},"post":{"description":"This method creates and sends invitation for teachers and admins.\n\nInvitations can only be used by new Flat users or users who are not part of the organization yet.\n\nIf the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user.\n","operationId":"createOrganizationInvitation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitationCreation"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitation"}}},"description":"New invitation created"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.admin","edu.admin.users"]}],"summary":"Create a new invitation to join the organization","tags":["Organization"],"x-codegen-request-body-name":"body"}},"/organizations/invitations/{invitation}":{"delete":{"operationId":"removeOrganizationInvitation","responses":{"204":{"description":"The invitation has been removed"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.admin","edu.admin.users"]}],"summary":"Remove an organization invitation","tags":["Organization"]},"parameters":[{"description":"Unique identifier of the invitation","in":"path","name":"invitation","required":true,"schema":{"type":"string"}}]},"/organizations/lti/credentials":{"get":{"operationId":"listLtiCredentials","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LtiCredentials"},"type":"array"}}},"description":"The list of LTI Credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not admin of an organization"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.admin","edu.admin.lti","edu.admin.lti.readonly"]}],"summary":"List LTI 1.x credentials","tags":["Organization"]},"post":{"description":"Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/).\n","operationId":"createLtiCredentials","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LtiCredentialsCreation"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LtiCredentials"}}},"description":"The LTI Credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not admin of an organization"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.admin","edu.admin.lti"]}],"summary":"Create a new couple of LTI 1.x credentials","tags":["Organization"],"x-codegen-request-body-name":"body"}},"/organizations/lti/credentials/{credentials}":{"delete":{"operationId":"revokeLtiCredentials","responses":{"204":{"description":"Credentials revoked"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Not admin of an organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Credentials not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatErrorResponse"}}},"description":"Error"}},"security":[{"OAuth2":["edu.admin","edu.admin.lti"]}],"summary":"Revoke LTI 1.x credentials","tags":["Organization"]},"parameters":[{"description":"Credentials unique identifier\n","in":"path","name":"credentials","required":true,"schema":{"type":"string"}}]},"/organizations/users":{"get":{"operationId":"listOrganizationUsers","parameters":[{"description":"The order to sort the user list","in":"query","name":"sort","schema":{"items":{"enum":["firstname","lastname","lastActivityDate","licenseExpirationDate"],"type":"string"},"type":"string"}},{"$ref":"#/components/parameters/sortDirection"},{"$ref":"#/components/parameters/next"},{"$ref":"#/components/parameters/previous"},{"$ref":"#/components/parameters/role"},{"$ref":"#/components/parameters/searchInputQuery"},{"$ref":"#/components/parameters/groupIds"},{"$ref":"#/components/parameters/noActiveLicense"},{"description":"Filter users by license expiration date or `active` / `notActive`","in":"query","name":"licenseExpirationDate","schema":{"items":{"type":"string"},"type":"array"}},{"description":"Return only user ids","in":"query","name":"onlyIds","schema":{"type":"boolean"}},{"description":"This is the maximum number of objects that may be returned","in":"query","name":"limit","schema":{"default":25,"maximum":1000,"minimum"