Skip to content

Flat API API

by flat.io

OAuthHTTPSMedia
Open documentation ↗

Overview

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: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The 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. The [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/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You 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). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)

Flat API is a media API from flat.io. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 81 endpoints.

At a glance

Authentication
OAuth
HTTPS
Yes
CORS
Unknown
Category
Media
Base URL
https://api.flat.io/v2
Version
2.13.0
Endpoints
81
Spec updated
2021-07-26

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://api.flat.io/v2/classes" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://api.flat.io/v2/classes", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://api.flat.io/v2/classes",
    headers={
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/classesList the classes available for the current user
POST/classesCreate a new class
POST/classes/enroll/{enrollmentCode}Join a class
GET/classes/{class}Get the details of a single class
PUT/classes/{class}Update the class
POST/classes/{class}/activateActivate the class
POST/classes/{class}/archiveArchive the class
DELETE/classes/{class}/archiveUnarchive the class
GET/classes/{class}/assignmentsAssignments listing
POST/classes/{class}/assignmentsAssignment creation
POST/classes/{class}/assignments/{assignment}/archiveArchive the assignment
DELETE/classes/{class}/assignments/{assignment}/archiveUnarchive the assignment.
POST/classes/{class}/assignments/{assignment}/copyCopy an assignment
GET/classes/{class}/assignments/{assignment}/submissionsList the students' submissions
PUT/classes/{class}/assignments/{assignment}/submissionsCreate or edit a submission
GET/classes/{class}/assignments/{assignment}/submissions/csvCSV Grades exports
GET/classes/{class}/assignments/{assignment}/submissions/excelExcel Grades exports
GET/classes/{class}/assignments/{assignment}/submissions/{submission}Get a student submission
PUT/classes/{class}/assignments/{assignment}/submissions/{submission}Edit a submission
DELETE/classes/{class}/assignments/{assignment}/submissions/{submission}Delete a submission
GET/classes/{class}/assignments/{assignment}/submissions/{submission}/commentsList the feedback comments of a submission
POST/classes/{class}/assignments/{assignment}/submissions/{submission}/commentsAdd a feedback comment to a submission
PUT/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}Update a feedback comment to a submission
DELETE/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}Delete a feedback comment to a submission
GET/classes/{class}/assignments/{assignment}/submissions/{submission}/historyGet the history of the submission
GET/classes/{class}/students/{user}/submissionsList the submissions for a student
PUT/classes/{class}/users/{user}Add a user to the class
DELETE/classes/{class}/users/{user}Remove a user from the class
GET/collectionsList the collections
POST/collectionsCreate a new collection
GET/collections/{collection}Get collection details
PUT/collections/{collection}Update a collection's metadata
DELETE/collections/{collection}Delete the collection
GET/collections/{collection}/scoresList the scores contained in a collection
PUT/collections/{collection}/scores/{score}Add a score to the collection
DELETE/collections/{collection}/scores/{score}Delete a score from the collection
POST/collections/{collection}/untrashUntrash a collection
GET/groups/{group}Get group information
GET/groups/{group}/scoresList group's scores
GET/groups/{group}/usersList group's users
GET/meGet current user profile
GET/organizations/invitationsList the organization invitations
POST/organizations/invitationsCreate a new invitation to join the organization
DELETE/organizations/invitations/{invitation}Remove an organization invitation
GET/organizations/lti/credentialsList LTI 1.x credentials
POST/organizations/lti/credentialsCreate a new couple of LTI 1.x credentials
DELETE/organizations/lti/credentials/{credentials}Revoke LTI 1.x credentials
GET/organizations/usersList the organization users
POST/organizations/usersCreate a new user account
GET/organizations/users/countCount the organization users using the provided filters
PUT/organizations/users/{user}Update account information
DELETE/organizations/users/{user}Remove an account from Flat
POST/scoresCreate a new score
GET/scores/{score}Get a score's metadata
PUT/scores/{score}Edit a score's metadata
DELETE/scores/{score}Delete a score
GET/scores/{score}/collaboratorsList the collaborators
POST/scores/{score}/collaboratorsAdd a new collaborator
GET/scores/{score}/collaborators/{collaborator}Get a collaborator
DELETE/scores/{score}/collaborators/{collaborator}Delete a collaborator
GET/scores/{score}/commentsList comments
POST/scores/{score}/commentsPost a new comment
PUT/scores/{score}/comments/{comment}Update an existing comment
DELETE/scores/{score}/comments/{comment}Delete a comment
PUT/scores/{score}/comments/{comment}/resolvedMark the comment as resolved
DELETE/scores/{score}/comments/{comment}/resolvedMark the comment as unresolved
POST/scores/{score}/forkFork a score
GET/scores/{score}/revisionsList the revisions
POST/scores/{score}/revisionsCreate a new revision
GET/scores/{score}/revisions/{revision}Get a score revision
GET/scores/{score}/revisions/{revision}/{format}Get a score revision data
GET/scores/{score}/submissionsList submissions related to the score
GET/scores/{score}/tracksList the audio or video tracks linked to a score
POST/scores/{score}/tracksAdd a new video or audio track to the score
GET/scores/{score}/tracks/{track}Retrieve the details of an audio or video track linked to a score
PUT/scores/{score}/tracks/{track}Update an audio or video track linked to a score
DELETE/scores/{score}/tracks/{track}Remove an audio or video track linked to the score
POST/scores/{score}/untrashUntrash a score
GET/users/{user}Get a public user profile
GET/users/{user}/likesList liked scores
GET/users/{user}/scoresList user's scores

