Skip to content
This repository was archived by the owner on Aug 12, 2019. It is now read-only.

micro-focus-idol-archive/iod-example-python-scripts

Repository files navigation

iod-example-python-scripts

A set of sample Python Scripts for using various IDOL OnDemand APIs.

In particular these demonstrate the creation, administration, querying and deletion of a standard flavor unstructured text index populated with a connector that indexes content from a website.

See connector documentation and unstructured index documentation

Dependencies

You will need to install the unirest python module

sudo pip install unirest

If you don't have pip then it's simple to install:

Ubuntu / Debian based systems:

sudo apt-get install python-pip

Read Hat / CentOS based systems:

sudo yum install python-pip

Usage

You will need to signup for an account and obtain your IDOL OnDemand API key. The scripts below can either read the IDOL OnDemand API Key from the IODAPIKEY environment variable or you can supply it on the command line using the --apikey option.

export IODAPIKEY=<YOUR-IOD-API-KEY-HERE>

Create an IOD unstructured index and a web connector

./create-iod-web-index.py --name <indexname> --url <enter URL here>

Check the status of the connector and unstructued index

./check-iod-web-index.py --name <indexname>

List connectors created on this account

./list-iod-connectors.py

Search an unstructured index

./search-iod-web-index.py --name <indexname> <search text>

Search an unstructured index and the connector we used to populate it

./delete-iod-web-index.py --name <indexname>

IODAPIKEY can either be set as an environment variable or supplied using the --apikey option.

License

Copyright 2015 Hewlett-Packard Development Company, L.P.

Licensed under the MIT License (the "License"); you may not use this project except in compliance with the License.

About

Example Python Scripts for IOD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages