You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.

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

Obtain API Key

Obtain API Key

#InstructionScreenshotRemarks
1Navigate web browser to https://api.developer.library.cdisclibrary.org/signin.


2Enter same credentials as you would for CDISC Library Data Standards Browser. Click Sign In.

Enter the same credentials you would for Data Standards Browser.

Use the Forgot your password? link to reset password.

3Select API Key from top navigation menu.


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


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

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:

Screen capture using Postman, with a fictitious API key:

Example curl command, with a fictitious API key:

curl -X GET https://api.library.cdisclibrary.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:

filename response TEMP;

proc http
	url="https://api.library.cdisclibrary.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.
Sample response in JSON
{
    "_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.cdisclibrary.org/reports


  • No labels