Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The API structure consists of a base URL followed by the API and query parameters, in that order. For example, the API shown below requests all Body Part Values and Counts for the PT modality.

Note: To accommodate special characters in passwords, use double quotes on Windows and single quotes on Mac and Linux.

Info
iconfalse
titleExample NBIA Advanced REST API Query


Code Block
curl -H "Authorization:Bearer cd2b2895-85d0-49c5-bd75-804f162da942" -k "https://services.cancerimagingarchive.net/nbia-api/services/getBodyPartValuesAndCounts?Modality=PT"


...

Access to any NBIA Advanced REST API requires an access token. A request for an access token takes the following structure. Note that USER should be your TCIA username and PASSWORD should be your TCIA password.

Note: To accommodate special characters in passwords, use double quotes on Windows and single quotes on Mac and Linux.

Code Block
titleStructure of a Request for a Token
curl -v -d "username=USER&password=PASSWORD&client_id=NBIA&grant_type=password" -k https://services.cancerimagingarchive.net/nbia-api/oauth/token

...