Scan

SCAN scans the source specified in URL, generates Enth specific information (MODEL) and loads that information into the Enth Appliance, or into the Global Enth Repository. The LOAD parameter specifies whether the MODEL is loaded statically (to the Enth Appliance) or dynamically (to the Enth Repository).

NOTE: SOME OPTIONS define below are Enth Internal, the KEY must contains Enth Administrator privileges.


Methods

   POST


Consumes

   application/x-www-form-urlencoded


Produces

   text/html


Returns

    If successful, the new GUID for the MODEL. Otherwise, an error message


Parameters

Parameter Data Type Required Administrator Description
KEY String Required A valid Enth Key (refer to Login). Must be an Owner or Administrator.
URL String Required The URL of source to be scanned.
JDBC example,any valid JDBC URL. jdbc:sqlserver://data.xxxx.com:1433
CSV/TXT example, any valid local path or URL - c:\local\MYFILE.txt or https://www.xxxx.gov/StockMarket_csv_2/data/DJTA.csv
ElasticSearch example, the ES Index - http://ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:9200/twitter/status/
Socrata example, the Odata.svc location - https://data.xxxxx.gov/odata.svc
CSV example - http://data.xxxx.gov/FedFunds.txt
JDBCCLASS String     Required for JDBC. Java class for your JDBC driver.
LOAD INTEGER Required LOAD specifies where the MODEL is loaded.
ENTH_DYNAMIC1Indicates the MODEL is loaded in to Enth Repository.
ENTH_STATIC2Indicates the MODEL is loaded into the local Enth Appliance.
DATASOURCETYPE INTEGER Required Specifies to Enth the data source being loaded.
ENTH_JDBC0JDBC SQL to relational data source Default
ENTH_SOCRATA1ENTH INTERNAL - Socrata OpenData Specific (v1 -v3)
ENTH_OASIS2ENTH INTERNAL - Oasis OpenData (v4)
ENTH_SPARK3ENTH INTERNAL - Data persisted in Spark, typically this is temporarily cached for Enth post processing
ENTH_SPARK_ELASTICSEARCH4ENTH INTERNAL - ElasticSearch via Spark
ENTH_ELASTICSEARCH5ElasticSearch native
ENTH_SPARK_HADOOP6ENTH INTERNAL - HADOOP via Spar
ENTH_CKAN7ENTH INTERNAL - OpenData (CKAN)
ENTH_SPARK_CSV8Comma Separated Values (CSV) or common text files.
ENTH_ZIP9ENTH INTERNAL - ZIP Files
TABLEORVIEW String     Required for ENTH_JDBC.  TABLEORVIEW contains the tables or view to be scanned.  NOTE:  For more complex database schema, please contact Enth for additional information.
SOURCEUID String   A valid User ID for the Source specified by URL and DATASOURCETYPE, if required.
SOURCEPWD String The corresponding Password for the User ID for the Source, if required.
UPDATE BOOLEAN Defaults to False or '0'. If UPDATE is '1' and the data source specified by URL is already available with the Enth Network, then SCAN will look for changes and Update the Model as required, otherwise SCAN will ignore the source.
HEADER BOOLEAN     Defaults to False or '0.  If HEADER is '1', then Enth treats the first row as column header.
DELIMITER String     Defaults to ','. 
LONGITUDE Double Administrator A valid Longitude, typically generated from the requesting device.
LATITUDE Double Administrator A valid Latitude, typically generated from the requesting device.
SOURCE String Administrator The name or type of requesting source or device.

Also See:    Login    Search

Code Example

   https://YourEnthAppliance/EnthAPI/search/scan

CSV/TXT

   KEY=YourKey&DATASOURCETYPE=8&HEADER=1 &DELIMITER=, &URL=https://www.xxxx.gov/StockMarket_csv_2/data/DJTA.csv">https://www.xxxx.gov/StockMarket_csv_2/data/DJTA.csv

JDBC

   KEY=YourKey&DATASOURCETYPE=0&JDBCCLASS=com.microsoft.sqlserver.jdbc.SQLServerDriver&URL=jdbc:sqlserver://data.xxxx.com:1433&SOURCEUID=uid&SOURCEPWD=password

Elastic Search

   KEY=YourKey&DATASOURCETYPE=5&URL=http://ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:9200/twitter/status/:1433&SOURCEUID=uid&SOURCEPWD=password