WordPress REST API

POST

To fetch a WordPress post with the REST API the following URL is used :

https://admin.ki-leierbud.lu/wp-json/wp/v2/posts/xxx (xxx = post ID)

Example :

https://admin.ki-leierbud.lu/wp-json/wp/v2/posts/410


CATEGORY

To fetch a WordPress category post with the REST API the following URL is used :

https://admin.ki-leierbud.lu/wp-json/wp/v2/categories/yyy (yyy = category ID)

Example :

https://admin.ki-leierbud.lu/wp-json/wp/v2/categories/91


List of 100 categories

To fetch the first 100 categories from a WordPress web site :

https://admin.ki-leierbud.lu/wp-json/wp/v2/categories?per_page=100

[{"id":77,"count":0,"description":"","link":"https:\/\/admin.ki-leierbud.lu\/de\/archives\/category\/wissen\/ausbildung","name":"Ausbildung","slug":"ausbildung","taxonomy":"category","parent":29,"meta":[],"_links":{"self":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories"}],"about":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/taxonomies\/category"}],"up":[{"embeddable":true,"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories\/29"}],"wp:post_type":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/posts?categories=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},

{"id":212,"count":2,"description":"","link":"https:\/\/admin.ki-leierbud.lu\/de\/archives\/category\/wissen\/fragen\/ausbildung-ki","name":"Ausbildung KI","slug":"ausbildung-ki","taxonomy":"category","parent":35,"meta":[],"_links":{"self":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories"}],"about":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/taxonomies\/category"}],"up":[{"embeddable":true,"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories\/35"}],"wp:post_type":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/posts?categories=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},

{"id":33,"count":0,"description":"","link":"https:\/\/admin.ki-leierbud.lu\/pt\/archives\/category\/conhecimento","name":"Conhecimento","slug":"conhecimento","taxonomy":"category","parent":0,"meta":[],"_links":{"self":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories"}],"about":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/taxonomies\/category"}],"wp:post_type":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/posts?categories=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},

