getAccess

Requête

Permet de récupérer les droits de l'Utilisateur pour le Dictionnaire, sa Licence ainsi que les mentions. La réponse retourne un array d'objets License, et un User.

Endpoint

[Domain]/academy/api/v1/Dictionary/getAccess

Exemple

const endpoint = "[endpoint]";
const apiKey = "[myAPIKey]";

// Use the username and password to obtain data based on user rights
const username = "[username]"; // optionnel
const password = "[password]"; // optionnel

fetch(endpoint, {
    method: "POST", 
    headers: {
        "Authorization": apiKey,
        "username ": username,
        "password ": password 
    }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Erreur :", error));

Réponse

{
    "Dictionary": {
        "variety": "shiKomori",
        "authorization": "all",
        "startValidity": "2021-01-06",
        "endValidity": "2022-01-06",
        "entries": "11554/11554",
        "licenseNumber": 40,
        "userNumber": 36,
        "version": 1
    },
    "Licenses": [
        {
            "number": 40,
            "name": "Apprendre à Parler",
            "description": ""
        }
    ],
    "User": {
        "number": 36,
        "firstName": "John",
        "lastName": "DOE",
        "displayName": "John Doe"
    },
    "message": "Utilisation des données Apprendre à Parler.",
    "provider": "ORELC",
    "web": "www.orelc.ac"
}

Description des champs

Dictionary

Licenses

User

Dernière mise à jour