🤔 ECLI vs. REST API
| ECLI | REST API |
Basic function | Text-based user interface that executes commands to automate tasks in Enterprise, like validation at regular intervals | Software used to help your organizations internal applications interact and communicate with Enterprise |
Result | Instant results displayed | Seen on third-party application |
Export define-XML metadata | Yes | Yes |
Availability | Included with all foundational P21E environments | Only available in environments with advanced tier modules enabled, beginning in version 5.2.0 and later |
🤷♀️ What is ECLI?
Every Operating System comes with its default Command Line Interface, though you can choose to install a more advanced CLI depending on your needs. For example:
Windows: Command Prompt
Linux: Linux Bash Shell
MacOs: Mac Terminal
CLI is a basic way of computing. Its main function is to receive the text commands on the operating system and constructs them into functions. The CLI plays a vital role in the management of cloud computing because of its scripting abilities and developer user experience.
CLI uses commands to generally interact with the computer. Unlike a Graphical User Interface (GUI), CLI uses less RAM space and interacts with the operating system directly.
To use a CLI, you need to have a certain amount of knowledge of programming and command operations.
P21 Enterprise has a command line automation tool compatible with all P21E environments. It's called Enterprise Command Line Interface, and it empowers users to automate and customize essential features, such as data validation and define.xml generation.
For example, if your organization collects patient data through a mobile app, whether entered manually by the patient or recorded by a wearable device, that patient data becomes a dataset that can be validated immediately upon collection using the programming flexibility of ECLI. Another way companies use ECLI is to validate multiple datasets at once at set intervals, like monthly or quarterly.
❓ What is REST API?
Application Programming Interface (API) is an intermediary software that helps two applications "talk" to each other.
For example, when you open an app and perform an action on your cell phone, the app connects to the internet, and the request for data is sent to the server. The server then retrieves the data, reads it, makes the required actions, and directs it back to your phone in the form of information you want to read in a GUI you can easily understand. All this happens through API.
APIs also play a vital role in terms of security and can also be used to control the access to software functions and hardware devices that an app may not have permission to use.
REST API is a kind of web-service retrieves necessary data and helps your organization's internal system communicate and retrieve necessary data from Enterprise.
Amongst the many protocols supported by REST, the most common one is HTTP. When a request is sent from the client using a HTTPRequest, a corresponding response is sent from the server using HTTPResponse. The most widely used machine readable format supported for requests and responses are JSON (Javascript Object Notification) and XML (Extensible Markup Language).
Some examples of data retrieved from Enterprise through REST API are:
The latest content of your spec
Viewing the metadata in a Standard
Exporting a define.xml for a study
💻 Sample Scenario
Pharma ABC currently is using REST API to automatically retrieve the most up-to-date variable level metadata so they can use that information to set up the final variable attributes for their CDISC SDTM dataset.
👀 See the code
👀 See the code
data dm(label="Demographics"); attrib STUDYID length=6 label="Study Identifier" DOMAIN length=2 label="Domain Abbreciation" USUBJID length=10 label="Unique Subject Identifier" ...[and so on] set dm; run;
More Windows examples
More Windows examples
Sample data validation command - Windows:
java -jar p21-client-2.3.0.jar ^ --source.sdtm="aspera://c:/path/to/your/source/xpt" ^ --project="Project Name" ^ --study="Study Name" ^ --datapackage="Data Package Name" ^ --standard=SDTM ^ --standard.version=3.3 ^ --cdisc.ct.sdtm.version="2022-09-30" ^ --meddra.version="23.0" ^ --whodrug.version="GLOBALB3Sep19" ^ --loinc.version=latest ^ --report=c:/path/to/your/output/report.xlsx
Sample Define.xml validation - Windows:
java -jar p21-client-2.3.0.jar ^ --project="Project Name" ^ --study="Study Name" ^ --datapackage="Data Package Name" ^ --source.define="c:/path/to/your/define.xml" ^ --standard=ADaM ^ --standard.version=1.2 ^ --cdisc.ct.adam.version="2022-06-24" ^ --cdisc.ct.sdtm.version="2022-09-30" ^ --meddra.version="25.0" ^ --report=c:/path/to/your/output/report.xlsx
More Linux examples
More Linux examples
Sample data validation command - Linux:
java -jar p21-client-2.3.0.jar \ --project="Project Name" \ --study="Study Name" \ --datapackage="Data Package Name" \ --source.sdtm="aspera:///path/to/your/source/xpt" \ --source.define="/path/to/your/define.xml" \ --source.comment="Your validation comment text goes here" \ --standard=SDTM \ --standard.version=3.3 \ --cdisc.ct.sdtm.version="2022-09-30" \ --meddra.version="23.0" \ --whodrug.version="GLOBALB3Sep19" \ --loinc.version=latest \ --report="/path/to/your/output/report.xlsx"
Sample Define.xml validation - Windows:
java -jar p21-client-2.3.0.jar \ --project="Project Name" \ --study="Study Name" \ --datapackage="Data Package Name" \ --source.define="/path/to/your/define.xml" \ --standard=ADaM \ --standard.version=1.2 \ --cdisc.ct.adam.version="2022-06-24" \ --cdisc.ct.sdtm.version="2022-09-30" \ --meddra.version="25.0" \ --report="/path/to/your/output/report.xlsx"
Still need help understanding ECLI and REST API? Contact your Customer Success Manager!