Skip to content

Commit 077a29f

Browse files
committed
feat(api): API specification v2.13.0
* feat(scores): `GET /scores/{score}/tracks` has new query strings: * `listAutoTrack` to fetch tracks automatically generated & synced (playback available as a MP3 file). * `assignment` to filter tracks related to a Flat for Education assignment. * feat(scores): added `GET /scores/{score}/revisions/{revision}/synchronizationPoints` to fetch synchronization points automatically generated from latest MP3 playback file. * feat(scores): `GET /scores/{score}/revisions/{revision}/{format}` has a new query string `url` to fetch the CDN URL of the exported file in the JSON body. * feat(edu): added `DELETE /classes/{class}/assignments/{assignment}/submissions/{submission}` to let teachers reset students' submissions. * feat(edu): added detected `issues` on classes with the list fo accounts that couldn't be added to the classes during synchronizations. * feat(edu): added `microsoftGraph` property on assignments with the Microsoft Teams assignments `state`, URLs (`alternateLink`) and `categories`. * feat(edu): added `microsoftGraph` property on submissions with the Microsoft Teams submissions `state` and URLs (`alternateLink`). * feat(edu): `POST /classes/{class}/assignments/{assignment}/copy` has a new property `scheduledDate` to schedule assignments copies. * feat(edu): added `track` property to submissions for performance assigments saved audio tracks. * feat(account): added a `coverPicture` property with the URL of the profile cover picture, and `pictureFile` and `coverPictureFile` containing the ID of the corresponding files. * feat(account): `GET /me` has a new `onlyId` query string to quickly fetch current user id.
1 parent 411db67 commit 077a29f

File tree

1 file changed

+161
-7
lines changed

1 file changed

+161
-7
lines changed

Diff for: spec/swagger.yaml

