Versions Compared

Key

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

...

Info
iconfalse
titleExample NBIA Search with Authentication REST API Query


Code Block
curl -H "Authorization:Bearer cd2b2895-85d0-49c5-bd75-804f162da942" -k "https://services.cancerimagingarchive.net/nbia-api/services/v2/getModalityValues?Collection=TCGA-BRCA"


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

We can break this down as follows.

...

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, 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

...