-
Notifications
You must be signed in to change notification settings - Fork 0
API Documentation
The ES-DOC API is designed to support ES-DOC tools and also tools developed by 3rd parties. The API, currently at version 2, is a set of relatively simple web-service end-points that can be invoked from both a browser and scripts.
The ES-DOC API supports 3 types of operation:
- Search - supports the resolution of various identifiers to project specific documentation;
- Publish - supports remote documentation creation, retrieval, update and deletion.
- Compare - supports download of documentation metadata appropriate for delivering comparison use cases.
The ES-DOC Search API exposes a single faceted endpoint: http://api.es-doc.org/2/search. This endpoint supports the HTTP GET verb and the JSONP protocol. Search facets are passed as URL query parameters.
The following URL query parameters are standard and must be supplied for each search:
-
project
description: project identifier;
required: true;
whitelist: cmip5 | dcmip-2012 | qed-2013 | cordex. -
timestamp
description: timestamp when client invoked search endpoint;
required: true; -
searchType : type of search being performed, must be one of:
description: type of search being performed;
required: true;
whitelist: documentByDRS | documentByExternalID | documentByID | documentByName | documentSummaryByName | se1
The other URL parameters differ according to search type:
-
language
description: document language identifier;
required: true;
whitelist: see ISO 639-1 codes -
encoding
description: document encoding type;
required: true;
whitelist: json | xml | xml-metafor-cim-v1; -
ontology
description: document ontology;
required: true;
whitelist: cim.1; -
drsPath
description: / delimited string of directory syntax structure (DRS) elements;
required: true;
-
language
description: document language identifier;
required: true;
whitelist: see ISO 639-1 codes -
encoding
description: document encoding type;
required: true;
whitelist: json | xml | xml-metafor-cim-v1; -
ontology
description: document ontology;
required: true;
whitelist: cim.1; -
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; -
typeWhiteList
description: list of document types to include in search result;
required: false; -
typeBlackList
description: list of document types to exclude in search result;
required: false;
-
language
description: document language identifier;
required: true;
whitelist: see ISO 639-1 codes -
encoding
description: document encoding type;
required: true;
whitelist: json | xml | xml-metafor-cim-v1; -
ontology
description: document ontology;
required: true;
whitelist: cim.1; -
id
description: document idenftifier;
required: true; -
version
description: document version;
required: true;
-
language
description: document language identifier;
required: true;
whitelist: see ISO 639-1 codes -
encoding
description: document encoding type;
required: true;
whitelist: json | xml | xml-metafor-cim-v1; -
ontology
description: document ontology;
required: true;
whitelist: cim.1; -
name
description: document name;
required: true; -
type
description: document type;
required: true; -
institute
description: institute associated with document;
required: false;
-
documentLanguage
description: document language identifier;
required: true;
whitelist: see ISO 639-1 codes -
documentType
description: document type identifier;
required: true; -
documentVersion
description: document type identifier;
required: true;
whitelist: all | latest | a positive integer; -
institute
description: institute associated with document;
required: false;
The ES-DOC Publish API is RESTful and supports 3 endpoints:
-
http://api.es-doc.org/1/publish
desciption: document collection endpoint.
supported http verbs: POST
note: new documents are POSTed to this endpoint. -
http://api.es-doc.org/1/publish/{id}
desciption: document instance endpoint.
supported http verbs: GET, DELETE, HEAD
note: existing document is retrieved, deleted via this endpoint. -
http://api.es-doc.org/1/publish/{id}/{version}
desciption: document version endpoint.
supported http verbs: GET, DELETE, HEAD
note: existing document version is retrieved, deleted via this endpoint.
NOTE - the publishing endpoint is currently available in test mode only until relevant security policies are agreed upon by ES-DOC partners.
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.
The API can be accessed via the following client tools:
- pyesdoc: A python client that exposes publishing functions. Source code can be found here.
If you have further questions please contact ES-DOC.