The UMLS SOAP API is deprecated as of the 2020AA release. The SOAP API will be discontinued on December 31, 2020. SOAP API users are encouraged to switch to the REST API.
New: The getProxyGrantTicketWithApiKey method gives users an additional authentication option when requesting a
ticket-granting ticket (or Proxy Grant Ticket). Rather than username/password, users can pass their api key (available in the UTS ‘My Profile’ area) as a parameter to
this method to obtain a ticket-granting ticket. If your API Key appears blank in your profile, perform the following steps:
* Click ‘Edit Profile’
* Click ‘Generate New API Key’
* Click ‘Save Profile’
Your new API Key is now available for use.
| Interface | Method | Use Case | Object or Data type Returned | Guidance |
|---|---|---|---|---|
| UtsWsSecurityControllerController | ||||
| getProxyGrantTicket | Retrieve a proxy grant ticket (also known as a ticket-granting ticket). | String | Generate one time, normally when your application starts up. A ticket granting ticket is good for 8 hours, and is needed for the getProxyTicket() method below. You do not need to generate a new ticket granting ticket for each call to the API. | |
| getProxyGrantTicketWithApiKey | Retrieve a proxy grant ticket (also known as a ticket-granting ticket). | String | Generate one time, normally when your application starts up. A ticket granting ticket is good for 8 hours, and is needed for the getProxyTicket() method below. You do not need to generate a new ticket granting ticket for each call to the API. | |
| getProxyTicket | Retrieve a single-use service ticket to make calls to the API. | String | Use these service tickets when making calls to the content, history, metadata, etc interfaces. These tickets are good for one use or 5 minutes, whichever comes first. You may also use these service tickets for the AccessGUDID API (when retrieving SNOMED CT information). | |
| validateProxyTicket | Validate a single-use service ticket. | String | Returns the username of the person who requested the service ticket. This is useful if you are hosting UMLS content and want to validate that your users are UMLS licensees | |
The examples below requires an instance of the UtsWsSecurityController interface.
In general, your application will follow this sequence when making calls to the API:
Method Signature: getProxyGrantTicket(String username, String password)
//use your UMLS username and password
private String username = "InformaticsResearcher";
private String password = "C0des@reCool";
private String ticketGrantingTicket = utsSecurityService.getProxyGrantTicket(username, password);
//returns a ticket-granting ticket, such as TGT-296-vRJn4UOsEBNugGUVCHTHkbZjvSa43lzdmeT3b6S7HihrWyXC0-cas
Method Signature: getProxyGrantTicketWithApiKey(String apikey)
//use your UMLS API key from the 'My Profile' area of your UTS account
private String apikey = "123456abcdef-g";
private String ticketGrantingTicket = utsSecurityService.getProxyGrantTicketWithApiKey(apikey);
//returns a ticket-granting ticket, such as TGT-296-vRJn4UOsEBNugGUVCHTHkbZjvSa43lzdmeT3b6S7HihrWyXC0-cas
Method Signature: getProxyTicket(String ticketGrantingTicket, String targetService)
private String serviceName = "http://umlsks.nlm.nih.gov";
private String getProxyTicket() {
try {
return utsSecurityService.getProxyTicket(ticketGrantingTicket, serviceName);
}
catch (Exception e) {
return "";
}
}
Method Signature: validateProxyTicket(String serviceTicket, String targetService)
private String serviceName = "http://umlsks.nlm.nih.gov";
//below is a SAMPLE service ticket
String user = utsSecurityService.validateProxyTicket("ST-890427-tH2kLYxbuOMSKWUOcbH5-cas", "http://umlsks.nlm.nih.gov")
If you obtained your ticket-granting ticket by authenticating with your UMLS username and password,
the validateProxyTicket method returns the UMLS username who requested the ticket, such as JoeCoolResearcher.
If you obtained your ticket-granting ticket by authenticating with your UMLS API Key,
the validateProxyTicket method returns the user’s API key, such as 123456abcdef-g.