{"id":441541,"date":"2026-04-03T02:43:18","date_gmt":"2026-04-03T00:43:18","guid":{"rendered":"https:\/\/www.kafinea.com\/documentation\/uncategorized\/api-rest-requetes-et-interrogation\/"},"modified":"2026-04-23T01:47:40","modified_gmt":"2026-04-22T23:47:40","password":"","slug":"api-rest-requetes-et-interrogation","status":"publish","type":"docs","link":"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/","title":{"rendered":"API REST &#8211; Requ\u00eates et interrogation"},"content":{"rendered":"<hr \/>\n<h2>Query \u2014 Interroger la base de donn\u00e9es<\/h2>\n<p>Cette op\u00e9ration permet d&rsquo;effectuer une requ\u00eate SELECT. La requ\u00eate doit suivre un format sp\u00e9cifique et pr\u00e9sente certaines limitations :<\/p>\n<ul>\n<li>Un seul type d&rsquo;entit\u00e9 par requ\u00eate (pas de JOIN)<\/li>\n<li>Maximum 100 r\u00e9sultats par requ\u00eate (utilisez <code>LIMIT<\/code> et <code>OFFSET<\/code> pour paginer)<\/li>\n<li>Les clauses <code>WHERE<\/code>, <code>ORDER BY<\/code> et <code>LIMIT<\/code> sont facultatives<\/li>\n<li>La requ\u00eate doit \u00eatre URL-encod\u00e9e<\/li>\n<\/ul>\n<blockquote>\n<p><strong>GET<\/strong> <code>https:\/\/apps.kafinea.com\/{instance}\/webservice.php<\/code><\/p>\n<\/blockquote>\n<div style=\"overflow-x:auto\">\n<table>\n<thead>\n<tr>\n<th>Param\u00e8tre<\/th>\n<th>Type<\/th>\n<th>Requis<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>operation<\/code><\/td>\n<td>string<\/td>\n<td>oui<\/td>\n<td>Doit \u00eatre <code>query<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>sessionName<\/code><\/td>\n<td>string<\/td>\n<td>oui<\/td>\n<td>Identifiant de session<\/td>\n<\/tr>\n<tr>\n<td><code>query<\/code><\/td>\n<td>string<\/td>\n<td>oui<\/td>\n<td>Requ\u00eate SQL (URL-encod\u00e9e)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>Exemple curl :<\/strong><\/p>\n<pre><code class=\"language-bash\">curl &quot;https:\/\/apps.kafinea.com\/YourKafinea\/webservice.php?operation=query&amp;sessionName=YOUR_SESSION_ID&amp;query=SELECT%20*%20FROM%20Contacts%20WHERE%20lastname%3D'Dupont'%20LIMIT%2010%20;&quot;\n<\/code><\/pre>\n<h3>Format de la requ\u00eate<\/h3>\n<pre><code class=\"language-sql\">SELECT * | ColumnsList | count(*)\nFROM ModuleName\nWHERE Conditions\nORDER BY ColumnsList\nLIMIT Offset, Limit ;\n<\/code><\/pre>\n<blockquote class=\"bq-important\">\n<p><strong>Important :<\/strong> le point-virgule final est obligatoire.<\/p>\n<\/blockquote>\n<p><strong>D\u00e9tails :<\/strong><\/p>\n<div style=\"overflow-x:auto\">\n<table>\n<thead>\n<tr>\n<th>\u00c9l\u00e9ment<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>ColumnsList<\/code><\/td>\n<td>Liste de noms de champs s\u00e9par\u00e9s par des virgules<\/td>\n<\/tr>\n<tr>\n<td><code>ModuleName<\/code><\/td>\n<td>Nom du module de l&rsquo;entit\u00e9<\/td>\n<\/tr>\n<tr>\n<td><code>Conditions<\/code><\/td>\n<td>S\u00e9par\u00e9es par <code>AND<\/code> ou <code>OR<\/code>, trait\u00e9es de gauche \u00e0 droite. Pas de regroupement avec parenth\u00e8ses.<\/td>\n<\/tr>\n<tr>\n<td><code>Offset<\/code><\/td>\n<td>Entier (facultatif)<\/td>\n<\/tr>\n<tr>\n<td><code>Limit<\/code><\/td>\n<td>Entier<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>Types de conditions disponibles :<\/strong><\/p>\n<div style=\"overflow-x:auto\">\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Syntaxe<\/th>\n<th>Exemple<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Op\u00e9rateur<\/td>\n<td><code>&lt;<\/code>, <code>&gt;<\/code>, <code>&lt;=<\/code>, <code>&gt;=<\/code>, <code>!=<\/code>, <code>=<\/code><\/td>\n<td><code>lastname = 'Dupont'<\/code><\/td>\n<\/tr>\n<tr>\n<td>IN<\/td>\n<td><code>IN(val1, val2, ...)<\/code><\/td>\n<td><code>industry IN('Tech', 'Finance')<\/code><\/td>\n<\/tr>\n<tr>\n<td>LIKE<\/td>\n<td><code>LIKE 'pattern'<\/code><\/td>\n<td><code>lastname LIKE '%dup%'<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<hr \/>\n<h2>Query Related \u2014 Interroger les listes connexes<\/h2>\n<p>Cette op\u00e9ration permet d&rsquo;obtenir les entit\u00e9s des listes connexes d&rsquo;une entit\u00e9 sp\u00e9cifique. La requ\u00eate suit le m\u00eame format que <code>query<\/code>, mais <strong>sans point-virgule final<\/strong>.<\/p>\n<blockquote>\n<p><strong>GET<\/strong> <code>https:\/\/apps.kafinea.com\/{instance}\/webservice.php<\/code><\/p>\n<\/blockquote>\n<div style=\"overflow-x:auto\">\n<table>\n<thead>\n<tr>\n<th>Param\u00e8tre<\/th>\n<th>Type<\/th>\n<th>Requis<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>operation<\/code><\/td>\n<td>string<\/td>\n<td>oui<\/td>\n<td>Doit \u00eatre <code>query_related<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>sessionName<\/code><\/td>\n<td>string<\/td>\n<td>oui<\/td>\n<td>Identifiant de session<\/td>\n<\/tr>\n<tr>\n<td><code>id<\/code><\/td>\n<td>string<\/td>\n<td>oui<\/td>\n<td>ID Webservice de l&rsquo;entit\u00e9 parente<\/td>\n<\/tr>\n<tr>\n<td><code>relatedLabel<\/code><\/td>\n<td>string<\/td>\n<td>oui<\/td>\n<td>Nom du module li\u00e9<\/td>\n<\/tr>\n<tr>\n<td><code>query<\/code><\/td>\n<td>string<\/td>\n<td>oui<\/td>\n<td>Requ\u00eate SQL (URL-encod\u00e9e, sans <code>;<\/code> final)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>Exemple curl :<\/strong><\/p>\n<pre><code class=\"language-bash\">curl &quot;https:\/\/apps.kafinea.com\/YourKafinea\/webservice.php?operation=query_related&amp;sessionName=YOUR_SESSION_ID&amp;id=21x3456&amp;relatedLabel=Documents&amp;query=SELECT%20*%20FROM%20Documents%20WHERE%20filesize%20%3E%2010000&quot;\n<\/code><\/pre>\n<p><strong>Exemple de requ\u00eate :<\/strong><\/p>\n<pre><code class=\"language-sql\">SELECT * FROM Documents WHERE filesize &gt; 10000\n<\/code><\/pre>\n<hr \/>\n<h2>R\u00e9f\u00e9rences associ\u00e9es \ud83d\udd17<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.kafinea.com\/documentation\/api\/api-rest-operations-crud\/\">Op\u00e9rations CRUD<\/a><\/li>\n<li><a href=\"https:\/\/www.kafinea.com\/documentation\/api\/api-rest-introduction\/\">Introduction API<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Query \u2014 Interroger la base de donn\u00e9es Cette op\u00e9ration permet d&rsquo;effectuer une requ\u00eate SELECT. La requ\u00eate doit suivre un format sp\u00e9cifique et pr\u00e9sente certaines limitations : Un seul type d&rsquo;entit\u00e9 par requ\u00eate (pas de JOIN) Maximum 100 r\u00e9sultats par requ\u00eate (utilisez LIMIT et OFFSET pour paginer) Les clauses WHERE, ORDER BY et LIMIT sont facultatives&#8230;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"doc_category":[58],"doc_tag":[],"class_list":["post-441541","docs","type-docs","status-publish","hentry","doc_category-api"],"year_month":"2026-06","word_count":371,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"David Valminos","author_nicename":"david","author_url":"https:\/\/www.kafinea.com\/fr\/author\/david\/"},"doc_category_info":[{"term_name":"API","term_url":"https:\/\/www.kafinea.com\/fr\/documentation\/api\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Documentation - API REST - Requ\u00eates et interrogation &#8226; Kafinea<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Documentation - API REST - Requ\u00eates et interrogation &#8226; Kafinea\" \/>\n<meta property=\"og:description\" content=\"Query \u2014 Interroger la base de donn\u00e9es Cette op\u00e9ration permet d&rsquo;effectuer une requ\u00eate SELECT. La requ\u00eate doit suivre un format sp\u00e9cifique et pr\u00e9sente certaines limitations : Un seul type d&rsquo;entit\u00e9 par requ\u00eate (pas de JOIN) Maximum 100 r\u00e9sultats par requ\u00eate (utilisez LIMIT et OFFSET pour paginer) Les clauses WHERE, ORDER BY et LIMIT sont facultatives...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/\" \/>\n<meta property=\"og:site_name\" content=\"Kafinea\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-22T23:47:40+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/documentation\\\/api\\\/api-rest-requetes-et-interrogation\\\/\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/documentation\\\/api\\\/api-rest-requetes-et-interrogation\\\/\",\"name\":\"Documentation - API REST - Requ\u00eates et interrogation &#8226; Kafinea\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/#website\"},\"datePublished\":\"2026-04-03T00:43:18+00:00\",\"dateModified\":\"2026-04-22T23:47:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/documentation\\\/api\\\/api-rest-requetes-et-interrogation\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/documentation\\\/api\\\/api-rest-requetes-et-interrogation\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/documentation\\\/api\\\/api-rest-requetes-et-interrogation\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/documentation\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"API REST &#8211; Requ\u00eates et interrogation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/\",\"name\":\"Kafinea\",\"description\":\"Une solution unique pour toutes vos ambitions\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/#organization\",\"name\":\"Kafinea\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/Logo-Kafinea-SVG-orange-bleu.svg\",\"contentUrl\":\"https:\\\/\\\/www.kafinea.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/Logo-Kafinea-SVG-orange-bleu.svg\",\"width\":296.31,\"height\":66.48,\"caption\":\"Kafinea\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/kafinea\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Documentation - API REST - Requ\u00eates et interrogation &#8226; Kafinea","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/","og_locale":"fr_FR","og_type":"article","og_title":"Documentation - API REST - Requ\u00eates et interrogation &#8226; Kafinea","og_description":"Query \u2014 Interroger la base de donn\u00e9es Cette op\u00e9ration permet d&rsquo;effectuer une requ\u00eate SELECT. La requ\u00eate doit suivre un format sp\u00e9cifique et pr\u00e9sente certaines limitations : Un seul type d&rsquo;entit\u00e9 par requ\u00eate (pas de JOIN) Maximum 100 r\u00e9sultats par requ\u00eate (utilisez LIMIT et OFFSET pour paginer) Les clauses WHERE, ORDER BY et LIMIT sont facultatives...","og_url":"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/","og_site_name":"Kafinea","article_modified_time":"2026-04-22T23:47:40+00:00","twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/","url":"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/","name":"Documentation - API REST - Requ\u00eates et interrogation &#8226; Kafinea","isPartOf":{"@id":"https:\/\/www.kafinea.com\/fr\/#website"},"datePublished":"2026-04-03T00:43:18+00:00","dateModified":"2026-04-22T23:47:40+00:00","breadcrumb":{"@id":"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.kafinea.com\/fr\/documentation\/api\/api-rest-requetes-et-interrogation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.kafinea.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/www.kafinea.com\/fr\/documentation\/"},{"@type":"ListItem","position":3,"name":"API REST &#8211; Requ\u00eates et interrogation"}]},{"@type":"WebSite","@id":"https:\/\/www.kafinea.com\/fr\/#website","url":"https:\/\/www.kafinea.com\/fr\/","name":"Kafinea","description":"Une solution unique pour toutes vos ambitions","publisher":{"@id":"https:\/\/www.kafinea.com\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kafinea.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.kafinea.com\/fr\/#organization","name":"Kafinea","url":"https:\/\/www.kafinea.com\/fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.kafinea.com\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/www.kafinea.com\/wp-content\/uploads\/2024\/10\/Logo-Kafinea-SVG-orange-bleu.svg","contentUrl":"https:\/\/www.kafinea.com\/wp-content\/uploads\/2024\/10\/Logo-Kafinea-SVG-orange-bleu.svg","width":296.31,"height":66.48,"caption":"Kafinea"},"image":{"@id":"https:\/\/www.kafinea.com\/fr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/kafinea\/"]}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"David Valminos","author_link":"https:\/\/www.kafinea.com\/fr\/author\/david\/"},"uagb_comment_info":0,"uagb_excerpt":"Query \u2014 Interroger la base de donn\u00e9es Cette op\u00e9ration permet d&rsquo;effectuer une requ\u00eate SELECT. La requ\u00eate doit suivre un format sp\u00e9cifique et pr\u00e9sente certaines limitations : Un seul type d&rsquo;entit\u00e9 par requ\u00eate (pas de JOIN) Maximum 100 r\u00e9sultats par requ\u00eate (utilisez LIMIT et OFFSET pour paginer) Les clauses WHERE, ORDER BY et LIMIT sont facultatives...","_links":{"self":[{"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/docs\/441541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/comments?post=441541"}],"version-history":[{"count":11,"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/docs\/441541\/revisions"}],"predecessor-version":[{"id":442950,"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/docs\/441541\/revisions\/442950"}],"wp:attachment":[{"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/media?parent=441541"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/doc_category?post=441541"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.kafinea.com\/fr\/wp-json\/wp\/v2\/doc_tag?post=441541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}