User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
public:nnels:nnels_api_docs_v1 [2018/04/24 14:35]
jonathan.schatz [Specific Repo Item Request example]
public:nnels:nnels_api_docs_v1 [2019/05/14 10:56]
jonathan.schatz [Keyword Search]
Line 1: Line 1:
-====== NNELS API v1.Documentation ======+====== NNELS API v1.Documentation ======
 Version 0.5 used Services and Services Views.\\ Version 0.5 used Services and Services Views.\\
 Version 1.x uses RESTful framework.\\ Version 1.x uses RESTful framework.\\
 \\ \\
-**Resources exposed**: 
-  * Auth - /login-token/, /refresh-token/ 
-  * Users - /users/ 
-  * Repo_Items - /repo_items/ 
-  * FileResources - /file_resources/ 
-  * Basic Search - /basic_search/ 
  
 ===== Current Testing Server ===== ===== Current Testing Server =====
 |Host|dev.nnels.ca| |Host|dev.nnels.ca|
 |Base Endpoint|api| |Base Endpoint|api|
-|Example|https://dev.nnels.ca/api/[:[v1.x/]resource]/ |+|Example|https://dev.nnels.ca/api/v[:version.minor]/[:resource]/ |
  
 ===== Notes ===== ===== Notes =====
Line 20: Line 14:
   * Refresh against <api_endpoint>/refresh-token/ with the **refresh_token** supplied by initial authentication   * Refresh against <api_endpoint>/refresh-token/ with the **refresh_token** supplied by initial authentication
   * If receiving uid 0 back from a specific user request, this means your access token expired.   * If receiving uid 0 back from a specific user request, this means your access token expired.
 +
 +**Discover Resources and their versions**
 +
 +To discover a list of available resources and the latest version for each, issue:
 +<code>
 +GET /api/
 +Host: [:current host]
 +</code>
 ===== AuthN ===== ===== AuthN =====
  
Line 135: Line 137:
     "self": {     "self": {
         "title": "Self",         "title": "Self",
-        "href": "https://staging.nnels.ca/api/v1.0/users/117"+        "href": "https://dev.nnels.ca/api/v1.0/users/117"
     }     }
 } }
 </code> </code>
  
-===== SEARCH API (Full-text) ===== +===== BASIC SEARCH ===== 
- Coming soon+ 
-===== REPO_ITEMS ===== +==== Keyword Search v1.1 ===== 
-Note: Uses UUID primarily, not NID\\ +URL-encode keyword string. 
 + 
 +<code> 
 +GET /api/basic_search/[:keyword1]+[:keyword2]+[:keyword3] HTTP/1.1 
 +Host: dev.nnels.ca 
 +Authorization: Basic dGVzdC1hY2NvdW50Om5vdFJlYWw= 
 +</code> 
 + 
 +===== REPO_ITEMS v1.1 =====
  
 ==== Specific Repo Item Request example ==== ==== Specific Repo Item Request example ====
Line 153: Line 163:
 </code> </code>
  
-**With UUID (uuid)**+**Alternate load by UUID (uuid)**
 <code> <code>
-GET /api/v1.0/repo_items?uuid=[:uuid] HTTP/1.1+GET /api/v1.0/repo_items/uuid=[:uuid]?loadByFieldName=uuid HTTP/1.1
 Host: dev.nnels.ca Host: dev.nnels.ca
 access-token: [:access-token] access-token: [:access-token]
public/nnels/nnels_api_docs_v1.txt · Last modified: 2019/05/14 10:56 by jonathan.schatz