All About The Traction Tools API

Traction Tools has created an API to allow our clients to connect their favorite tools to our software. What is an API? An application programming interface (API) is a set of subroutine definitions, protocols, and tools for building application software. This allows Traction Tools data to be integrated with a wide variety of systems. 

To use the Traction Tools API, you must first generate a token via the instructions at traction.tools/swagger, or see below.

Once you have your token, view the complete API and use the options at traction.tools/swagger to get data. 

How to Generate a Token:

To interact with the API you'll need to request a token. This is done with a post request to the server. Tokens are only valid for 2 weeks. After which, a new one must be generated.

The post request requires three paramemters.

  1. grant_type which is always "password"
  2. userName which is your login email
  3. password which is your login password

The post request is delivered to https://traction.tools/Token. The following is a curl.

curl -i -X POST
"grant_type= password"
"userName= YOUR_USERNAME_HERE"
"password= YOUR_PASSWORD_HERE"
'https://traction.tools/Token'

This will return json that looks similar to the following:

{
  "access_token":"qriivcbIB143adasdVuweqweasdVidi-wqfayefGFa63IiaJasdf325salo10asdf0vaxcve0awRUPph-KDSgqweascvoxzxf...
  "expires_in":1209599,
  "userName":"user@organization.com",
  ".issued":"Mon, 28 Dec 2015 07:05:37 GMT",
  ".expires":"Mon, 11 Jan 2016 07:05:37 GMT"
}

The access_token will be used in all future requests. Notice the token_type. It indicates that this access_token is a Bearer token.

Formatting a Request:

Once you have your Bearer token. You must add it to the header of all future requests.

Example: GET a listing scorecard items
curl -i -X GET -H "Authorization:Bearer YOUR_BEARER_TOKEN_HERE" 'https://traction.tools/api/v0/scorecard/items/'
MKM 10/31
  • 144
  • 01-Nov-2018
  • 1355 Views