Get article by version
  • 17 Feb 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Get article by version

  • Dark
    Light

GET /articles/{id}/{langcode}/versions/{version_number} 

Gets article in respective language by a version number


Header

ParameterTypeDescription
api_tokenstringYou can get the REST API from Settings > Advanced > API tokens.


Query Parameters

ParameterRequiredTypeDescription
isForDisplayNo boolSet this to true, if you are displaying the article to the end-user. When true, any snippets or variables in the article will be resolved.

Route Parameters

ParameterRequiredTypeDescription
idYesstringThe ID of the article
version_numberYes
stringThe version number of the article
langCodeYes
stringLanguage code for multilingual (Default value is en)


Response

{
    "data": {
        "id": "eda6857b-8641-46fe-ac43-683996dc06a7",
        "title": "API Document",
        "content": "## Hello World",
        "html_content": "<h2>Hello World</h2>\n",
        "category_id": "650aec55-c0a7-42bf-862c-1eea02b98efe",
        "project_version_id": "7ba483c0-0929-4bb6-aa43-04a2f4bb8893",
        "version_number": 1,
        "public_version": 0,
        "latest_version": 1,
        "enable_rtl": false,
        "hidden": false,
        "status": 0,
        "order": 0,
        "created_by": "5ae331f74e60146b233558c6",
        "authors": [],
        "created_at": "2019-02-19T16:45:27.478Z",
        "modified_at": "2019-02-19T16:45:27.478Z",
        "slug": "api-document-2",
        "is_fall_back_content": false
    },
    "extension_data": null,
    "context": null,
    "success": true,
    "errors": [],
    "warnings": [],
    "information": []
}


Response Data

ParameterTypeDescription
idstringThe ID of the article
titlestringArticle title
contentstringArticle markdown content
html_contentstringArticle HTML content
category_idstringThe ID of the parent category
project_version_idstringThe ID of the project version where this article is located
version_numbernumberThe currently fetched version number of this article
latest_versionnumberThe latest version number of this article
public_versionnumberThe version number that is currently published
enable_rtlbooleanIndicates whether Right to Left alignment is enabled for that article language
hiddenbooleanIndicates if the article is visible on the site
settingsobjectArticle settings object
statusenumeratedThe status of the article: 0 - Draft, 1 - InReview, 2 - Public, 3 - Published, 4 - Deleted
ordernumberThe position inside the parent category
created_bystringThe ID of the user that created the article
authorsobject[]The list of authors that contributed to this article
created_atDateTimeThe date the article was created
modified_atDateTimeThe date the article was last modified
slugstringThe slug of the article
is_fall_back_contentbooleanIndicates whether the article content is fallback content of the default language or not

Response > Authors

ParameterTypeDescription
idstringThe ID of the user
first_namestringFirst name of the user
last_namestringLast name of the user
email_idstringEmail address of the user
profile_logo_urlstringProfile image URL of the user
user_roleenumerated1 - Administrator, 2 - Editor, 3 - DraftWriter, 4 - Reader, 7 - Owner
last_login_atDateTimeLast login date of the user
unique_user_namestringUnique username of the user

Was this article helpful?