How to Utilize Apica Data Repository From ZT - Inline Script Version
This tutorial will guide you in creating and uploading a check which utilizes ADR to pull data from an inline script.
The ADR check you will create pulls a username and password to perform a dummy login to https://the-internet.herokuapp.com/login. The credentials are listed right on the page of the site, which makes clear it is intended for test purposes only. The site stores no data and needs no personalized credentials whatsoever. However, it gives a “success” message upon successful login with the dummy credentials which is all we need.
The .prxdat file and the inline scripts for the demo can be found here:
Step | Screenshot/Notes |
---|---|
Step 1: Configure personal settingsGo to “Personal Settings” in your ZT instance and add the following details to “Apica Table Server API Configuration”. Make sure the checkbox next to the box heading is checked: This setting will use HTTP to connect to {hostname}.apica.local. Use the hostname of the server on which ADR is installed. The table you will be pulling from is, of course, hosted on this server. | |
Step 2: Populate ADR with the necessary dataYou will need a login to the ADR instance if you want to populate the ADR instance with your own tables/data. You can use the test table specified in the script using the provided inline script. |
|
Step 3: Create the scriptThere are various ways to CRUD (create/read/update/delete) to ADR, including but not limited to utilization of the ADR REST API script and/or inline script usage. This article covers inline script implementation, so use the inline script file above to pull in the username and password data for the script. |
|
Step 4: Compile the script to allow communication with ADRCompile the script as usual and make sure “Apply Apica Table Server API configuration from Personal Settings” is checked. | |
Step 5: Create the check with specialized settingsSpecify the .class name within the check settings: | This will allow the check to run the pre-compiled .class file (with the ATS Server settings specified) You will need additional settings, such as “-ats-server-name”, specified if you are using the REST API plugin. See the documentation which was bundled with ADR for more details. You MUST select a location for the check which has access to the ADR server you specified earlier! As such, a script which utilizes ADR must be run on a private agent which can successfully connect to your ADR server. Otherwise the check will not run. |
Step 6: Provide the .class file to Apica for UploadingSubmit a request to Support mentioning the purpose of the .class file and have them upload the .class file into your check. |
|
After following these steps you should be able to run your ADR check successfully!
Can't find what you're looking for? Send an E-mail to support@apica.io