+161-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ info:
3333
name: Flat
3434
url: https://flat.io/developers/docs/api/
3535
36-
version: 2.12.0
36+
version: 2.13.0
3737
x-logo:
3838
url: https://flat.io/img/logo-flat.svg
3939
servers:
@@ -84,6 +84,13 @@ paths:
8484
description: |
8585
Get details about the current authenticated User.
8686
operationId: getAuthenticatedUser
87+
parameters:
88+
- name: onlyId
89+
in: query
90+
description: Only return the user id
91+
schema:
92+
type: boolean
93+
default: false
8794
responses:
8895
200:
8996
description: Current user details
@@ -680,6 +687,18 @@ paths:
680687
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.
681688
schema:
682689
type: string
690+
- name: assignment
691+
in: query
692+
description: |
693+
An assignment id with which all the tracks returned will be related to
694+
schema:
695+
type: string
696+
- name: listAutoTrack
697+
in: query
698+
description: |
699+
If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track
700+
schema:
701+
type: boolean
683702
responses:
684703
200:
685704
description: List of tracks
@@ -1408,13 +1427,14 @@ paths:
14081427
- wav
14091428
- midi
14101429
- thumbnail.png
1430+
- synchronizationPoints
14111431
get:
14121432
tags:
14131433
- Score
14141434
summary: Get a score revision data
14151435
description: |
1416-
Retrieve the file corresponding to a score revision (the following formats are available: Flat JSON/Adagio JSON `json`, MusicXML
1417-
`mxl`/`xml`, MP3 `mp3`, WAV `wav`, MIDI `midi`, or a tumbnail of the first page `thumbnail.png`).
1436+
Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON `json`, MusicXML
1437+
`mxl`/`xml`, MP3 `mp3`, WAV `wav`, MIDI `midi`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`.
14181438
operationId: getScoreRevisionData
14191439
parameters:
14201440
- name: sharingKey
@@ -1437,6 +1457,12 @@ paths:
14371457
cache. If the file is not availabe, a 404 will be returned
14381458
schema:
14391459
type: boolean
1460+
- name: url
1461+
in: query
1462+
description: |
1463+
Returns a json with the `url` in it instead of redirecting
1464+
schema:
1465+
type: boolean
14401466
responses:
14411467
200:
14421468
description: Revision data
@@ -3138,6 +3164,31 @@ paths:
31383164
- edu.classes
31393165
- edu.assignments
31403166
x-codegen-request-body-name: body
3167+
delete:
3168+
tags:
3169+
- Class
3170+
summary: Delete a submission
3171+
description: |
3172+
Use this method as a teacher to delete a submission and allow student to start over the assignment
3173+
operationId: deleteSubmission
3174+
parameters:
3175+
- $ref: '#/components/parameters/class'
3176+
- $ref: '#/components/parameters/assignment'
3177+
- $ref: '#/components/parameters/submission'
3178+
responses:
3179+
204:
3180+
description: The submission has been deleted
3181+
default:
3182+
description: Error
3183+
content:
3184+
application/json:
3185+
schema:
3186+
$ref: '#/components/schemas/FlatErrorResponse'
3187+
security:
3188+
- OAuth2:
3189+
- edu.classes
3190+
- edu.assignments
3191+
x-codegen-request-body-name: body
31413192
/classes/{class}/assignments/{assignment}/submissions/{submission}/history:
31423193
parameters:
31433194
- $ref: '#/components/parameters/class'
@@ -3575,7 +3626,8 @@ components:
35753626
description: A displayable name for the user (for consumer users)
35763627
picture:
35773628
type: string
3578-
description: User pictue
3629+
nullable: true
3630+
description: The URL of the picture to display
35793631
isPowerUser:
35803632
type: boolean
35813633
description: User license status. 'true' if user is an individual Power user
@@ -3633,13 +3685,16 @@ components:
36333685
ownedPublicScoresCount:
36343686
type: integer
36353687
description: Number of public scores the user have
3688+
coverPicture:
3689+
type: string
3690+
description: Cover picture (backgroud) for the profile
36363691
profileTheme:
36373692
type: string
36383693
description: Theme (background) for the profile
36393694
instruments:
36403695
type: array
36413696
description: |
3642-
An array of the instrument identifiers used the different score parts.
3697+
An array of the instrument identifiers.
36433698
The format of the strings is `{instrument-group}.{instrument-id}`.
36443699
items:
36453700
type: string
@@ -3758,6 +3813,14 @@ components:
37583813
description: Tell either this user profile is private or not (individual accounts only)
37593814
locale:
37603815
$ref: '#/components/schemas/FlatLocales'
3816+
pictureFile:
3817+
type: string
3818+
nullable: true
3819+
description: The ID of the user profile picture
3820+
coverPictureFile:
3821+
type: string
3822+
nullable: true
3823+
description: The ID of the user profile cover picture
37613824
Group:
37623825
type: object
37633826
properties:
@@ -3991,13 +4054,13 @@ components:
39914054
type: string
39924055
description: Additional license text written on the exported/printed score
39934056
durationTime:
3994-
type: integer
4057+
type: number
39954058
description: In seconds, an approximative duration of the score
39964059
numberMeasures:
39974060
type: integer
39984061
description: The number of measures in the score
39994062
mainTempoQpm:
4000-
type: integer
4063+
type: number
40014064
description: The main tempo of the score (in QPM)
40024065
rights:
40034066
$ref: '#/components/schemas/ResourceRights'
@@ -5041,6 +5104,27 @@ components:
50415104
$ref: '#/components/schemas/GroupDetails'
50425105
teachersGroup:
50435106
$ref: '#/components/schemas/GroupDetails'
5107+
issues:
5108+
type: object
5109+
description: Detected issues for this class
5110+
properties:
5111+
sync:
5112+
type: array
5113+
description: Synchronization issues for the class
5114+
items:
5115+
type: object
5116+
description: A sync issue
5117+
properties:
5118+
id:
5119+
type: string
5120+
description: The account user identifier
5121+
email:
5122+
type: string
5123+
description: The email address of the user concerned by this sync issue
5124+
reason:
5125+
type: string
5126+
enum: [otherOrgnanization, personalSubscription]
5127+
description: The reason why the account cannot be synced
50445128
googleClassroom:
50455129
type: object
50465130
properties:
@@ -5265,11 +5349,22 @@ components:
52655349
If set, the grading will be enabled for the assignement with this value as the maximum of points
52665350
googleClassroom:
52675351
type: object
5352+
description: Google Classroom options for this assignment
52685353
properties:
52695354
topicId:
52705355
type: string
52715356
nullable: true
52725357
description: Identifier of the topic where the assignment is created
5358+
microsoftGraph:
5359+
type: object
5360+
description: Microsoft Graph options for this assignment
5361+
properties:
5362+
categories:
5363+
description: List of categories this assignment belongs to
5364+
type: array
5365+
nullable: true
5366+
items:
5367+
type: string
52735368
assigneeMode:
52745369
type: string
52755370
description: Possible modes of assigning assignments
@@ -5302,6 +5397,13 @@ components:
53025397
assignment:
53035398
type: string
53045399
description: An optional destination assignment where the original assignement will be copied. Must be a draft.
5400+
scheduledDate:
5401+
type: string
5402+
description: |
5403+
The publication (scheduled) date of the assignment.
5404+
If this one is specified, the assignment will only be listed to the teachers of the class.
5405+
Alternatively the existing `scheduledDate` from the copied assignment will be used.
5406+
format: date-time
53055407
description: Assignment copy operation
53065408
example:
53075409
classroom: '0000000000000000'
@@ -5376,8 +5478,11 @@ components:
53765478
If set, the grading will be enabled for the assignement
53775479
googleClassroom:
53785480
$ref: '#/components/schemas/GoogleClassroomCoursework'
5481+
microsoftGraph:
5482+
$ref: '#/components/schemas/MicrosoftGraphAssignment'
53795483
mfc:
53805484
type: object
5485+
description: A MusicFirst Classroom assignment
53815486
properties:
53825487
id:
53835488
type: string
@@ -5387,6 +5492,7 @@ components:
53875492
description: Link to MusicFirst Classroom task
53885493
canvas:
53895494
type: object
5495+
description: A Canvas LMS assignment
53905496
properties:
53915497
id:
53925498
type: string
@@ -5396,6 +5502,7 @@ components:
53965502
description: Link to Canvas assignment
53975503
lti:
53985504
type: object
5505+
description: An LTI assignment
53995506
properties:
54005507
id:
54015508
type: string
@@ -5545,6 +5652,8 @@ components:
55455652
description: Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.
55465653
googleClassroom:
55475654
$ref: '#/components/schemas/GoogleClassroomSubmission'
5655+
microsoftGraph:
5656+
$ref: '#/components/schemas/MicrosoftGraphSubmission'
55485657
description: Assignment Submission
55495658
example:
55505659
id: 58c4955c226ffff257211a90
@@ -5634,6 +5743,47 @@ components:
56345743
revision:
56355744
type: string
56365745
description: The revision identifier that changed
5746+
MicrosoftGraphAssignment:
5747+
type: object
5748+
description: A Microsoft Teams asignment
5749+
properties:
5750+
id:
5751+
type: string
5752+
description: Identifier of the assignement assigned by Microsoft Teams
5753+
state:
5754+
type: string
5755+
description: State of the assignment
5756+
alternateLink:
5757+
type: string
5758+
description: Absolute link to this assignement in the Microsoft Teams web UI
5759+
categories:
5760+
type: array
5761+
description: List of categories where this assignment is published under
5762+
items:
5763+
type: string
5764+
description: A Microsoft Teams assignment category ID
5765+
example:
5766+
id: 8e460d32-d2d4-46b3-8e1a-9b7677a48fda
5767+
state: draft
5768+
alternateLink: https://teams.microsoft.com/l/entity
5769+
categories: [0a012acd-6e78-4cd0-89a9-80d296e48f82]
5770+
MicrosoftGraphSubmission:
5771+
type: object
5772+
description: A Microsoft Teams submission
5773+
properties:
5774+
id:
5775+
type: string
5776+
description: Identifier of the submission assigned by Microsoft Teams
5777+
state:
5778+
type: string
5779+
description: State of the submission
5780+
alternateLink:
5781+
type: string
5782+
description: Absolute link to this submission in the Microsoft Teams web UI
5783+
example:
5784+
id: 8e460d32-d2d4-46b3-8e1a-9b7677a48fda
5785+
state: returned
5786+
alternateLink: https://teams.microsoft.com/l/entity
56375787
GoogleClassroomCoursework:
56385788
type: object
56395789
properties:
@@ -5653,6 +5803,7 @@ components:
56535803
description: A coursework on Google Classroom
56545804
example:
56555805
id: '1235665432'
5806+
state: draft
56565807
alternateLink: http://classroom.google.com/c/music-theory/a/first-assignment/detail
56575808
GoogleClassroomSubmission:
56585809
type: object
@@ -5755,6 +5906,9 @@ components:
57555906
worksheet:
57565907
type: string
57575908
description: An unique worksheet identifier
5909+
track:
5910+
type: string
5911+
description: A unique track identifier
57585912
sharingMode:
57595913
$ref: '#/components/schemas/MediaScoreSharingMode'
57605914
lockScoreTemplate:

0 commit comments

Comments
 (0)