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, 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 the API Management Developer Portal at https://api.developer.library.cdisc.org/signin.
Expand

Image Modified

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

Image Modified

Enter the same credentials you would for Data Standards Browser.

Use the Forgot your password? link to reset password.

4Select API Key from top navigation menu.
Expand

Image Modified


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

Image Modified


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

Image Modified

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://library.cdisc.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://library.cdisc.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.cdisc.org/reports
Expand

Image Modified

Image Modified