GET · Rechercher les articles

Centre d’aide : Rechercher les articles. Paramètres, accès et exemples de réponse.

Rédigé par Red Blue

Mis à jour le

Centre d’aide

GET /api/v1/knowledge/articles

operationId : knowledge_articles_list

Accès

Permission

Consentements OAuth

Clé API d’organisation ou délégation OAuth pour l’API

knowledge.read

api:connect, knowledge:read

KHONY_ORIGIN est l’origine HTTPS de votre application Khony, sans chemin final. Remplacez les identifiants de l’exemple par ceux de vos ressources autorisées. Les données de réponse ci-dessous illustrent le format ; elles ne sont pas le résultat d’un appel à votre organisation.

Paramètres et en-têtes

Nom

Emplacement

Requis

Type et contraintes

productId

query

Oui

string

query

query

Non

string ; Défaut : "" ; Longueur maximale : 500

limit

query

Non

integer ; Défaut : 20 ; Minimum : 1 ; Maximum : 50

cursor

query

Non

string ; Longueur maximale : 2048

Exemple de requête

Shell
curl --request GET "$KHONY_ORIGIN/api/v1/knowledge/articles?productId=product_01k3w8d7vhe008000000000001&query=export&limit=20" \
  --header "x-api-key: $KHONY_API_KEY"
Shell

Réponse de succès · HTTP 200

JSON
{
  "data": [
    {
      "id": "help_article_01k3w8d7vhe008000000000004",
      "collectionId": "help_collection_01k3w8d7vhe008000000000005",
      "title": "Export a report",
      "slug": "export-a-report",
      "excerpt": "How to export your reports",
      "content": "Open the report and choose Export.",
      "visibility": "public",
      "publishedAt": "2026-10-23T10:00:00.000Z",
      "contentTruncated": false
    }
  ],
  "nextCursor": null
}
JSON
Schéma complet de la réponse
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/__schema0"
    },
    "nextCursor": {
      "$ref": "#/$defs/__schema2"
    }
  },
  "required": [
    "data",
    "nextCursor"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema1"
      }
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^help_article_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "collectionId": {
          "type": "string",
          "pattern": "^help_collection_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "title": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "excerpt": {
          "type": "string"
        },
        "content": {
          "type": "string",
          "maxLength": 1000
        },
        "contentTruncated": {
          "type": "boolean"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "public",
            "authenticated"
          ]
        },
        "publishedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "collectionId",
        "title",
        "slug",
        "excerpt",
        "content",
        "contentTruncated",
        "visibility",
        "publishedAt"
      ],
      "additionalProperties": false
    },
    "__schema2": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
JSON

Refus et reprise

Les statuts documentés pour cette opération sont 400, 401, 402, 403, 429, 500, 503. Identifiez la cause avec error.code et, lorsqu’il est présent, error.reason. Une réponse 409 peut demander une relecture de révision ou signaler une commande incompatible ; une réponse 428 demande une confirmation humaine. Ne rejouez une écriture que selon son contrat.

Notes du contrat
JSON
{
  "description": "Search published public and authenticated source-language article text in one authorized product, newest IDs first. Requires knowledge.read through an organization key or a dedicated API OAuth bearer with api:connect knowledge:read, and the public API entitlement. Each admitted request consumes a product API request. Query is limited to 500 characters; limit is 1–50 (default 20). Content previews contain at most 1000 UTF-16 units without splitting surrogate pairs. Follow nextCursor with the same product and query; it is validated against both. Inserts do not shift continuation; edits/deletes are not a snapshot. Drafts, internal articles, author data and editorial variants are excluded. Responses have a 128 KiB byte budget; narrow the search or reduce limit if exceeded."
}
JSON