Creating a temporary APM Team Center API token

Document ID : KB000010509
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

This is some information on how to create a token to authenticate with APM Team Center (ATC) without using the UI.

Background:

The token is only valid for one hour.

This is the mechanism that the APMSQL server uses to authenticate, it was required to create an option where a username and password could be used to create a token.

Environment:
Valid from APM 10.5 only
Instructions:

1) Prepare a file containing the JSON request, in the example the file would be called request.json

It just needs to contain the username and password, like this

 


"username":"<username>", 
"password":"<password>" 

2) Use the file to make this request to the MOM or standalone Enterprise Manager:

curl -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d@request.json http://<EM host>:<EM webserver port>/apm/appmap/private/token/temporaryToken 

If you name your JSON object differently, remember to update it in the corresponding part of the curl command -d@<JSON object>

 

you will be able to use the returned token to authenticate against the API

Additional Information:

Information relating to the API, including details of creating the token through the UI and how to use the token for user authentication

https://docops.ca.com/ca-apm/10-5/en/integrating/api-reference-guide/apm-rest-api