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

Compare with Current View Page History

« Previous Version 4 Next »

Important 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:

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

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

Obtain API Key

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.

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.

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.


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


6Click "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://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:

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


  • No labels