API for coders REST API
HTTP
How to use PlotAPI with HTTP.
In this demonstration, we'll use some sample data to create an interactive PlotAPI Chord diagram with a HTTP request.
Interactive HTML
POST https://plotapi.com/chord HTTP/1.1
content-type: application/json
Authorization: Basic api_key <your_api_key>
{
"matrix": [
[0, 5, 6, 4, 7, 4],
[5, 0, 5, 4, 6, 5],
[6, 5, 0, 4, 5, 5],
[4, 4, 4, 0, 5, 5],
[7, 6, 5, 5, 0, 4],
[4, 5, 5, 5, 4, 0]
],
"names": ["Action", "Adventure", "Comedy", "Drama", "Fantasy", "Thriller"]
}
PNG Image
POST https://plotapi.com/chord/png HTTP/1.1
content-type: application/json
Authorization: Basic api_key <your_api_key>
{
"matrix": [
[0, 5, 6, 4, 7, 4],
[5, 0, 5, 4, 6, 5],
[6, 5, 0, 4, 5, 5],
[4, 4, 4, 0, 5, 5],
[7, 6, 5, 5, 0, 4],
[4, 5, 5, 5, 4, 0]
],
"names": ["Action", "Adventure", "Comedy", "Drama", "Fantasy", "Thriller"]
}