Skip to content
Mark A. Greenslade edited this page Feb 2, 2016 · 71 revisions

Overview

The ES-DOC web-service API exposes a set of simple end-points to be invoked from both a browser and scripts. It supports 3 types of operation:

      Search - resolves various identifiers to documentation;
      Publish - supports documentation creation, retrieval, update and deletion.
      Compare - exposes metadata relevant to delivering comparison use cases.

Search

The ES-DOC Search web-service API exposes a single HTTP GET endpoint:

      http://api.es-doc.org/2/document/search

Search facets

Facets are passed as URL query parameters.

The following URL query parameters must be supplied for each search:

project
      description: project identifier;
      required: true;
      whitelist: see list of available projects here.
encoding
      description: encoding identifier;
      required: true;
      whitelist: html | json | xml.
timestamp
      description: integer timestamp when client invoked search endpoint;
      required: true;
searchType
      description: type of search being performed;
      required: true;
      whitelist: drs | externalid | id | name
ontology
      description: documentation ontology identifier;
      required: true;
      whitelist: cim.1 | cim.2
language
      description: documentation language code;
      required: true;
      default: en
onJSONPLoad
      description: name of JSONP callback function;
      required: false;

The other URL parameters differ according to search type:

searchType = drs

drsPath
      description: / delimited string of directory syntax structure (DRS) elements;
      required: true;

searchType = externalid

externalID
      description: an external identifier used to resolve one or more documents;
      required: true;
externalType
      description: type of external identifier used to resolve one or more documents;
      required: true;

searchType = id

id
      description: document identifier;
      required: true;
version
      description: document version;
      required: true;

searchType = name

name
      description: document name;
      required: true;
type
      description: document type;
      required: true;
institute
      description: institute associated with document;
      required: false;

Publish

The ES-DOC Publish API is RESTful and supports the following endpoints:

http://api.es-doc.org/2/document/retrieve?document_id={}&document_version={}&encoding={}
      description: retrieves a previously published document
      supported http verbs: GET

http://api.es-doc.org/2/document/create
      description: uploads a new document
      supported http verbs: POST
      HTTP header Content-Type=application/json

http://api.es-doc.org/2/document/delete?document_id={}&document_version={}
      description: deletes a previously published document
      supported http verbs: DELETE
      note: existing document version is retrieved, deleted via this endpoint.

NOTE - Until relevant security policies are agreed upon by ES-DOC partners the publishing endpoint in available in test mode only .

Compare

The ES-DOC Compare API does not expose an endpoint It makes available data in json/jsonp formats so that 3rd parties can build alternative comparators. The setup data is available here. The setup data files are named according to the following convention:

      compare.setup.{project-code}.{comparator-type}.json.

Client Tools

The API can be accessed using the pyesdoc library:

If you have further questions please contact ES-DOC.