MusicGraph API Documentation

Accounts API

API calls for creating your personalized user graph

The base URL path for accounts is: http://api.musicgraph.com/api/v2/account/

Create Account

Initalizes your user graph. Requires HTTP POST request.

Parameter Required Description Example
api_key yes The developer API key api_key=[your-api-key]
name yes Group, Company, Organization, etc. "My Company"

Example POST

        curl -X POST -H "Content-Type: application/json" -d '{"name": "My Company"}' http://api.musicgraph.com/api/v2/account?api_key=c8303e90962e3a5ebd5a1f260a69b138
    

Example Response

       {
         "status": {
             "code": 0, 
             "message": 
             "Success", 
             "api": "v2"
         }, 
         data: {
             "status": "active",
             "name": "My Company",
             "entity_type": "account",
             "date_created": 1420581139487,
             "date_last_modified": 1420581139714,
             "id": "6137fcec-efbc-1720-e7db-f726a47e022c",
             "account_id": "2445580905922"
         }
       }
    

Get Account

Retrieves meta information about your account/graph.

Parameter Required Description Example
api_key yes The developer API key api_key=[your-api-key]
id yes This is provided in the POST response ex. 6137fcec-efbc-1720-e7db-f726a47e022c

Example GET

      curl -X GET -H "Content-Type: application/json" http://api.musicgraph.com/api/v2/account/6137fcec-efbc-1720-e7db-f726a47e022c?api_key=c8303e90962e3a5ebd5a1f260a69b138
    

Example Response

       {
         "status": {
             "code": 0, 
             "message": 
             "Success", 
             "api": "v2"
         }, 
         data: {
             "status": "active",
             "name": "My Company",
             "entity_type": "account",
             "date_created": 1420581139487,
             "date_last_modified": 1420581139714,
             "id": "6137fcec-efbc-1720-e7db-f726a47e022c",
             "account_id": "2445580905922"
         }
       }
    

Update Account

Provides the ability to update meta information about your account/graph.

Requires HTTP PUT request.

Parameter Required Description Example
api_key yes The developer API key api_key=[your-api-key]
id yes This is provided in the POST response ex. 0ca0b4a7-d18f-0745-9023-28a7a1fefee6

Updatable fields are:

name

Example PUT

        curl -X PUT -H "Content-Type: application/json" -d '{"name": "My Personal Graph"}' http://api.musicgraph.com/api/v2/account/6137fcec-efbc-1720-e7db-f726a47e022c?api_key=c8303e90962e3a5ebd5a1f260a69b138
    

Example Response

       {
         "status": {
             "code": 0, 
             "message": 
             "Success", 
             "api": "v2"
         }, 
         data: {
             "status": "active",
             "name": "My Personal Graph",
             "entity_type": "account",
             "date_created": 1420581139487,
             "date_last_modified": 1420581488159,
             "id": "6137fcec-efbc-1720-e7db-f726a47e022c",
             "account_id": "2445580905922"
         }
       }