2023:Web Service Lookup (Lookup Specification): Difference between revisions

From Grooper Wiki
No edit summary
Line 28: Line 28:


=== Examples ===
=== Examples ===
 
<tabs style="margin:20px">
==== JSON ====
<tab name = "JSON" style="margin:20px">
 
</tab>
==== XML ====
<tab name ="XML" style="margin:20px">
</tab>
</tabs>

Revision as of 14:41, 20 March 2023

WIP

This article is a work-in-progress or created as a placeholder for testing purposes. This article is subject to change and/or expansion. It may be incomplete, inaccurate, or stop abruptly.

This tag will be removed upon draft completion.

API refers to a Lookup Process in Grooper. It mates a URL with a Data Field in Grooper to produce extraction results with far less hassle than one would have had creating/utilizing various Lexicons, Data Types/Fields, etc.

About

API is a new Lookup Process as of v2023. It allows users to ping off of a URL outside of the Grooper database and wed it with a Data Field constructed in Grooper for easier, more accurate extraction. API Lookups can be passed into Grooper in one of two formats: JSON or XML.

Getting Started

Here, we'll detail a brief tutorial on how to set up an API connection.

  1. Select your Project.
    • For this, and further examples, we'll use a simple set-up of travelers and their destinations.
  2. Drill down to the Data Model and select Lookups, under Behavior
  3. Now, to create the actual API, you will need to enter a URL which will provide you with the bulk of the information your are looking to extract. For this example, we want to pull ZIP codes, so we have used Zippopatum, a free database from where we can pull ZIPs and feed them into Grooper via JSON format.
    • Note the format of the URL, the very last piece has us reference the Data Field into which we want to plug the information. This is essential, as it's telling the API where to place the ZIP code once it has it. Sort of like being told where to put a box once you've picked it up.
  4. If any Authentication is needed for the API, it will need to be set up.
  5. From there, you can set up your Record and Value Selectors.

Examples