Gets article by a version number
  • 25 Nov 2023
  • 7 Minutes to read
  • Contributors
  • Dark
    Light

Gets article by a version number

  • Dark
    Light

Article Summary

Get
/v2/Articles/{articleId}/{langCode}/versions/{versionNumber}
Security
API Key
Header parameter nameapi_token
Enter REST API key. To generate a key, go to Settings → Knowledge base portal → API tokens
Path parameters
articleId
stringRequired

The ID of the article

versionNumber
integer (int32) Required

Version number of the article

langCode
stringRequired

Language code of the article

Default"en"
Query parameters
isForDisplay
boolean

Set this to true, if you are displaying the article to the end-user. If true, the content of snippets or variables appears in the article. Note: If the value is true, ensure that the article content is not passed for update article endpoints.

Default"False"
appendSASToken
boolean

Set this to false to exclude appending SAS token for images/files

Default"True"
Responses
200

Success

Success status Response

This is the sample response for get-article, You can verify the information regarding the individual article.

{
  "data": {
    "id": "a1096061-e842-41fd-9085-494095e401b9",
    "title": "Knowledge bases are much easier to design and edit",
    "content": "Have you ever edited a Wikipedia page? You have to break the flow of text to add tags, and when you want to connect two articles together you have to just hope that nobody changes the other article’s name, lest you end up with a rusty red “dead link.”To be fair,Wikipedia has actually made good strides in making their Wiki software easy to use for anybody, but opening up the editor is still a bit of a shock since you don’t see the familiar webpage you just clicked on. With a knowledge base, what you see is what you get.You don’t have to train anybody on how to add or edit pages because the whole thing is extremely intuitive. Anybody can learn to navigate an edit page in seconds flat.",
    "html_content": null,
    "category_id": "de104b39-db97-4509-8d4c-deeac74d448b",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "version_number": 1,
    "public_version": 1,
    "latest_version": 2,
    "enable_rtl": false,
    "hidden": false,
    "status": 2,
    "order": 0,
    "created_by": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "authors": [
      {
        "id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
        "customer_id": "04618b64-1af7-4445-91a1-a4abc6a12aea",
        "status": 0,
        "first_name": "peter",
        "last_name": "jone",
        "user_description": null,
        "fresh_chat_restore_id": null,
        "last_login_date": null,
        "signup_date": null,
        "unique_user_name": "peter-jone",
        "is_user_existin_current_project": false,
        "scheme_name": null,
        "initial_tour_shown": false,
        "authentication_id": null,
        "email_id": "peterjone@mail.com",
        "profile_logo_url": "https://www.gravatar.com/avatar/FE29D578CBEC3945FC88BF4F10906A3E",
        "profile_logo_cdn_url": "https://www.gravatar.com/avatar/FE29D578CBEC3945FC88BF4F10906A3E",
        "is_enterprise_user": false
      }
    ],
    "created_at": "2023-11-25T10:59:34.9689597Z",
    "modified_at": "2023-11-25T10:59:34.9689601Z",
    "slug": "Knowledge-bases-are-much-easier-to-design-and edit",
    "is_fall_back_content": false,
    "description": null,
    "article_index": null,
    "category_type": 0,
    "content_type": null,
    "is_shared_article": false
  },
  "extension_data": null,
  "success": true,
  "errors": [],
  "warnings": [],
  "information": []
}
Expand All
object
data
object (ArticleVersionDataCustomer)
id
string

The ID of the article

title
string

The title of the article

content
string

If the article editor is Markdown, then the article content will be present in this property

html_content
string

If the article editor is WYSIWYG (HTML), then the content will be present in this property. Note: Markdown editor will also have HTML content (read-only).

category_id
string

The ID of the article's parent category

project_version_id
string

The ID of the project version where the article is located

version_number
integer (int32)

The currently fetched version number of the article

public_version
integer (int32)

The currently published version number of the article

latest_version
integer (int32)

The latest version number of the article

enable_rtl
boolean

True indicates that Right to Left alignment is enabled for the article language

hidden
boolean

