User Tools

Site Tools


api1: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
api1:getting_started [2017/10/07 13:59]
domoadmin
api1:getting_started [2017/10/17 09:53] (current)
maries
Line 1: Line 1:
-====== ​Getting Started ​======+===Use our REST API=== 
 +We designed the Domoscio API in a Restful way, so that your user experience is simple and straightforward. You are able to: 
 +  * Submit data requires an HTTP POST request 
 +  * Retrieve data requires an HTTP GET 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.\\ 
 +You can create a sandbox account to start working with the API. Go and visit us at [[http://​domoscio-backend.domoscio.com|http://​domoscio-backend.domoscio.com]] 
 + 
 +===Create Sandbox Account=== 
 +Go online and browse for [[http://​domoscio-backend.domoscio.com|http://​domoscio-backend.domoscio.com]]. 
 + 
 +{{ :​api1:​sandbox_login.png?​600 |Sandbox login}} 
 + 
 +Once you have created your new account, you have to create a new instance. 
 + 
 +{{ :​api1:​sandbox_accueil.png?​600 |Sandbox Welcome page}} 
 + 
 +When creating a new instance you will be asked for some information. For the purpose of just using the API, you should choose the “Moodle” type and the “Demo” mode. 
 + 
 +{{ :​api1:​sandbox_new_instance.png?​600 |Sandbox New Instance}} 
 + 
 +Once you have created a new instance of the API, you are provided with an authentication key and a client ID. You can retrieve these credentials at any moment on the “Settings” tab: 
 + 
 +{{ :​api1:​sandbox_instance_manager.png?​600 |}} 
 + 
 +Now that you have your authentication keys, let us see how to properly authenticate your application to our API. 
 + 
 +===Authenticate your app=== 
 +We provide two ways to authenticate and communicate with the service: 
 +  * Basic Access Authentication is a fast way to implement our API. 
 +  * ############​ LTI / OAuth. 
 + 
 +==With Authorization header== 
 +We use a standard Basic Access Authentication. 
 +The Authorization header is constructed as follows: 
 + 
 +{{ :​api1:​authenticate_headers_v1.png?​600 | Authenticate Headers}} 
 + 
 +==With URL parameters== 
 +You can also pass your authentication key as a token in the URL to authenticate your application:​ 
 + 
 +{{ :​api1:​authenticate_url_v1.png?​600 | Authenticate URL}} 
 + 
 + 
 +===Create Production Account=== 
 +Get in touch with our IT service whenever you feel ready to go live. We will arrange the setup and get back to you with the details. 
 + 
 +===How to construct URLs to access your API environment=== 
 +Once your application is authenticated,​ accessing to your own environment is really simple. All the urls must be constructed as follows: 
 + 
 +''​[HOST_URL]/​[API_VERSION]/​instances/​[YOUR_INSTANCE_ID]/​[ACTION]''​ 
 + 
 +A list of all the actions can be found in this document. 
 +The [API_VERSION] is currently “v1” and [HOST_URL] is “domoscio-backend.domoscio.com” for European end points. 
 + 
  
api1/getting_started.1507377571.txt.gz · Last modified: 2017/10/07 13:59 by domoadmin