WIKI will be undergoing planned maintenance 12 June 2021 10:00:00 AM CT.
During this 1 hour window the system may be unavailable. Please save any content before this maintenance begins.
Page tree
Skip to end of metadata
Go to start of metadata

Introduction

This article is continuation from Getting Started: Programmatically connect to CDISC Library API. We will inspect the JSON output and discuss the concept of hypermedia links.

JSON Output

Here is an except of the JSON output using this query endpoint: /mdr/products/Terminology:

{
  "_links": {
    "self": {
      "href": "/mdr/products/Terminology",
      "title": "Product Group Terminology",
      "type": "CDISC Library Product Group"
    },
    "packages": [
      {
        "href": "/mdr/ct/packages/adamct-2014-09-26",
        "title": "ADaM Controlled Terminology Package 19 Effective 2014-09-26",
        "type": "Terminology"
      },
      {
        "href": "/mdr/ct/packages/adamct-2015-12-18",
        "title": "ADaM Controlled Terminology Package 24 Effective 2015-12-18",
        "type": "Terminology"
      },
      ...
      {
        "href": "/mdr/ct/packages/sendct-2018-12-21",
        "title": "SEND Controlled Terminology Package 36 Effective 2018-12-21",
        "type": "Terminology"
      }
    ]
  }
}

Notice how it includes a couple of ADaM (lines #9-18) and SEND (lines #20-34) Controlled Terminology publications. In fact, each publication is a JSON object, i.e., surrounded by a pair of curly brackets { }. Each of these JSON object contains three JSON key-value pairs, namely href, title, and type. A JSON array, namely packages (line #1), groups all these JSON objects together. Following the href's value allows you to transition to the next level of information. For example, /mdr/ct/packages/adamct-2014-09-26 (line #10) is an endpoint for "ADaM Controlled Terminology Package 19 Effective 2014-09-26," as title indicates (line #4).

The above describes how CDISC Library implements hypermedia links, enabling you to transition from the current state to another. You can read more about hypermedia links by researching on HATEOES principle on-line.

Further Reading

IETF RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format. https://tools.ietf.org/html/rfc8259