How to use SmallWorld API

From DISI
Revision as of 14:34, 20 June 2019 by Jyoung (talk | contribs)
Jump to navigation Jump to search

Introduction

The Web Services API for SmallWorld Documentation is found in Section 8.3 of the SmallWorld version 4.0 manual starting from page 30 to 36. I copied the section here, and provided a list of publicly available databases for searching on sw.docking.org and some simple examples at the bottom.

8.3 Web Services API

Unless stated otherwise all API entry points operate on HTTP GET/POST requests. A search on the server is first submitted (/search/submit), this returns a stream of events that report the hit list id (hlid). You can then use this hlid to fetch results either as JSON (/search/view) or TSV (/ search/export). An example Java client, SwHttpClient.java, shows how this works.

/search/submit

Start a new SmallWorld search with topological distance bounded by the provided upper bounds.

Parameter Type Description
smi text Query SMILES
row 2 cell 1 row 2 cell 2 row 2 cell 3