False indicates that the article is visible on the site

status
integer (int32)

The status of the category page: 0 - Draft, 1 - In review, 2 - Public, 3 - Published, 4 - Deleted, 5 - Forked

Valid values[ 0, 1, 2, 3, 4, 5 ]
order
integer (int32)

The position inside the parent category

created_by
string

The ID of the team account who created the article

authors
Array of object (User)

The list of contributors in the article

object
id
string
customer_id
string (uuid)
status
integer (int32)
Valid values[ 0, 1, 2, 3, -1 ]
first_name
string
last_name
string
user_description
string
fresh_chat_restore_id
string
last_login_date
string (date-time)
signup_date
string (date-time)
unique_user_name
string
is_user_existin_current_project
boolean
scheme_name
string
initial_tour_shown
boolean
authentication_id
string
email_id
string
profile_logo_url
string
profile_logo_cdn_url
string
is_enterprise_user
boolean
created_at
string (date-time)

The date on which the article was created

modified_at
string (date-time)

The date on which the article was last modified

slug
string

The slug of the article

is_fall_back_content
boolean

True indicates that the article content is a fallback of the default language content

description
string

The description of the article

article_index
object (ArticleIndexData)
id
string
title
string
image
string
description
string
authors
Array of object (User)
object
id
string
customer_id
string (uuid)
status
integer (int32)
Valid values[ 0, 1, 2, 3, -1 ]
first_name
string
last_name
string
user_description
string
fresh_chat_restore_id
string
last_login_date
string (date-time)
signup_date
string (date-time)
unique_user_name
string
is_user_existin_current_project
boolean
scheme_name
string
initial_tour_shown
boolean
authentication_id
string
email_id
string
profile_logo_url
string
profile_logo_cdn_url
string
is_enterprise_user
boolean
children
Array of object (ArticleIndexChild)
object
id
string
title
string
image
string
description
string
authors
Array of object (User)
object
id
string
customer_id
string (uuid)
status
integer (int32)
Valid values[ 0, 1, 2, 3, -1 ]
first_name
string
last_name
string
user_description
string
fresh_chat_restore_id
string
last_login_date
string (date-time)
signup_date
string (date-time)
unique_user_name
string
is_user_existin_current_project
boolean
scheme_name
string
initial_tour_shown
boolean
authentication_id
string
email_id
string
profile_logo_url
string
profile_logo_cdn_url
string
is_enterprise_user
boolean
documentation_type
integer (int32)
Valid values[ 0, 1, 2 ]
slug
string
updated_at
string (date-time)
order
integer (int32)
children_count
integer (int32)
category_type
integer (int32)

0 - Folder, 1 - Page, 2 - Index

Valid values[ 0, 1, 2 ]
category_type
integer (int32)

0 - Folder, 1 - Page, 2 - Index

Valid values[ 0, 1, 2 ]
content_type
integer (int32)

0 - Markdown content; 1 - HTML content; 2 - Block Content

Valid values[ 0, 1, 2 ]
is_shared_article
boolean

True indicates that the article is shared

extension_data
object (ExtensionDataObject)
success
boolean

Status indication for customer API response

errors
Array of object (BaseError)

Errors in the customer API response

object
extension_data
object (ExtensionDataObject)
stack_trace
string

Stack trace for error response message

description
string

Description for error cause

error_code
string

Error code for Api response

custom_data
object
warnings
Array of object (BaseWarning)

Warning in the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

Warning description

warning_code
string

warning code for customer Api base response

information
Array of object (BaseInformation)

Information passed by the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

status description for customer Api response information

400

Bad Request

Article not found

Kindly verify your articleId and perform the task again. Also verify the langCode (language code) is mismatching.

