To validate data, you need to 1) download ECLI, 2) make an API Key in P21E, and 3) send a command from your terminal.
💾 Download ECLI
On Mac or Linux, make the shell script executable. Open the terminal,
cd (change directory) to the directory where you unzipped the file, and enter this command:
chmod +x p21-client.sh
🔑 Make an API Key in P21E
Log in to P21E, and then follow one of these two options. Of the two, User API Key is easier and more secure/traceable.
User API Key: Home > Your Profile > Profile > API Key tab > Add Key.
The API Key and a safe display name will auto-generate.
This API Key has the same Roles & Assignments that you do.
System API Key: Administer > API Keys > New System API Key > Save.
Enter a Name manually, since it won't auto-generate.
AnalystRole or greater (
Rule DesignerRole is needed too on P21E 4.x).
Select a Group that is assigned to the right Project, Study, and Data Package.
To select an entire API Key, double-click it. Then, copy/paste it into commands.
🚨 An API Key is as strong as a username/password pair—guard it well! It grants access to your P21E environment, and has this format:
📢 Send a Validation Command
Edit an example command below that matches your operating system.
Replace the example after
api.keywith your API key.
Replace the example after
web.hostwith the URL of your P21E environment.
Edit the example after
source.sdtmto match the path to your data files (relative to the folder with the unzipped ECLI). To use our sample data, leave this as is.
Replace the examples after
standard.versionto match the values of your Data Package.
Open the terminal,
cdto the directory where you unzipped the file, enter the edited command, and press Enter.
Windows Template Command
Mac/Linux Template Command
The terminal will show the logging messages as the process executes, successfully ending with
Enterprise Validation: Process completed and giving you a URL to view your results such as:
Paste the URL into a web browser to see your results in the P21E Overview page, and then manage Issues, edit define.xml, see your validation history, etc.
You also get an XLSX version of the report in the reports folder where you installed ECLI.
Common use cases for ECLI we've seen include triggering a validation immediately upon data delivery from a vendor (watched folders), scheduling validations at set times (cron jobs), and calling validations via SAS macros.
Your use case for ECLI is up to your imagination, and we're happy to see demos of any integrations or automations you design! ⚙️
👣 What's Next?
Learn more in How do I use P21 Enterprise via API/CLI?
Email questions or feedback to firstname.lastname@example.org.