Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Quick Reference v0.1

Jonathan Payne edited this page Feb 5, 2015 · 1 revision

Quick Reference v0.1 reflects the current state of the prototype API on staging


API Endpoint: http://www.openconceptlab.org:5000/rest/v1

NOTE: Crossed-out items will not be included in the initial prototype of the OCL API, but are planned for future versions.

URI Description
sources
GET /source Retrieve all sources
GET /source?q=icd Search sources
GET /source/snomed Retrieve source by short-code
GET /source/1234-5678-9012-3456 Retrieve source by UUID
POST /source Create new source
POST /source/1234-5678-9012-3456 Partial update of specified source
PUT /source/1234-5678-9012-3456 Full update of specified source
DELETE /source/1234-5678-9012-3456 Delete specified source
concepts
GET /concept Retrieve all concepts across all sources
GET /concept?q=cough Search concepts across all sources
GET /concept?count=2 Specify the number of results to return
GET /concept?q=anemia&count=2 Specify the number of results to return for searching for cough
GET /concept?q=cough&class=Diagnosis Search concepts with filter across all sources
GET /concept?collections=1234-5678-9012-3456 Retrieve all concepts in a collection
GET /source/snomed/concept/12845003 Retrieve one concept by SNOMED ID
GET /source/snomed/concept/1234-5678-9012-3456 Retrieve one concept by UUID
POST /source/my-source/concept Create a new concept
POST /source/my-source/concept/1234-5678-9012-3456 Partial update of specified concept
PUT /sources/my-source/concept/1234-5678-9012-3456 Full update of specified concept
DELETE /sources/my-source/concept/1234-5678-9012-3456 Delete the specified concept
collections
GET /collection Retrieve all collections
GET /collection?q=antenatal Search collections
GET /collection?owner=johndoe Get collections with filter
GET /collection?concept=1234-5678-9012-3456 Search collections by concept
POST /collection Create new collection
POST /collection/1234-5678-9012-3456 Partial update of specified collection
PUT /collection/1234-5678-9012-3456 Full update of specified collection
DELETE /collection/1234-5678-9012-3456 Delete specified collection
mappings
GET /mapping Retrieve all concept mappings
GET /mapping?concept=1234-5678-9012-3456 Retrieve mappings FROM or TO a concept
GET /mapping?conceptA=1234-5678-9012-3456 Retrieve mappings FROM a concept
GET /mapping?conceptB=1234-5678-9012-3456 Retrieve mappings TO a concept
GET /mapping?concept=1234-5678-9012-3456,ABCD-EFGH-IJKL-MNOP Retrieve mappings (any direction) between 2 concepts
GET /mapping?conceptA=1234-5678-9012-3456&conceptB=ABCD-EFGH-IJKL-MNOP Retrieve mappings from a specified concept to a specified concept
POST /mapping Create new mapping
POST /mapping/1234-5678-9012-3456 Partial update of the specified mapping
PUT /mapping/1234-5678-9012-3456 Full update of the specified mapping
DELETE /mapping/1234-5678-9012-3456 Delete the specified mapping by UUID
maptypes
GET /maptype Retrieve all mapping types (e.g. "SAME AS")
GET /maptype?q=narrow Search mapping types
GET /maptype?source=snomed Filter mapping types by source
GET /maptype/SameAs Get mapping type by short-code
GET /maptype/1234-5678-9012-3456 Get mapping type by UUID
POST /maptype Create new mapping type
POST /maptype/SameAs Partial update of specified mapping type by short-code
PUT /maptype/1234-5678-9012-3456 Full update of specified mapping type by UUID
PUT /maptype/SameAs Full update of specified mapping type by short-code
DELETE /maptype/1234-5678-9012-3456 Delete specified mapping type by UUID
DELETE /maptype/SameAs Delete specified mapping type by short-code
classes
GET /class Retrieve all classes
GET /class?q=diagnosis Search classes
GET /class?source=snomed Filter classes by source
GET /class/Diagnosis Get class by short-code
GET /class/1234-5678-9012-3456 Get class by UUID
POST /class Create new class
POST /class/Diagnosis Partial update of specified class by short-code
PUT /class/Diagnosis Full update of specified class by short-code
PUT /class/1234-5678-9012-3456 Full update of specified class by UUID
DELETE /class/Diagnosis Delete specified class by short-code
DELETE /class/1234-5678-9012-3456 Delete specified class by UUID
datatypes
GET /datatype Retrieve all datatypes
GET /datatype?q=number Search datatypes
GET /datatype?source=snomed Filter datatypes by source
GET /datatype/Numeric Get datatype by short-code
GET /datatype/1234-5678-9012-3456 Get datatype by UUID
POST /datatype Create new datatype
POST /datatype/Numeric Partial update of specified datatype by short-code
PUT /datatype/Numeric Full update of specified datatype by short-code
PUT /datatype/1234-5678-9012-3456 Full update of specified datatype by UUID
DELETE /datatype/Numeric Delete specified datatype by short-code
DELETE /datatype/1234-5678-9012-3456 Delete specified datatype by UUID
stars
GET /star Get all stars
GET /star?user=johndoe Get all stars for a user
GET /star?resourceUuid=1234-5678-9012-3456 Get all stars for a resource
POST /star Create new star
DELETE /star/ABCD-EFGH-IJKL-MNOP Delete a star
users
GET /user Retrieve all users
GET /user?q=john Search users
GET /user/johndoe Get specified user by username (preferred)
GET /user/1234-5678-9012-3456 Get specified user by UUID (non-preferred)
POST /user Create new user
POST /user/johndoe Partial update of user
PUT /user/johndoe Full update of user
DELETE /user/johndoe Delete user

##Other Functionality##

Function URI Description
View Catalog GET /catalog Retrieve a list of all supported resources
List Resource Features GET /catalog/collections List supported verbs and attributes of a resource
Pagination GET /concepts?q=blood&count=15&startIndex=30 Control which and how many results are shown
Format GET /concepts?q=blood&format=csv Supported formats are 'json' (default), 'csv'. More may be added in the future
Sort Ascending GET /concepts?q=blood&sortAsc=class Sort by the specified field in ascending order (see the resource documentation for supported fields)
Sort Descending GET /concepts?q=blood&sortDesc=display Sort by the specified field in descending order (see the resource documentation for supported fields)
Updated Since GET /concepts?source=ciel&updatedSince=2011-11-16T14:26:15Z
Clone this wiki locally