Questions

Does the Flat API API need an API key?

Yes. The Flat API API uses OAuth authentication; the documentation explains how to get credentials.

Does the Flat API API support HTTPS?

Yes, the Flat API API is served over HTTPS.

How many endpoints does the Flat API API have?

Its OpenAPI description lists 81 endpoints in version 2.13.0. All of them are shown on this page.

What are alternatives to the Flat API API?

Other Media APIs include SiriKit Cloud Media, Radio & Music Services, Spotify Web API, setlist.fm API, NBA Stats API.

Compare alternatives →

SiriKit Cloud Media

Media

Add intelligent features with Apple Intelligence, machine learning, and related technologies.

No auth6 endpoints

Radio & Music Services

Media

We encapsulate Radio & Music business logic for iPlayer Radio and BBC Music products on all platforms. We add value by reliably providing the right blend of metadata needed by clients.

No auth75 endpoints

Spotify Web API

Media

You can use Spotify's Web API to discover music and podcasts, manage your Spotify library, control audio playback, and much more. Browse our available Web API endpoints using the sidebar at left, or via the navigation bar on top of this page on smaller screens. In order to make successful Web API requests your app will need a valid access token. One can be obtained through <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/">OAuth 2.0</a>. The base URI for all Web API requests is `https://api.spotify.com/v1`. Need help? See our <a href="https://developer.spotify.com/documentation/web-api/guides/">Web API guides</a> for more information, or visit the <a href="https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer">Spotify for Developers community forum</a> to ask questions and connect with other developers.

OAuth88 endpoints

setlist.fm API

Media

<p> The setlist.fm API has been designed to give you easy access to setlist data in order to build fancy websites and other applications. Before starting to use the API, be sure to ... <ol> <li>... understand how setlist.fm works (the <a href="https://www.setlist.fm/faq">FAQ</a> and the <a href="https://www.setlist.fm/guidelines">Guidelines</a> are a good starting point),</li> <li>... read this documentation carefully and</li> <li>... <a href="https://www.setlist.fm/settings/api">apply for an API key</a> (link for logged in users only) - if you're no registered user yet, then <a href="https://www.setlist.fm/signup">register first</a> (it's free).</li> </ol> </p> <p> If this documentation isn't enough or if you've got other things you'd like to tell us about the API, visit the <a href="https://www.setlist.fm/forum/setlistfm/setlistfm-api">API Forum</a>. </p> <p> Note that the setlist.fm API is, according to the <a href="https://www.setlist.fm/help/api-terms">API terms of service</a>, only free for non-commercial projects. If you're interested in using the API for commercial purposes, <a href="https://www.setlist.fm/contact">contact us</a>. </p> <h2>About this Service</h2> <p> This service provides methods to get both setlists and components of setlists such as artists, cities, countries or venues. </p> <h2>Supported Content Types</h2> <p> The REST service currently supports XML (default) and JSON content. </p> <p> To receive a JSON response, set the <code>Accept</code> <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">header</a> to <em>application/json</em>. </p> <h2>Internationalization</h2> <p> <small>(Please note that this is an experimental feature and does not work for all cities!)</small> </p> <p> Most of the featured methods honor the <code>Accept-Language</code> <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">header</a>. This header is used for localizing cities and countries. The default language is English (en), but you can provide any of the languages Spanish (es), French (fr), German (de), Portuguese (pt), Turkish (tr), Italian (it) or Polish (pl). </p> <p> E.g. if you search a setlist for a concert that took place in Vienna and you pass &quot;de&quot; as header, you'll get <em>&quot;Wien, &Ouml;sterreich&quot;</em> instead of <em>&quot;Vienna, Austria&quot;</em>.<br/> This also works if you use a different language than the country's native language. </p> <p> E.g. for a concert in New York, you'll get <em>&quot;Nueva York, Estados Unidos&quot;</em> instead of <em>&quot;New York, United States&quot;</em> if you pass &quot;es&quot; as language. </p> <h2>API Keys</h2> API keys (<a href="https://www.setlist.fm/settings/api">application form</a>) must be included in the request with the <code>x-api-key</code> header. <h2>Version History</h2> <table class="table table-bordered table-versions"> <thead> <tr> <th>Version</th> <th>Docs</th> <th>End of Service</th> </tr> </thead> <tbody> <tr> <td><strong>1.0</strong></td> <td><a href="/docs/1.0">Docs</a></td> <td>-</li> </tr> <tr> <td><strong>0.1</strong></td> <td></td> <td>December 31, 2017</li> </tr> </tbody> </table>

No auth15 endpoints

NBA Stats API

Media

The destination for current and historic NBA statistics.

No auth91 endpoints

APOD

Media

This endpoint structures the APOD imagery and associated metadata so that it can be repurposed for other applications. In addition, if the concept_tags parameter is set to True, then keywords derived from the image explanation are returned. These keywords could be used as auto-generated hashtags for twitter or instagram feeds; but generally help with discoverability of relevant imagery

API key1 endpoints

Listed from APIs.guru (CC0).