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
public:nnels:nnels_api_docs_v1 [2018/04/24 13:56]
jonathan.schatz [Notes]
public:nnels:nnels_api_docs_v1 [2019/05/14 10:56] (current)
jonathan.schatz [REPO_ITEMS v1.1]
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/ 
-  * Search - /basic_search/ - **Under construction** 
  
 ===== 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.0 =====
  
 ==== Specific Repo Item Request example ==== ==== Specific Repo Item Request example ====
 +**With node ID (nid)**
 <code> <code>
 GET /api/v1.0/repo_items/[:nid] HTTP/1.1 GET /api/v1.0/repo_items/[:nid] HTTP/1.1
 +Host: dev.nnels.ca
 +access-token: [:access-token]
 +</code>
 +
 +**Alternate load by UUID (uuid)**
 +<code>
 +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.1524603382.txt.gz · Last modified: 2018/04/24 13:56 by jonathan.schatz