API Overview

API Overview

6min
the hunni api gives you complete control over your assets you can folders retrieve, create, modify, and delete folders tables retrieve, create, modify, and delete tables details and table data views retrieve view details and data columns retrieve columns and column types rows retrieve, create, modify, and delete rows other get asset types, subscription details, and api version numbers the first step to using the api is authentication, which is explained below then feel free to explore our api code examples docid\ n3w2kf2 cfm3ihf3 rbvu and reference docs api credentials you can obtain your api credentials from the account menu located at the bottom of the left hand navigation organization admins can enable api access for user accounts under the manage users menu, then clicking the gear icon on the users row and choosing enabled from the api access dropdown users that have api access can retrieve and reset their api credentials from the bottom of the my profile menu in account api authentication hunni api supports the client credentials grant oauth 2 0 authentication method to generate an api token, you will need to generate a client id and client secret for the account accessing the api this can be done in the manage users menu for business subscribers and my profile for individual subscribers use the following token endpoint to authenticate with the hunni api token endpoint https //api hunni io/oauth/token free accounts do not have api access obtaining an access token request an access token using the token endpoint with the following parameters send client credentials in the request body name type description grant type string value is client credentials client id string the client id of the account client secret string the client secret of the account token response if the request for an access token is succesful, the authorization server will return an access token string, which can then be used in your api call sample c# token request code note the c# example below requires the newtonsoft json library string strtoken = null; string strclientid = "abcdefghijklmnop"; string strclientsecret = "1234567890"; using (httpclient client = new httpclient()) { var requesttoken = new httprequestmessage { method = httpmethod post, requesturi = new uri("https //api hunni io/oauth/token"), content = new stringcontent("grant type=client credentials\&client id=" + strclientid + "\&client secret=" + strclientsecret) }; using (httpresponsemessage response = client sendasync(requesttoken) result) { using (httpcontent content = response content) { var json = content readasstringasync() result; var result = jsonconvert deserializeobject\<dynamic>(json); if (result\["error description"] == null) { strtoken = result access token; } } } }