6 La navigation dans le manuel de Kentika est réservée aux utilisateurs identifiés
KAAT (Kentika As A Toolbox) : Service Fields
#API
Permet d'obtenir un descriptif de structure d'une table "maître" ou d'un "type" en particulier via l'API de Kentika.
URL : REST/Fields
table : soit une des tables de Kentika (document, auteur, reference, personne, thesaurus... de manière générale, toute table de la base de données) soit un type en particulier exprimé sous la forme du type seul ou bien du type préfixé par le nom de la table suivi d'un point.
Exemples
{"table": "document"}
{"table": "classeur"}
{"table": "document.classeur"}
Si une erreur est détectée, "request_status" est égal à "error" et le code est retourné.
Exemple
Requête : {"table": "facturierXX"}
Réponse : {"request_status": "error","err_code": 406,"err_msg": "Type not identified"}
Si les table et / ou type sont connus, la liste des champs est retournée. En entête : le statut, la graphie exacte du type, le nombre de champs. Pour chaque champ, un bloc d'informations.
{
"request_status": "success",
"table": "Document.Dépôt",
"fields_nb": 17,
"fields": [
{ "field_num": "21",
"field_lib": "Titre",
"field_etiq": "TIT",
"field_select": true,
"field_update": true,
"field_content": "text" },
Pour connaître la liste des types de documents déclarés dans la base de données, il suffit d'analyser, dans la liste des champs retournés sur la requête {"table": "document"}, le contenu du champ "Type"
field_num : numéro du champ, tel que fixé dans Kentika.
field_lib : libellé du champ
field_etiq : code
Ecran de paramétrage d'une rubrique dans Kentika
L'expression d'un champ dans les services "Select" et "Update" peut se faire par son numéro, son code ou son libellé.
field_select : le champ peut être utilisé en recherche
field_update : le champ peut faire l'objet d'une mise à jour via le service update
field_content : nature de l'information
Exemples
pour un champ "text"
{"field_num": "131",
"field_lib": "Commentaire",
"field_select": true,
"field_update": true,
"field_content": "text"},
pour un champ "list"
{"field_num": "1361",
"field_lib": "Statut",
"field_select": true,
"field_update": true,
"field_etiq": "W2_$dST",
"field_content": "list",
"field_values": [
{"value_code": "00",
"value_lib": "Initialisé"},
{"value_code": "10",
"value_lib": "Brouillon"},
{"value_code": "15",
"value_lib": "Privé"},]
},
pour un champ "link.text"
{"field_num": "1341",
"field_lib": "Equipe",
"field_select": true,
"field_update": true,
"field_etiq": "W2_$dGR",
"field_content": "link.text",
"field_link_table": "Références",
"field_link_types": "Equipe"},
Liste des codes d'erreur : cliquer ici.
<WR_Val_EN>
KAAT (Kentika As A Toolbox) : "Fields" service
Allows to obtain a structure description of a "master" table or a "type" table in particular via the Kentika API.
URL : REST/Fields
table : either one of the Kentika master tables (document, author, reference, person, thesaurus ... in a general way, any table of the database) is a particular type expressed in the form of the type alone or of the type prefixed by the name of the table followed by a period.
Examples
{"table": "document"}
{"table": "folder"}
{"table": "document.folder"}
If an error is detected, "request_status" is equal to "error" and the code is returned.
404 : Table not specified
405 : Table not identified
406 : Type not identified
Example
Query : {"table": "invoicesXXX"}
Answer: {"request_status": "error","err_code": 406,"err_msg": "Type not identified"}
If the table and / or type are known, the list of fields is returned. In the header: the status, the exact type of graph, the number of fields. For each field, a block of information.
{
"request_status": "success",
"table": "Document.Deposit",
"fields_nb": 17,
"fields": [
{ "field_num": "21",
"field_lib": "Title",
"field_etiq": "TIT",
"field_select": true,
"field_update": true,
"field_content": "text" },
To get the list of the types of documents declared in the database: analyze, in the list of the fields returned on the request {"table": "document"}, the contents of the field "Type"
field_num : number of the field assigned by Kentika.
field_lib : field caption
field_etiq : code
Field definition in Kentika
A field in the services "Select" and "Update" can be called by it's number, code or caption.
field_select : the field can be used in search
field_update : the field can be updated via the update service
field_content : nature of the information
text : free text
list : list of possible values provided
thesaurus : a key word of the thesaurus
date : can be a specific date or a fuzzy date
number : number
email : email address
URL : URL
address : address (the components are expressed in xml)
link.text : the value must belong to a linked table
in this case, two informations are provided:
field_link_table : the name of the table
field_link_types : the possible types of the table
Examples
for a field "text"
{"field_num": "131",
"field_lib": "Comment",
"field_select": true,
"field_update": true,
"field_content": "text"},
for a field "list"
{"field_num": "1361",
"field_lib": "Status",
"field_select": true,
"field_update": true,
"field_etiq": "W2_$dST",
"field_content": "list",
"field_values": [
{"value_code": "00",
"value_lib": "first step"},
{"value_code": "10",
"value_lib": "second step"},
{"value_code": "15",
"value_lib": "finiched"},]
},
for a field "link.text"
{"field_num": "1341",
"field_lib": "Team",
"field_select": true,
"field_update": true,
"field_etiq": "W2_$dGR",
"field_content": "link.text",
"field_link_table": "References",
"field_link_types": "Team"},
List of error codes: click here.
</WR_Val_EN>
Powered by KENTIKA Atomic - © Kentika 2025 tous droits réservés - Mentions légales