Versions Compared

Key

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

...

  1. The application requests credentials. The credentials you pass are different depending on if you want to access public or restricted data (see above).
  2. The application sends a request to the service using the credentials you provided as a query string for the body. 

    • grant_type=password
    • username
    • password
  3. The service responds with access token details and expiration information.

    • access_token
    • expires_in
    • token_type

    The application makes a request for resources using the returned access token. All APIs listed for accessing public data also support secure access to restricted data with an additional parameter for the access token. 

Requesting a Token to Use with Public Data

If you don't have a TCIA account and want to test an API on this page, you can access public data using the NBIA guest account with no password, as follows.

Code Block
titleCall for Testing an NBIA REST API without a Token
curl -d "username=nbia_guest&password=&client_id=NBIA&grant_type=password" -X POST -k https://services.cancerimagingarchive.net/nbia-api/oauth/token

How a Token is Returned/Granted/Given

...

Code Block
titleSample Return Value
 You Have Logged Out successfully.

Testing an API with Public Data

If you don't have a TCIA account and want to test an API, you can access public data using the NBIA guest account with no password, as follows.

Code Block
titleCall for Testing an NBIA REST API without a Token
curl -d "username=nbia_guest&password=&client_id=NBIA&grant_type=password" -X POST -k https://services.cancerimagingarchive.net/nbia-api/oauth/token

REST Advanced REST APIs

The TCIA Radiology Portal’s search features use the following Advanced REST APIs.

...