GET · Lire un article

Centre d’aide : Lire un article. 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/{articleId}

operationId : knowledge_article_get

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

cursor

query

Non

string ; Longueur maximale : 2048

articleId

path

Oui

string

Exemple de requête

Shell
curl --request GET "$KHONY_ORIGIN/api/v1/knowledge/articles/help_article_01k3w8d7vhe008000000000004?productId=product_01k3w8d7vhe008000000000001" \
  --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"
  },
  "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/__schema1"
    }
  },
  "required": [
    "data",
    "nextCursor"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "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": 16000
        },
        "visibility": {
          "type": "string",
          "enum": [
            "public",
            "authenticated"
          ]
        },
        "publishedAt": {
          "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))$"
        }
      },
      "required": [
        "id",
        "collectionId",
        "title",
        "slug",
        "excerpt",
        "content",
        "visibility",
        "publishedAt"
      ],
      "additionalProperties": false
    },
    "__schema1": {
      "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": "Read a published public or authenticated source-language article in pages of at most 16000 UTF-16 units without splitting surrogate pairs. Requires knowledge.read and the public API entitlement; consumes one product API request per call. nextCursor binds the product, article and publication timestamp. Reuse it unchanged with the same target; restart if the article is republished. Unavailable, draft and internal articles are refused without exposing their metadata. Draft editorial variants, author details, ratings and storage links are excluded. Responses have a 128 KiB byte budget."
}
JSON