APIs

Drug Interaction API

getVersion

Information returned
Version of the data set(s)
Service domain
https://rxnav.nlm.nih.gov
HTTP request
GET  /REST/interaction/version.xml

Description

Get the versions of the data sets.

Parameters

ParameterLocationUseDescriptionDefault
formatPathOptional

Notation for results

One of:
.xml
Get results in XML
.json
Get results in JSON
.xml

Output structure

Results are available as either XML or JSON.

  • The XML result has the root element interactiondata. It is described in the XML Schema for the Drug Interaction API; the relevant element structure is summarized below. Elements that would be empty might be left out.

  • The JSON result is an object {...}, analogous to the content of the XML interactiondata. Fields that might occur multiple times in the XML are expressed as an array. Fields that would be empty might be null or left out. Numbers are expressed as strings.

Both XML and JSON results follow the same outline:

interactiondata
Root element in XML, or anonymous object in JSON
nlmDisclaimer
sourceVersionList
Interaction-data sources and dataset version
sourceVersion (array)
Source name and data-set version, separated by a colon

Example: Interaction data-set versions

XML: https://rxnav.nlm.nih.gov/REST/interaction/version

JSON: https://rxnav.nlm.nih.gov/REST/interaction/version.json

An XML result is shown below.

<interactiondata>
    <nlmDisclaimer>It is not the intention of NLM to provide specific medical advice, but rather to provide users with information to better understand their health and their medications. NLM urges you to consult with a qualified physician for advice about medications.</nlmDisclaimer>
    <sourceVersionList>
        <sourceVersion>DrugBank:5.1</sourceVersion>
        <sourceVersion>ONCHigh:0.1</sourceVersion>
    </sourceVersionList>
</interactiondata>