server/README.md
author durandn
Fri, 28 Aug 2015 16:00:19 +0200
changeset 82 bf1c38268e25
child 95 8ecee14c6d81
permissions -rw-r--r--
Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
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
* un ticket d’authentification CAS
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
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
### 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
     9
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
    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
    11
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
* <: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
    13
* <:ticket> est le ticket d'authentification CAS 
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
### 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
    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
    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
    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
* <: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
    20
* <:ticket> est le ticket d'authentification CAS
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
    21
Note: Le nom du paramètre du ticket CAS (par défaut “casticket”) est configurable de notre côté, si jamais il ne respecte pas les conventions de nommage d’Itop.
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
    22
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
    23
### Scénario professeur
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
(à implémenter)
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
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
    26
### Scénario “marqueurs”
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
    27
(à implémenter)
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
    28
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
    29
# 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
    30
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
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
    32
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
    https://appiri.enteduc.fr/remie/api/ldt/1.0/projects?format=json&source=<:project_id>&publish=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
    34
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
* <:ticket> est le ticket d'authentification CAS
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
    36
* <:project_id>: L’id du projet que l’on souhaite dupliquer
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
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
    39
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
    40
	{
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
    41
	“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
    42
	“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
    43
	“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
    44
	“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
    45
	“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
    46
	"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
    47
	            "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
    48
	            "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
    49
	            "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
    50
	},  
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
	"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
    52
	"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
    53
	"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
    54
	"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
    55
	"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
    56
	"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
    57
	}
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
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
* <: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
    60
* <: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
    61
* <: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
    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
Dans la réponse à cette requête POST, le header “Location” contient l’URL à requêter (GET) pour obtenir les informations sur le projet créé. Il est possible d’en extraire l’id du projet afin de générer les scénario.