server/README.md
author durandn
Mon, 23 Nov 2015 15:48:46 +0100
changeset 190 a83c3e419279
parent 95 8ecee14c6d81
permissions -rw-r--r--
Added tag 00.00.26 for changeset 463374ec1041
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
82
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     1
# Accès aux vues scénario
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     2
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     3
Pour générer une vue de scénario, il suffit d'appeler les url suivantes en source d'une iframe. Les url contiennent : 
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     4
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     5
* un identifiant de projet d’annotation (voir ci-dessus pour récupérer manuellement l’identifiant d’un projet)
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     6
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     7
### Scénario élève/annotation de segment en mode individuel
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     8
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
     9
    https://appiri.enteduc.fr/remie/remie/workunit/segments_single?project_id=<:id>&casticket=<:ticket> 
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    10
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    11
* <:id> est l'id du projet considéré
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    12
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    13
### Scénario élève/annotation de segment en mode groupe    
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    14
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    15
    https://appiri.enteduc.fr/remie/remie/workunit/segments_group?project_id=<:id>&group_mode=true&casticket=<:ticket>
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    16
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    17
* <:id> est l'id du projet considéré
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    18
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    19
### Scénario professeur
95
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    20
    
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    21
    https://appiri.enteduc.fr/remie/remie/workunit/segments_teacher?project_id=<:id>
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    22
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    23
* <:id> est l'id du projet considéré
82
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    24
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    25
### Scénario “marqueurs”
95
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    26
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    27
    https://appiri.enteduc.fr/remie/remie/workunit/markers?project_id=<:id>
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    28
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    29
* <:id> est l'id du projet considéré
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    30
82
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    31
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    32
# Dupliquer un projet existant lors de l’instanciation d’un grain:
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    33
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    34
Un endpoint de l’API permet de dupliquer un projet existant. Pour cela il faut faire une requête POST à l’adresse suivante: 
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    35
95
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    36
    https://appiri.enteduc.fr/remie/api/ldt/1.0/projects?format=json&source=<:project_id>&publish=true&username=<:username>&api_key=<:api_key>
82
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    37
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    38
* <:project_id>: L’id du projet que l’on souhaite dupliquer
95
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    39
* <:username>: L’id de l’utilisateur qui sera affecté comme “créateur” du projet (à priori admin, expliqué plus bas)
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    40
* <:api_key>: La clé d’API qui permettra d’authentifier l’utilisateur (expliqué plus bas)
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    41
82
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    42
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    43
La requête POST doit être accompagnée de données sous la forme d’une chaîne de caractère de type json, selon le format suivant: 
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    44
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    45
	{
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    46
	“meta”: { 
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    47
	“dc:creator”: “<:user>”,
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    48
	“dc:contributor”: “<:user>”,
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    49
	“dc:title”: “<:title>”, 
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    50
	“dc:description”: “<:description>”, 
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    51
	"dc:created": "",
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    52
	            "dc:modified": "",
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    53
	            "dc:description": "",
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    54
	            "iricle:status": 2'
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    55
	},  
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    56
	"views": [],
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    57
	"lists": [],
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    58
	"annotation-types": [],
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    59
	"medias": [],
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    60
	"tags": [],
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    61
	"annotations": []
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    62
	}
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    63
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    64
* <:user>: L’utilisateur considéré comme “créateur” du nouveau projet. Cet utilisateur doit avoir accès en lecture au projet d’origine
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    65
* <:title>: Le titre que prendra la copie du projet dupliqué (optionnel, prendra le même titre que le projet initial si non-renseigné)
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    66
* <:description> : La description que prendea la copie du projet dupliqué (optionnelle, prendra le même titre que le projet initial si non-renseigné)
bf1c38268e25 Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
diff changeset
    67
95
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    68
Username et API key:
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    69
Pour authentifier l’utilisateur afin de dupliquer le projet, il faut joindre à la requête les paramètres “username” et “api_key” comme indiqué plus haut. username est l’utilisateur qui possèdera le projet (à priori l’admin, le même utilisateur que celui qui aura créé les projets initiaux).
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    70
L’API key peut être obtenue sur la plateforme en étant authentifié en tant qu’utilisateur admin.
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    71
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    72
Il faut aller sur l’interface admin dont le lien se trouve en haut à droite de l’écran, menu Tastypie -> Api Keys pour obtenir la liste des utilisateurs et leurs clés d'API associées.
8ecee14c6d81 Updated Readme and homestead test app
durandn
parents: 82
diff changeset
    73