Applies to: v11, v12, v12.1, v12.2+
In this article:
You can accomplish API authentication in one of two ways:
- Authentication using API Keys; OR
- If you are trying to access an older v.11 system, basic authentication using a user account and password.
Apptio is now using API Keys for API authentication. Using username/password for authentication is chiefly supported for v.11 systems only. The following table shows which authentication method to use based on the Apptio version:
Apptio version | Authentication method to use |
---|
v.11.x, v.12.0, v.12.1 | Username/Password |
v.12.2+ | API Keys (preferred) Username/Password (not recommended) |
To understand API Keys and why they are the preferred authentication method to use, read API keys and Frontdoor: Overview and FAQs.
Steps for User Authentication in v.12.2+ systems (any application using Frontdoor)
- Use API Keys or a Username/Password to authenticate against Frontdoor and to obtain an Apptio OpenToken.
- Get the Frontdoor Environment ID for the Environment in which your Costing Application is entitled using the 'apptio-opentoken' that you obtained in Step 1.
When you have the open token and environmen,t you use those in subsequent REST API calls to upload or download data using the Apptio API. These values are passed in the header as values for 'apptio-opentoken' and 'apptio-current-environment'. This is demonstrated in the cURL example below.
cURL Example
Here is the example that obtains the list of projects in the environment.
NOTE This example is broken into three lines for visibility. When actually executing, this would be on one line and the apptio-opentoken and the apptio-current-environment must be passed.
curl -X GET https://customer.apptio.com/biit/api/v1/projects
-H 'apptio-opentoken:36d9c8b4129e835218952c229ccfcaf9ab1906e43d6da66a0a57ae426aab71a607c16bea57a198b5f8aae8ae509d9d0c'
-H 'apptio-current-environment:d8829ad7-0e9e-4938-b181-89d9c9d5dac9'
For all further API calls that use this authentication session, keep the cookies (apptio-opentoken and apptio-current-environment) intact to help ensure that additional (redundant) sessions are not established with each API call. In applications, such as Postman, these cookies are kept intact by default. In cURL and other scripting languages, you might need to explicitly add a cookie file to the parameters.
This article is open for your feedback. At the bottom of this screen, click Add a comment.