User Tools

Site Tools


api2:getting_started

====== 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
api2:getting_started [2017/11/22 14:27]
maries
api2:getting_started [2018/07/26 15:23] (current)
maries
Line 5: Line 5:
   * Change data requires an HTTP PUT request   * Change data requires an HTTP PUT request
 Requests must be sent using content-type «application/​json». The request and response body encoding is always UTF-8.\\ Requests must be sent using content-type «application/​json». The request and response body encoding is always UTF-8.\\
-We use a pagination system, in case the response to your GET request is too heavy. You can ask the pagination to order the items thanks to : their IDthe creation date or the last change date, in ascending or descending order. To do this, you can send the following parameters to your request :\\+We use a pagination system, in case the response to your GET request is too heavy. You can ask the pagination to order the items thanks to the attributes of this object you are requesting fordefined later in this documentation, in ascending or descending order. To do this, you can send the following parameters to your request:\\
  
 ^ Parameter name ^ Possible values ^   ​Description ​ ^ ^ Parameter name ^ Possible values ^   ​Description ​ ^
-order_by ​id\\ created_at\\ updated_at ​| the ordering criteria ​is either ​the unique identifier on Domoscio'​s API database, the date of creation, ​of the date of the last update ​|  +sort_by* ​attribute name of the object with ascending or descending option: attribute.option;​ multiple values are possible ​| the ordering criteria ​can be the unique identifier on Domoscio'​s API database ​(named '​id'​), the date of creation ​(name '​created_at'​), the date of the last update ​(name '​updated_at'​)... ​\\ Two  options : asc, id est ascending : the smallest values come first \\ desc id est descending : the biggest values come first; example: ../​object?​sort_by=id.asc,​student_id.desc ​|  
-| order | ascending\\ descending | ascending : the smallest values come first \\ descending : the biggest values come first |  +| page | integer | Number of the page you want to view; 1 by default| ​ 
-| page | integer | Number of the page you want to view; 1 by default | +  
 +* Mandatory parameters
  
 ===Create Sandbox Account=== ===Create Sandbox Account===
Line 18: Line 19:
 ===Authenticate your app=== ===Authenticate your app===
 We provide two ways to authenticate and communicate with the service: We provide two ways to authenticate and communicate with the service:
-  * Basic Access Authentication ​is a fast way to implement our API.+  * Basic Access Authentication
   * LTI / OAuth.   * LTI / OAuth.
  
Line 26: Line 27:
 {{api2:​authenticate_header.jpg}} {{api2:​authenticate_header.jpg}}
  
-==With ​URL parameters== +==With ​Access and Refresh ​parameters== 
-You can also pass your authentication key as token in the URL to authenticate ​your application+After your first request, in the response headers you will find an AccessToken and RefreshToken. You can resend them in the headers ​to authenticate. They will be updated occasionally;​ therefore you have to use the last ones that have been sent to you. 
-{{api2:authenticate_URL.jpg}} +They are constructed as follows
 +{{ :api2:access_and_refresh_tokens.png?400 |}}
  
 ===Create Production Account=== ===Create Production Account===
api2/getting_started.1511357243.txt.gz · Last modified: 2017/11/22 14:27 by maries