{
  "data": null,
  "extension_data": null,
  "success": true,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "Article not found",
      "error_code": null,
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Expand All
object
data
object (ArticleVersionDataCustomer)
id
string

The ID of the article

title
string

The title of the article

content
string

If the article editor is Markdown, then the article content will be present in this property

html_content
string

If the article editor is WYSIWYG (HTML), then the content will be present in this property. Note: Markdown editor will also have HTML content (read-only).

category_id
string

The ID of the article's parent category

project_version_id
string

The ID of the project version where the article is located

version_number
integer (int32)

The currently fetched version number of the article

public_version
integer (int32)

The currently published version number of the article

latest_version
integer (int32)

The latest version number of the article

enable_rtl
boolean

True indicates that Right to Left alignment is enabled for the article language

hidden
boolean

False indicates that the article is visible on the site

status
integer (int32)

The status of the category page: 0 - Draft, 1 - In review, 2 - Public, 3 - Published, 4 - Deleted, 5 - Forked

Valid values[ 0, 1, 2, 3, 4, 5 ]
order
integer (int32)

The position inside the parent category

created_by
string

The ID of the team account who created the article

authors
Array of object (User)

The list of contributors in the article

object
id
string
customer_id
string (uuid)
status
integer (int32)
Valid values[ 0, 1, 2, 3, -1 ]
first_name
string
last_name
string
user_description
string
fresh_chat_restore_id
string
last_login_date
string (date-time)
signup_date
string (date-time)
unique_user_name
string
is_user_existin_current_project
boolean
scheme_name
string
initial_tour_shown
boolean
authentication_id
string
email_id
string
profile_logo_url
string
profile_logo_cdn_url
string
is_enterprise_user
boolean
created_at
string (date-time)

The date on which the article was created

modified_at
string (date-time)

The date on which the article was last modified

slug
string

The slug of the article

is_fall_back_content
boolean

True indicates that the article content is a fallback of the default language content

description
string

The description of the article

article_index
object (ArticleIndexData)
id
string
title
string
image
string
description
string
authors
Array of object (User)
object
id
string
customer_id
string (uuid)
status
integer (int32)
Valid values[ 0, 1, 2, 3, -1 ]
first_name
string
last_name
string
user_description
string
fresh_chat_restore_id
string
last_login_date
string (date-time)
signup_date
string (date-time)
unique_user_name
string
is_user_existin_current_project
boolean
scheme_name
string
initial_tour_shown
boolean
authentication_id
string
email_id
string
profile_logo_url
string
profile_logo_cdn_url
string
is_enterprise_user
boolean
children
Array of object (ArticleIndexChild)
object
id
string
title
string
image
string
description
string
authors
Array of object (User)
object
id
string
customer_id
string (uuid)
status
integer (int32)
Valid values[ 0, 1, 2, 3, -1 ]
first_name
string
last_name
string
user_description
string
fresh_chat_restore_id
string
last_login_date
string (date-time)
signup_date
string (date-time)
unique_user_name
string
is_user_existin_current_project
boolean
scheme_name
string
initial_tour_shown
boolean
authentication_id
string
email_id
string
profile_logo_url
string
profile_logo_cdn_url
string
is_enterprise_user
boolean
documentation_type
integer (int32)
Valid values[ 0, 1, 2 ]
slug
string
updated_at
string (date-time)
order
integer (int32)
children_count
integer (int32)
category_type
integer (int32)

0 - Folder, 1 - Page, 2 - Index

Valid values[ 0, 1, 2 ]
category_type
integer (int32)

0 - Folder, 1 - Page, 2 - Index

Valid values[ 0, 1, 2 ]
content_type
integer (int32)

0 - Markdown content; 1 - HTML content; 2 - Block Content

Valid values[ 0, 1, 2 ]
is_shared_article
boolean

True indicates that the article is shared

extension_data
object (ExtensionDataObject)
success
boolean

Status indication for customer API response

errors
Array of object (BaseError)

Errors in the customer API response

object
extension_data
object (ExtensionDataObject)
stack_trace
string

Stack trace for error response message

description
string

Description for error cause

error_code
string

Error code for Api response

custom_data
object
warnings
Array of object (BaseWarning)

Warning in the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

Warning description

warning_code
string

warning code for customer Api base response

information
Array of object (BaseInformation)

Information passed by the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

status description for customer Api response information


Was this article helpful?