YesWiki API

Utilisateurs

LIST Utilisateurs

GET http://aesy-sophro.fr/wakka.php?wiki=api/users

GET USER

GET http://aesy-sophro.fr/wakka.php?wiki=api/users/{userId}

CREATE USER

POST http://aesy-sophro.fr/wakka.php?wiki=api/users

name=…&email=…

Supprimer USER

POST http://aesy-sophro.fr/wakka.php?wiki=api/users/{userId}/delete

Groupes

LIST Groupes

GET http://aesy-sophro.fr/wakka.php?wiki=api/groups

GET GROUP

GET http://aesy-sophro.fr/wakka.php?wiki=api/groups/{group_name}

CREATE GROUP

POST http://aesy-sophro.fr/wakka.php?wiki=api/groups

name=…&users[0]=…&users[1]

Supprimer GROUP

POST http://aesy-sophro.fr/wakka.php?wiki=api/groups/{group_name}/delete

UPDATE GROUP

POST http://aesy-sophro.fr/wakka.php?wiki=api/groups/{group_name}/update

users[0]=…&users[1]

Pages

GET http://aesy-sophro.fr/wakka.php?wiki=api/pages
Get all pages

GET http://aesy-sophro.fr/wakka.php?wiki=api/pages/{pageTag}
Get indicated page's informations, with raw and html contents

GET http://aesy-sophro.fr/wakka.php?wiki=api/pages/{pageTag}/comments
Get indicated page's comments

POST http://aesy-sophro.fr/wakka.php?wiki=api/pages/{pageTag}/duplicate
Duplicate an external page into this YesWiki pageTag

Commentaires

GET http://aesy-sophro.fr/wakka.php?wiki=api/comments

Triples

GET http://aesy-sophro.fr/wakka.php?wiki=api/triples/{resource}&property=http%3A%2F%2Foutils-reseaux.org%2F_vocabulary%2Ftype&user=username

Sauvegardes

Seulement pour les administrateurs

GET http://aesy-sophro.fr/wakka.php?wiki=api/archives

GET http://aesy-sophro.fr/wakka.php?wiki=api/archives/{id}

POST http://aesy-sophro.fr/wakka.php?wiki=api/archives

POST http://aesy-sophro.fr/wakka.php?wiki=api/archives/{id}

Attach

GET http://aesy-sophro.fr/wakka.php?wiki=api/images/{filename}/cache/{width}/{height}/{mode}&csrftoken=xxxx
Fournit l'url du fichier de cache pour l'image voulue
Nécessite le passage du jeton anti-csrf !

Bazar

GET http://aesy-sophro.fr/wakka.php?wiki=api/forms
Retourne la liste de tous les formulaires Bazar.

GET http://aesy-sophro.fr/wakka.php?wiki=api/forms/{formId}
Retourne les informations sur le formulaire formId.

GET http://aesy-sophro.fr/wakka.php?wiki={pageTag}
Si le header Accept est application/json, retourne la fiche au format JSON.
Si le header Accept est application/ld+json, retourne la fiche au format JSON-LD.

PUT http://aesy-sophro.fr/wakka.php?wiki={pageTag}
Si le header Content-Type est application/json, modifie la fiche selon le JSON fourni.
Si le header Content-Type est application/ld+json, modifie la fiche selon le JSON-LD fourni.

DELETE http://aesy-sophro.fr/wakka.php?wiki={pageTag}
Supprime la fiche Bazar.

GET http://aesy-sophro.fr/wakka.php?wiki=api/entries
Obtenir la liste des fiches de tous les formulaires Bazar.
Si le header Accept est application/ld+json, le JSON retourné sera au format sémantique (container LDP)

GET http://aesy-sophro.fr/wakka.php?wiki=api/forms/{formId}/entries
Obtenir la liste de toutes les fiches du formulaire formId
Si le header Accept est application/ld+json, le JSON retourné sera au format sémantique (container LDP)

GET http://aesy-sophro.fr/wakka.php?wiki=api/forms/{formId}/entries/json-ld
Obtenir la liste de toutes les fiches du formulaire formId au format sémantique (container LDP)

GET http://aesy-sophro.fr/wakka.php?wiki=api/forms/{formId}/entries/html
Obtenir la liste de toutes les fiches du formulaire formId au format json, avec la représentation html de la fiche dans le champ html_output

GET http://aesy-sophro.fr/wakka.php?wiki=api/forms/{formId}/entries/geojson
Obtenir la liste de toutes les fiches du formulaire formId au format geojson

GET http://aesy-sophro.fr/wakka.php?wiki=api/forms/{formId}/entries/ical
Obtenir la liste de toutes les fiches du formulaire formId au format ical
Il est possible de filtrer sur les dates en ajoutant à l'url &datefilter=>-6M (exemple pour les dates plus récentes que 6 mois)

GET http://aesy-sophro.fr/wakka.php?wiki=api/forms/{formId}/entries&fields=bf_titre
Obtenir la liste de toutes les fiches du formulaire formId en ne gardant que les titres (il est possible de spécifier d\autres champs en séparant leur nom par des ',')

POST http://aesy-sophro.fr/wakka.php?wiki=api/entries/{formId}
Créer une nouvelle fiche en utilisant le formulaire formId
Si le header Content-Type est application/ld+json, un JSON sémantique est attendu.

GET http://aesy-sophro.fr/wakka.php?wiki=api/entries/html
Obtenir la liste de toutes les fiches au format json, avec la représentation html de la fiche dans le champ html_output

GET http://aesy-sophro.fr/wakka.php?wiki=api/entries/bazarlist
Obtenir les données nécessaires à bazarliste dynamic au format json

POST http://aesy-sophro.fr/wakka.php?wiki=api/entries/{formId}/json-ld
Créer une nouvelle fiche de type formId au format sémantique

GET http://aesy-sophro.fr/wakka.php?wiki=api/entries/geojson
Obtenir la liste de toutes les fiches au format geojson

GET http://aesy-sophro.fr/wakka.php?wiki=api/entries/ical
Obtenir la liste de toutes les fiches au format ical

GET http://aesy-sophro.fr/wakka.php?wiki=api/entries/{output}&fields=bf_titre
Obtenir la liste de toutes les fiches au format spécifié en ne gardant que les titres (il est possible de spécifier d'autres champs en séparant leur nom par des ',' ex: &field=bf_titre,url)

GET http://aesy-sophro.fr/wakka.php?wiki=api/entry/url/{sourceUrl}
Retourne l'URL de la page Wiki synchronisée avec sourceUrl

Extension Hello World

The following code :
GET http://aesy-sophro.fr/wakka.php?wiki=api/hello/{test}
gives :
test
Example :
GET http://aesy-sophro.fr/wakka.php?wiki=api/hello/test

Extension Login

GET http://aesy-sophro.fr/wakka.php?wiki=api/auth Get all users (admin only)

GET http://aesy-sophro.fr/wakka.php?wiki=api/auth/{user} Get indicated user (admin only)

GET http://aesy-sophro.fr/wakka.php?wiki=api/auth/me Get basic info (username, isAdmin) for connected user (needs authenticated user)

POST http://aesy-sophro.fr/wakka.php?wiki=api/auth/login login user with param user and password

POST http://aesy-sophro.fr/wakka.php?wiki=api/auth/logout logout current connected user

Extension Templates

POST http://aesy-sophro.fr/wakka.php?wiki=api/templates/custom-presets/{presetFilename}
Sauvegarde un fichier preset personnalisé.

DELETE http://aesy-sophro.fr/wakka.php?wiki=api/templates/custom-presets/{presetFilename}
Supprime un fichier preset personnalisé.