Gets all article versions
  • 26 Sep 2023
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Gets all article versions

  • Dark
    Light

Article Summary

Get
/v2/Articles/{articleId}/{langCode}/versions
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

langCode
stringRequired

Language code of the article

Default"en"
Responses
200

Success

Success Status Response

You can verify all the type of versions in a project.

{
  "data": [
    {
      "version_number": 1,
      "created_by": "peter jone",
      "created_at": "2023-09-26T06:34:59.406866Z",
      "modified_at": "2023-09-26T06:34:59.4068665Z",
      "base_version": 0,
      "status": 2,
      "profile_url": "https://www.gravatar.com/avatar/FE29D578CBEC3945FC88BF4F10906A3E"
    }
  ],
  "extension_data": null,
  "success": true,
  "errors": null,
  "warnings": [],
  "information": []
}
Expand All
object
data
Array of object (ArticleSimpleVersionCustomer)

Article version response data

object
version_number
integer (int32)

The version number of the article

created_by
string

Author name

created_at
string (date-time)

The date the article version was created

modified_at
string (date-time)

The last time the article version was modified

base_version
integer (int32)

The version number from which this article version is derived

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]
profile_url
string

Author profile image

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 resonse

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
Array of object (ArticleSimpleVersionCustomer)

Article version response data

object
version_number
integer (int32)

The version number of the article

created_by
string

Author name

created_at
string (date-time)

The date the article version was created

modified_at
string (date-time)

The last time the article version was modified

base_version
integer (int32)

The version number from which this article version is derived

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]
profile_url
string

Author profile image

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 resonse

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?