The Graph-R API

Guides and API reference materials to help you get started, integrate, and optimize your use of the API platform

Base Example

The Graph-R API provides mutliple endpoints for retrieving, adding, updating, and deleting data. Regardless of the specifics of each endpoint and action, the way you call the API follows the same pattern. Each call consists of:

Successful calls to each action always return a status of 200 (OK) and a JSON object.

Unsuccessful calls always return a status of 400 (Bad Request) and a JSON object that indicates the exception that has occurred.

C# Example

The following code shows a typical C# call to the API:

WebRequest request = WebRequest.Create("https://api.graph-r.com/search");
request.Method = "GET";
request.Headers.Add("SubscriptionName", "MY_ORG_NAME");
request.Headers.Add("SubscriptionKey", "MY_ORG_KEY");
request.Headers.Add("Options", "Terms=Blockchain Consensus;ExactMatch=true;");
try
{
    using (WebResponse response = request.GetResponse())
    {
        string status = ((HttpWebResponse)response).StatusDescription;
        if (status.ToUpper() == "OK")
        {
            using (Stream dataStream = response.GetResponseStream())
            {
                StreamReader reader = new StreamReader(dataStream);
                string responseFromServer = reader.ReadToEnd();
                //If a single object is expected
                var data = JObject.Parse(responseFromServer); 
                //OR if a collection is expected: 
                //var data = JArray.Parse(responseFromServer); 
                //TODO: Work with the 'data' object here    
            }
        }
        else
        {
            //TODO: Handle any bad requests
        }
        response.Close();
    }
}
catch (Exception ex)
{
    //TODO: Handle any exceptions
}
            

The table below describes each of the actions in detail, including the parameters, the Options header, and the type of JSON object returned.

You can see the class definitions used to generate the JSON objects here.

You can see the data here.

API Name
AdjacentRoles
View the methods and options for using the AdjacentRoles API
AdjacentSkills
View the methods and options for using the AdjacentSkills API
AlphaRoles
View the methods and options for using the AlphaRoles API
AlphaSkills
View the methods and options for using the AlphaSkills API
Concepts
View the methods and options for using the Concepts API
RoleGroups
View the methods and options for using the RoleGroups API
Roles
View the methods and options for using the Roles API
Search
View the methods and options for using the Search API
Skills
View the methods and options for using the Skills API
Subscription
View the methods and options for using the Subscription API
Tags
View the methods and options for using the Tags API
Taxonomies
View the methods and options for using the Taxonomies API