{"id":27,"count":0,"description":"","link":"https:\/\/admin.ki-leierbud.lu\/fr\/archives\/category\/connaissances","name":"Connaissances","slug":"connaissances","taxonomy":"category","parent":0,"meta":[],"_links":{"self":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/categories"}],"about":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/taxonomies\/category"}],"wp:post_type":[{"href":"https:\/\/admin.ki-leierbud.lu\/wp-json\/wp\/v2\/posts?categories=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},

Here is the list of the four first categories returned in the JSON file with their parent categories :

  • 77 >>> 29
  • 212 >>> 35
  • 33 >>> 0
  • 27 >>> 0

A “0” means that the category has no parent.

Here is a list with the returned categories to view the details provided :


CATEGORY from POST

To extract a category from a post JSON file :

...... {"footnotes":""},"categories":[93],"tags":[201],"class_list":["post-410","post","type-post","status-publish","format-standard","hentry","category-image-style-easy-en-en","tag-simpson"],"translations":{"en":410},"_links":.....

Parent, Grand-parent and top CATEGORIES

To find the parent, grand-parent or top level categories from a post JSON file , we must proceed iteratively:

  1. fetch the POST JSON file and extract first category ID
  2. fetch the first CATEGORY JSON file and extract the parent category ID
  3. if the parent category is not 0, continue to fetch the PARENT CATEGORY JSON file and extract the grand-parent category ID
  4. if the grand-parent category is not 0, continue to fetch the GRAND-PARENT CATEGORY JSON file and extract the next level category ID

Welcome to the Image Style Quiz

Test your ability to recognize and classify AI-generated image styles. The images are based on a photo of the Judo Champion d’Alsace 2025. Click a link below to open the image gallery. Choose a style for each image from the list in the header. Navigate to the next images using the arrows or by swiping. Once you’ve labeled all images, you can submit your answers to see your results. Feel free to revise your choices before submitting. Use the footer buttons to return here or to go to the table of content.

  • easy level quiz : 13 images
  • moderate level quiz : 13 images
  • difficult level quiz : 13 images

Hosting

KI-Léierbud.lu Homepage

in root folder /httpdocs/index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="theme-color" content="#fff7e6" />
  <title>KI-Léierbud</title>
  <style>
    html, body {
      margin: 0;
      padding: 0;
      height: 100%;
      background-color: #fff7e6;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      color: #333;
      line-height: 1.6;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
    }
    body {
      padding-top: env(safe-area-inset-top);
      padding-right: env(safe-area-inset-right);
      padding-bottom: env(safe-area-inset-bottom);
      padding-left: env(safe-area-inset-left);
    }
    main {
      max-width: 768px;
      margin: 0 auto;
      padding: 1em;
    }
    h1 {
      font-size: 2.8em;
      text-align: center;
      margin-top: 1em;
      color: #b30000;
    }
    .indented-lines p {
      margin: 0.3em 0;
      color: #444;
    }
    .indent-0 { padding-left: 0; }
    .indent-1 { padding-left: 1em; }
    .indent-2 { padding-left: 2em; }
    .indent-3 { padding-left: 3em; }
    .indent-4 { padding-left: 4em; }
    .timeline {
      text-align: center;
      font-weight: bold;
      font-size: 1.1em;
      margin: 1.5em 0 0.5em;
      color: #5a2d0c;
    }
    img {
      display: block;
      width: 100%;
      height: auto;
      margin: 1em 0;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
      border-radius: 10px;
    }
    .language-links {
      margin-top: 2em;
    }
    .language-links p {
      margin: 0.3em 0;
    }
  </style>
</head>
<body>
  <main>
    <div class="indented-lines">
      <p class="indent-0"><a href="https://admin.ki-leierbud.lu">Welcome to the portal of</a> …</p>
      <p class="indent-1"><a href="https://admin.ki-leierbud.lu/">Bienvenue sur le portail de</a> …</p>
      <p class="indent-2"><a href="https://admin.ki-leierbud.lu">Willkommen auf dem Portal der</a> …</p>
      <p class="indent-3"><a href="https://admin.ki-leierbud.lu">Bem-vindos ao portail de</a> …</p>
      <p class="indent-4"><a href="https://admin.ki-leierbud.lu/">Wëllkomm um Portal vun der</a> …</p>
    </div>

    <h1>KI-Léierbud</h1>

    <div class="timeline">&lt;&lt;&lt; 14 .000 .000 .000 <a href="https://admin.ki-leierbud.lu/archives/99">years</a> - <a href="https://admin.ki-leierbud.lu/archives/108">années</a> – <a href="https://admin.ki-leierbud.lu/archives/102">Jahre</a> – <a href="https://admin.ki-leierbud.lu/archives/106">anos</a> - <a href="https://admin.ki-leierbud.lu/archives/104">Joer</a></div>
    <img src="images/14billions.jpg" alt="14 Billion Years" />

    <div class="timeline">&lt;&lt;&lt; 14.000.000 années – Jahre – years – Joer – anos</div>
    <img src="images/14millions.jpg" alt="14 Million Years" />

    <div class="timeline">&lt;&lt;&lt; 14.000 années – Jahre – years – Joer – anos</div>
    <img src="images/14thousand.jpg" alt="14 Thousand Years" />

    <div class="timeline">&lt;&lt;&lt; 14 années – Jahre – years – Joer – anos</div>
    <img src="images/14years.jpg" alt="14 Years" />

    <div class="timeline">2023 : AI Tsunami (en) – Tsunami IA (fr, pt) – KI Tsunami (de, lb)</div>
    <img src="images/tsunami.jpg" alt="AI Tsunami" />

    <div class="timeline">aujourd’hui – heute – today – haut – hoje &gt;&gt;&gt; KI-Léierbud</div>
    <img src="images/ki-leierbud.jpg" alt="KI-Léierbud Today" />

    <div class="language-links indented-lines">
      <p class="indent-0">Start your exploration of the KI-Léierbud in English </p>
      <p class="indent-1">Commencez votre exploration de la KI-Léierbud en français </p>
      <p class="indent-2">Beginnen Sie Ihre Erkundung der KI-Léierbud auf Deutsch </p>
      <p class="indent-3">Comece a sua exploração da KI-Léierbud em português </p>
      <p class="indent-4">Start Är Entdeckung vun der KI-Léierbud op Lëtzebuergesch </p>
    </div>
  </main>
</body>
</html>

File .htaccess

in root folder /ki-leierbud.lu/httpdocs/.htaccess

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress