This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Quick Reference v0.2
Jonathan Payne edited this page Feb 25, 2015
·
2 revisions
Quick Reference v0.2 reflects the latest version of the API specifications before the decision to switch to the GitHub style modeling in which users and organizations own the sources and collections.
API Endpoint: http://www.openconceptlab.org/rest/v1/
URI | Description |
---|---|
sources | |
GET /sources |
Retrieve all sources |
GET /sources?q=icd |
Search sources |
GET /sources/[Source-Short-Code] |
Retrieve source by source short-code (e.g. "ampath", "snomed", "ciel", etc.) |
POST /sources |
Create new source |
POST /sources/[Source-Short-Code] |
Partial update of specified source |
PUT /sources/[Source-Short-Code] |
Full update of specified source |
DELETE /sources/[Source-Short-Code] |
Delete specified source |
GET /sources/[Source-UUID] |
|
concepts | |
GET /concepts |
Retrieve all concepts across all sources |
GET /concepts?q=cough |
Search concepts across all sources |
GET /concepts?[Filter-Name]=[Filter-Value] |
Search concepts with filter across all sources. Filters include: "class", "diagnosis" |
GET /concepts?collections=[Collection-UUID] |
Retrieve all concepts in a collection |
GET /concepts/[Concept-UUID] |
Retrieve one concept by global OCL UUID |
GET /sources/[Source-Short-Code]/concepts/[Concept-Code] |
Retrieve one concept by source's internal ID (e.g. GET /sources/snomed/concepts/271737000) |
POST /sources/[Source-Short-Code]/concepts |
Create a new concept (NOTE: If ID not automatically assigned, then the ID is required here) |
POST /sources/[Source-Short-Code]/concepts/[Concept-Code] |
Partial update of specified concept |
PUT /sources/[Source-Short-Code]/concepts/[Concept-Code] |
Full update of specified concept |
DELETE /sources/[Source-Short-Code]/concepts/[Concept-Code] |
Delete the specified concept |
collections | (NOTE: Collections may also support short-codes) |
GET /collections |
Retrieve all collections |
GET /collections?q=antenatal |
Search collections |
GET /collections?[Filter-Name]=[Filter-Value] |
Get collections with filter. Filters include: "owner" |
GET /collections?concept=[Source-Short-Code]:[Concept-Code] |
Search collections by concept (e.g. GET /collection?concept=ciel:105949) |
POST /collections |
Create new collection |
POST /collections/[Collection-UUID] |
Partial update of specified collection |
PUT /collections/[Collection-UUID] |
Full update of specified collection |
DELETE /collections/[Collection-UUID] |
Delete specified collection |
mappings | |
GET /mappings |
Retrieve all concept mappings |
GET /mappings?concept=[Source-Short-Code]:[Concept-Code] |
Retrieve mappings FROM or TO a concept (e.g. GET /mappings?concept=snomed:12845003) |
GET /mappings?conceptA=[Source-Short-Code]:[Concept-Code] |
Retrieve mappings originating FROM a concept (e.g. GET /mappings?conceptA=ciel:105949) |
GET /mappings?conceptB=[Source-Short-Code]:[Concept-Code] |
Retrieve mappings pointing TO a concept (e.g. GET /mappings?conceptB=snomed:12845003) |
GET /mappings?concept=[Source-Short-Code]:[Concept-Code],[Source-Short-Code]:[Concept-Code] |
Retrieve mappings in any direction between 2 concepts (e.g. GET /mappings?concept=ciel:105949,snomed:12845003) |
GET /mappings?conceptA=[Source-Short-Code]:[Concept-Code]&conceptB=[Source-Short-Code]:[Concept-Code] |
Retrieve mappings from a specified concept to a specified concept (e.g. GET /mappings?conceptA=ciel:105949&conceptB=snomed:12845003) |
POST /mappings |
Create new mapping |
POST /mappings/[Mapping-UUID] |
Partial update of the specified mapping |
PUT /mappings/[Mapping-UUID] |
Full update of the specified mapping |
DELETE /mappings/[Mapping-UUID] |
Delete the specified mapping by UUID |
maptypes | (NOTE: Maptypes may support short-codes) |
GET /maptypes |
Retrieve all maptypes (e.g. "SAME AS") |
GET /maptypes?q=narrow |
Search maptypes |
GET /maptypes?[Filter-Name]=[Filter-Value] |
Retrieve maptypes with filter. Searches and one or more filters may be combined. Filters include: "source" |
GET /maptypes/[Maptype-Short-Code] |
Get maptype by short-code [e.g. GET /maptypes/Same-As] |
GET /maptypes/[Maptype-UUID] |
Get maptype by UUID |
POST /maptypes |
Create new maptype |
POST /maptypes/[Maptype-UUID] |
Partial update of specified maptype |
PUT /maptypes/[Maptype-UUID] |
Full update of specified maptype |
DELETE /maptypes/[Maptype-UUID] |
Delete specified maptype |
classes | (NOTE: Classes may support short-codes) |
GET /classes |
Retrieve all classes |
GET /classes?q=diagnosis |
Search classes |
GET /classes?[Filter-Name]=[Filter-Value] |
Retrieve classes with filter. Searches and one or more filters may be combined. Filters include: "source" |
GET /classes/[Class-Short-Code] |
Get class by short-code (e.g. GET /classes/Diagnosis) |
GET /classes/[Class-UUID] |
Get class by UUID |
POST /classes |
Create new class |
POST /classes/[Class-UUID] |
Partial update of specified class |
PUT /classes/[Class-UUID] |
Full update of specified class |
DELETE /classes/[Class-UUID] |
Delete specified class |
datatypes | (NOTE: Datatypes may support short-codes) |
GET /datatypes |
Retrieve all datatypes |
GET /datatypes?q=number |
Search datatypes |
GET /datatypes?[Filter-Name]=[Filter-Value] |
Retrieve datatypes with filter. Searches and one or more filters may be combined. Filters include: "source" |
GET /datatypes/[Datatype-Short-Code] |
Get datatype by short-code (e.g. GET /datatypes/Numeric) |
GET /datatypes/[Datatype-UUID] |
Get datatype by UUID |
POST /datatypes |
Create new datatype |
POST /datatypes/[Datatype-UUID] |
Partial update of specified datatype |
PUT /datatypes/[Datatype-UUID] |
Full update of specified datatype |
DELETE /datatypes/[Datatype-UUID] |
Delete specified datatype |
stars | |
GET /stars |
Get all stars |
GET /stars?user=[Username] |
Get all stars for a user. |
GET /stars?resourceType=[Resource-Type] |
Filter based on resource type. Supported types are "concept", "source", and "collection" |
GET /stars?resourceUuid=[Resource-UUID] |
Get all stars for a resource (NOTE: This will not work for all resources!) |
GET /stars?resourceUri=[Resource-URI] |
This would work for all resources... Maybe use a mixture? |
GET /stars?user=[Username]&resourceUri=[Resource-URI] |
Get a star for a user on a single resource. |
POST /stars |
Create new star |
DELETE /stars/[Star-UUID] |
Delete a star... This is inconsistent with the rest of stars... maybe instead specify the username and uri? |
users | |
GET /users |
Retrieve all users |
GET /users?q=[Search-Criteria] |
Search users |
GET /users/[Username] |
Get specified user by username |
GET /users/[Username]/organizations |
Get organizations for the specified user |
POST /users |
Create new user |
POST /users/[Username] |
Partial update of user |
PUT /users/[Username] |
Full update of user |
DELETE /users/[Username] |
Delete user |
GET /users/[User-UUID] |
|
organizations | |
GET /organizations |
Retrieve all organizations |
GET /organizations?q=[Search-Criteria] |
Search organizations |
GET /organizations/[Organization-Name] |
Get specified organizations by name |
GET /organizations/[Organization-Name]/users |
Get users that belong to this organization |
POST /organizations |
Create new organization |
POST /organizations/[Organization-Name] |
Partial update of organization |
PUT /organizations/[Organization-Name] |
Full update of organization |
DELETE /organizations/[Organization-Name] |
Delete organization |
GET /organizations/[Organization-UUID] |
##Other Functionality##
Function | URI | Description |
---|---|---|
View Catalog |
GET /catalog |
Retrieve a list of all supported resources |
List Resource Features |
GET /catalog/[Resource-Name] |
List supported verbs and attributes of a resource. E.g. GET /catalog/collections |
Pagination |
GET /concepts?q=blood&count=15&startIndex=30 |
Control which and how many results are shown (Default: count=50, startIndex=0) |
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 |
Overview
Resources
Import / Export
- CSV Import
- Bulk Import
- Org/Source Import
- Export API
- Subscriptions
- Subscription Client Testing Process
- OpenMRS to OCL Mapping
Troubleshooting & Operations
- Data integrity checks
- Maintaining OCLAPI's Docker containers
- Maintaining MongoDB and Solr
- How to check logs
- NewRelic monitoring setup
- Configuration changes to make tests and import job run faster
- Accessing Solr UI Remotely
- Data Backup and Restore
- SSL Configuration
- Flower
- Switching to Maintenance Mode on Production Server
- Docker networking and Security
Other