Skip to content

Concepts and Terminology

Concepts, terminology, and conventions used in this documentation.

Code samples

HTTP Requests

When documenting HTTP requests we use a multi-lingual syntax highlighting tool to provide examples in a variety of languages. This is particularly useful when demonstrating how to make requests to the API using different programming languages.

sh
curl --request GET \
  --url https://api.sibelius.avid.com/score-storage/v1/scores \
  --header 'Authorization: Bearer <ACCESS_TOKEN>'
js
const http = require("https");

const options = {
  method: "GET",
  hostname: "api.sibelius.avid.com",
  port: null,
  path: "/score-storage/v1/scores",
  headers: {
    Authorization: "Bearer <ACCESS_TOKEN>",
  },
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
py
import http.client

conn = http.client.HTTPSConnection("api.sibelius.avid.com")

headers = { 'Authorization': "Bearer <ACCESS_TOKEN>" }

conn.request("GET", "/score-storage/v1/scores", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sibelius.avid.com/score-storage/v1/scores"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <ACCESS_TOKEN>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
cs
var client = new RestClient("https://api.sibelius.avid.com/score-storage/v1/scores");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <ACCESS_TOKEN>");
IRestResponse response = client.Execute(request);
swift
import Foundation

let headers = ["Authorization": "Bearer <ACCESS_TOKEN>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sibelius.avid.com/score-storage/v1/scores")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
java
HttpResponse<String> response = Unirest.get("https://api.sibelius.avid.com/score-storage/v1/scores")
  .header("Authorization", "Bearer <ACCESS_TOKEN>")
  .asString();

API responses are shown like this:

json
{
  "data": {}
}

Other code examples

Where applicable, language-specific code examples will be provided:

bash
echo "Hello, World!"

Client-side functionality (code running in a web browser) will naturally tend to be written in JavaScript:

js
console.log("This code is running inside a browser!'");

Placeholders

Where applicable we use placeholders to represent values that you need to provide. A placeholder is denoted with angle brackets < > and an ALL_CAPITALS name, for example.

When you see a placeholder, replace it with the appropriate value. For example, if you see <YOUR_CLIENT_ID>, replace it (including the < and >) with your actual client ID.

Abbreviating long examples

For clarity, long examples may be abbreviated with an ellipsis :

json
{
  "access_token": "…"
}

Other languages

If you're using a different language, you can still follow along with the examples. The principles are the same, even if the syntax is different.

If you find yourself needing help with a specific language, please let us know and we'll do our best to provide examples in that language.