Skip to content

Get Article Version List

Request

Overview

  • The Get Article Version List API retrieves the version history of an Article in a portal, so that a user can see how the Article has changed over time.
  • A published Article always has at least one published version available.
  • A maximum of the 50 most recent published versions are available, returned with the newest version first.
  • Only published versions are returned.
    • Draft, in-review, and other unpublished versions are never included.
  • Each version lists the editions available to the user under availableEditions. A version may have zero or more editions.
  • The versions that are returned honor the logged-in user's profile and personalized view of the Article, consistent with how Article content is personalized across the portal.
    • A user sees only the versions that their assigned user profile grants access to.
    • The optional publishViewId query parameter returns the editions for a specific publish view. If it is not provided, the publish view from the logged-in user's assigned user profile is used.
  • The content of a version is retrieved separately using the Get Article Versions By IDs API.
Security
oAuthUser(Required scopes:
https://api.egain.cloud/auth/kno...
)
or oAuthOnBehalfOfUser(Required scopes:
https://api.egain.cloud/auth/kno...
)
Path
portalIDstring, [ 7 .. 20 ] characters^[a-zA-Z0-9]{2,4}-\d{4,15}$required

The ID of the portal being accessed.

A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.

Example:PROD-1000
articleIDstring, [ 7 .. 20 ] characters^[a-zA-Z0-9]{2,4}-\d{4,15}$required

The ID of the Article.

An Article ID is composed of a 2-4 letter prefix followed by a dash and 4-15 digits.

Example:PROD-2996
Query
publishViewIdstring, [ 7 .. 20 ] characters^[a-zA-Z0-9]{2,4}-\d{4,15}$

The ID of the publish view for which editions are returned. If not provided, the publish view from the logged-in user's assigned user profile is used.

A publish view ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.

Example:publishViewId=PROD-3203
$langstring(languageCode)

The language used for a resource. Resources available in different languages may differ from each other. If $lang is not passed, then the portal's default language is used.

Enum:"en-US""fr-FR""en-GB""es-ES""it-IT""nl-NL""da-DA""sv-SE""pt-PT""fi-FI"
Example:$lang=en-US
$pagenuminteger, (int64), [ 1 .. 999 ]

Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.

Default:1
$pagesizeinteger, (int64), [ 1 .. 50 ]

Pagination parameter that specifies the number of published versions to return per page. Used in conjunction with $pagenum.
Valid range of 1-50.
Default value: 5

Default:5
Headers
Accept-Languagestringrequired

The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).

Enum:"en-US""en-GB""es-ES""fr-FR""it-IT""de-DE""nl-NL""pt-BR""pt-PT""da-DK"
Example:en-US
x-egain-activity-idstring, [ 4 .. 9 ] characters^[0-9]{4,9}$

A unique numeric interaction identifier from eGain.

Example:59237
x-ext-integration-idstring, <= 40 characters^[\w\W]+$

The unique numeric identifier for a tenant, used in self-service functionality as well as third-party integrations.

Note: The x-ext-integration-id and x-ext-interaction-id headers must always be provided together and cannot be supplied independently.

The x-egain-activity-id may be provided on its own, or it may be provided along with both x-ext-integration-id and x-ext-interaction-id.

Examples:
uuid
3155180e-0c13-43e9-9c38-e9045bcbf176
hex
00Dbn00000IxGnx
x-ext-interaction-idstring, <= 40 characters^[\w\W]+$

A unique interaction identifier from other CRM applications.

Note: The x-ext-integration-id and x-ext-interaction-id headers must always be provided together and cannot be supplied independently.

The x-egain-activity-id may be provided on its own, or it may be provided along with both x-ext-integration-id and x-ext-interaction-id.

Examples:
uuid
3155180e-0c13-43e9-9c38-e9045bcbf176
hex
00Dbn00000IxGnx
curl -i -X GET \
  'https://api.egain.cloud/knowledge/portalmgr/v4/portals/PROD-1000/articles/PROD-2996/versions?publishViewId=PROD-3203&%24lang=en-US&%24pagenum=1&%24pagesize=5' \
  -H 'Accept-Language: en-US' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'x-egain-activity-id: 59237' \
  -H 'x-ext-integration-id: 3155180e-0c13-43e9-9c38-e9045bcbf176' \
  -H 'x-ext-interaction-id: 3155180e-0c13-43e9-9c38-e9045bcbf176'

Responses

Success

Bodyapplication/json
versionsArray of objects, [ 1 .. 50 ] items(VersionResult)

Published version details. A maximum of the 50 most recent versions are available, returned with the newest version first. Each version exposes the editions available to the user; a version may have zero or more editions.

paginationInfoobject(PaginationInfo)
Response
{ "versions": [ { … }, { … }, { … } ], "paginationInfo": { "count": 3, "pagenum": 1, "pagesize": 5 } }