Versions Compared

Key

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


Warning
titleImportant note
about API key

Accessing CDISC Library API without an API key will result in HTTP 401 (Access Denied). A message similar to the following will appear in the response payload:

Code Block
{
    "statusCode": 401,
    "message": "Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API."
}



Info

As of 2020-11-11

These are pre-launch instructions for using API Key Auth. Base URL may change depending on how we resolve issues with Azure Application Gateway, which will be updated prior to production launch.

Info

As of November 11, 2020, API access to CDISC Library requires an API key. Previous Basic Auth is no longer supported. Follow these instructions to obtain and test with an API key. 

Please contact the CDISC Library Support (mailto:cdisc_library_support@cdisc.org) when you need assistance.

General Process Flow

Gliffy Diagram
macroId66f330fb-553c-4e1f-844e-7f494bf2407d
nameObtain API Key
pagePin1


Obtain API Key

#InstructionScreenshotRemarks
1Obtain a CDISC Library account and set up initial passwordFor details, refer to https://www.cdisc.org/cdisc-library/getting-started
2Navigate web browser to to the API Management Developer Portal at https://api.developer.library.cdisclibrarycdisc.org/signin.


Expand


Users can alternatively access the API Management Developer Portal through the Data Standards Browser's gear icon.
32Enter same credentials as you would for CDISC Library Data Standards Browser. Click Sign In.


Expand


Enter the same credentials you would for Data Standards Browser.

Use the Forgot your password? link to reset password.

34Select API Key from top navigation menu.


Expand



45Verify CDISC Library API is listed as a product under the Subscription section.


Expand



56Click "Show" (of either primary or secondary key) to reveal a system-generated API key assigned to your CDISC Library account.


Expand


An API key is a 32-byte hexadecimal value. A fictitious key looks like this: abcdef0123456789abcdef0123456789.

Test API Endpoint with API Subscription Key


InstructionScreenshotRemarks
1

Compose an CDISC Library API query to this specification:


Expand

Screen capture using Postman, with a fictitious API key:

Image Modified

Example curl command, with a fictitious API key:

Code Block
linenumberstrue
curl -X GET https://api.library.cdisclibrarycdisc.org/api/mdr/products \
   -H "Accept: application/json" \
   -H "api-key: abcdef0123456789abcdef0123456789"

Example SAS code with a fictitious API key, using v9.4 and SAS OnDemand for Academics:

Code Block
linenumberstrue
filename response TEMP;

proc http
	url="https://api.library.cdisclibrarycdisc.org/api/mdr/products"
	out=response;
	headers
    	/* Use request header to specify API key authentication */
    	"api-key"="abcdef0123456789abcdef0123456789";
run;

data _null_;
	infile response;
	input;
	put _infile_;
run;



Specifying the Accept header is optional.

2Execute query.


Expand


Code Block
titleSample response in JSON
linenumberstrue
{
    "_links": {
        "data-analysis": {
            "_links": {
                "adam": [
                    {
                        "href": "/mdr/adam/adam-2-1",
                        "title": "Analysis Data Model Version 2.1",
                        "type": "Foundational Model"
                    },
                    {
                        "href": "/mdr/adam/adam-adae-1-0",
                        "title": "Analysis Data Model Data Structure for Adverse Event Analysis Version 1.0",
                        "type": "Implementation Guide"
                    },
                    ...
                ],
                "self": {
                    "href": "/mdr/products/DataAnalysis",
                    "title": "Product Group Data Analysis",
                    "type": "CDISC Library Product Group"
                }
            }
        },
        ...
    }
}



HTTP 200 is expected when authentication is successful.
3Obtain API usage metrics from https://api.developer.library.cdisclibrarycdisc.org/reports


Expand