# Get Article by ID ## Overview * The Get Article by ID API allows a user or client application to retrieve an Article using its ID. * It requires a Portal ID, which a user or client application can retrieve through the Administrative Console or by calling Get All Portals API. * Additional Article attributes and contextual views can be specified in the query parameters. * This API returns structured authoring attributes of Issue, Environment, Cause and Confidence Level when the following conditions are met: * The "Allow Structured Authoring" setting is enabled at the partition/department level through the Administrative Console. * The "Use Structured Authoring" flag is set on the article type. ## Prerequisites * Agents without a user profile and customers in a portal without a default user profile only have access to articles that: * Do not contain any access tags. * Do not contain any publish views. * Contain publish views without any associated tags. * Agents with a user profile and customers in a portal with a default user profile have access to articles that: * Do not contain any access tags. * Do not contain any publish views. * Contain publish views without any associated tags. * Contain access tags that are also in the assigned user profiles. * Contain publish views with associated tags that are also in the assigned user profiles. * Agents with the following assigned actions can view updates to articles currently being processed in workflows: * View Author Portal – Allows agents to view updates to articles at any stage in a workflow. * View Staging Portal – Allows agents to view updates to articles in the Staging stage or a subsequent stage in a workflow. Endpoint: GET /portals/{portalID}/articles/{articleID} Security: oAuthUser, oAuthCustomer, oAuthOnBehalfOfUser, oAuthOnBehalfOfCustomer, oAuthAnonymousCustomer ## Header parameters: - `x-egain-activity-id` (string) A unique numeric interaction identifier from eGain. Example: "59237" - `x-ext-integration-id` (string) 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. - `x-ext-interaction-id` (string) 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. - `Accept-Language` (string, required) The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses). Enum: "en-US", "es-ES", "fr-FR", "it-IT", "de-DE", "nl-NL", "pt-BR", "pt-PT", "da-DK", "ru-RU", "fr-CA", "zh-CN", "ja-JP", "ko-KR", "sv-SE" ## Path parameters: - `portalID` (string, 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" - `articleID` (string, 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 parameters: - `$lang` (string) The language that describes the details of 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", "no-NB", "no-NN", "ja-JA", "de-DE", "pt-BR", "zh-CN", "zh-TW", "ko-KO", "ru-RU", "el-EL", "tr-TR", "pl-PL", "cs-CS", "sk-SK", "hu-HU", "sr-SR", "ar-SA", "hr-HR", "ro-RO", "th-TH", "de-AT", "vi-VN", "id-ID", "ms-MY", "fil-PH", "fr-CA", "hi-IN", "uk-UA", "bg-BG", "sl-SI", "xx-XX" - `articleAdditionalAttributes` (array) The attributes of an Article to be returned in addition to the default list of attributes, listed below. Multiple additional attributes can be specified using a comma-separated list. Passing 'all' will return all attributes. #### Default Attributes These Article attributes are always returned: | Name | Description | ---- | ----------- | id | The ID of the Article. | name | The name of the Article. | additionalInfo | Additional information provided as Article metadata. | articleType | The Article type and its attributes. | articleKeywords | A comma-separated list of keywords associated with this Article. | articleState | The current state of the Article. States include A (Authoring), S (Staging), and P (Published). | articleSummary | A brief summary of the Article, provided as metadata. | createdBy | The ID, first name, middle name and last name of the user that created the Article. | createdDate | The date that the Article was created. | departmentId | ID of the department for which this Article belongs to. | description | The Article's description. | expirationDate | The date that the Article is set to expire. | attachments | The Article's attachments | imageURL | The URL of the image that is present in the Article version. It is used as the thumbnail image for the Article. | includeInGenAI | Indicates whether this Article is used for eGain's generative AI features. | isSubscribed | Indicates whether the Article is subscribed for notifications. | languageCode | The language code of the Article language. | link | The link object, used to retrieve the details of the Article. | modifiedBy | The ID, first name, middle name and last name of the user that last modified the Article. | modifiedDate | The date that the Article was last modified on. | topicBreadcrumb | Contains a list of topics from the top-level topic to this Article. There may be multiple paths. | versionId | The ID of the Article version that is returned. Enum: "articleMacro", "availabilityDate", "availableEditions", "averageRating", "bookmarkStatus", "content", "contentText", "compliance", "timesRated", "createdBy.userName", "modifiedBy.userName", "ownedBy", "ownedBy.userName", "workflow", "all" - `$customAdditionalAttributes` (string) One or more comma-separated names for custom attributes defined by the user to be returned. - `accessSource` (string) Provides information about the method in which the Article is accessed and is used for self-service analytics. Refer to the eGain User Guide regarding "Article View Contexts". | Name | Description | ---- | ----------- | article_view | View an Article directly using its ID. | article_view_more_related_Article | View related articles of an Article using its ID. | article_view_basic_search | View an Article via a basic search. | article_view_adv_search | View an Article via an advanced search. | article_view_guided_help | View an Article via a Guided Help solution. | article_view_browse_topic | View an Article via browsing a topic. | article_view_browse_tree | View an Article via browsing a topic tree. | article_view_popular_articles | View an Article using the Popular Items list in the Self-Service portal. | article_view_useful_items | View Article using the Useful Items list in the Self-Service portal. | article_view_widget | View an Article via a widget. | article_view_announcement | View an Article from the announcement section in the Self-Service portal. | article_view_bookmarked | View a bookmarked Article. | article_view_subscription_notification | View an Article from a subscription notification. | article_view_guided_help_additional_info | View an Article via additional information from a Guided Help search. | view_articles_pending_compliance | View an Article via Read & Sign in the Self-Service portal. | type_ahead_Suggestion | View an Article from a type-ahead Suggestion in the Self-Service portal. | semantic_Suggestion | View an Article from a semantic Suggestion in the Self-Service portal. | instant_answer | View an Article via an Instant Answers solution. | instant_answer_reference | View an Article that is used as a reference for an Instant Answers solution. Enum: "article_view", "article_view_more_related_Article", "article_view_basic_search", "article_view_adv_search", "article_view_guided_help", "article_view_browse_topic", "article_view_browse_tree", "article_view_popular_articles", "article_view_useful_items", "article_view_widget", "article_view_announcement", "article_view_bookmarked", "article_view_subscription_notification", "article_view_guided_help_additional_info", "view_articles_pending_compliance", "type_ahead_Suggestion", "semantic_Suggestion", "instant_answer", "instant_answer_reference" - `publishViewId` (string) The ID of a publish view for an Article. A publish view is a set of tags used to generate multiple editions of the same Article for display on the self-service portal. Publish views are used in conjunction with single sourcing to tailor the content of an Article to a specific audience by granting access to an Article's version to users that possess the same tags.A publish view ID is composed of a 4-letter prefix, followed by a dash and 4-15 digits. - `workflowMilestone` (string) For agents with the View Author Portal or View Staging Portal actions, this determines which version of the Article is returned.'Authoring' returns the most recent version of an Article checked-in by an author.'Staging' returns the updated version currently being processed in a workflow.'Publish' returns the most recently published version. Enum: "authoring", "staging", "publish" ## Response 200 fields (application/json): - `id` (string, 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. - `additionalInfo` (string) Additional information about the Article. Max 1 KB. - `articleMacro` (string) The name of the macro associated with this Article. - `articleType` (object) The type of the Article and its attributes. - `articleType.articleCategoryId` (integer) Specifies the article category ID. - `articleType.typeName` (string) Indicates the article type name. - `articleType.useStructuredAuthoring` (boolean) Indicates whether structured authoring is enabled for this article type, requiring content to be created using predefined fields - `articleType.articleTypeId` (string) The ID of the Article Type. Example: "932100000002020" - `articleKeywords` (string) A comma-separated list of keywords associated with this Article. 1 KB max size limit. - `articleSummary` (string) A brief summary of the Article, provided as metadata. 1 KB max size limit. - `attachments` (array) The attachments of the Article. - `attachments.id` (string) The ID of the attachment. Example: "PROD-1001" - `attachments.name` (string) The name of the attachment. - `attachments.size` (integer) The size of the attachment in bytes. The maximum size is limited to 25MB. - `attachments.type` (string) The type of attachment. Enum: "INTERNAL", "EXTERNAL" - `attachments.link` (object) Defines the relationship between this resource and another object. - `attachments.link.rel` (string) Defines the relationship between a linked resource and the current object.For example: self, prev, next or an object name such as 'user', 'folder' etc. - `attachments.link.href` (string) The URL that specifies the link's destination. - `availabilityDate` (string) The date on which the Article version is available. - `availableEditions` (array) The editions of this Article that are available to the user. - `availableEditions.id` (string) The ID of the article edition.An edition ID is composed of a 4-letter prefix, followed by a dash and 4-15 digits. - `availableEditions.name` (string) The alphanumeric name of the edition. - `availableEditions.isContentEdition` (boolean) The presence of this element indicates that this edition is the one corresponding to the returned content. This can only be true for at most one element in the list of editions. This parameter must only be returned if article content is returned as well. The only allowed value is true. The absence of this parameter in the response indicates false. - `availableEditions.publishProfile` (object) The publish view associated with this edition. - `availableEditions.publishProfile.id` (string, required) The ID of the Publish Profile.An Publish Profile ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits. - `availableEditions.publishProfile.name` (string, required) The name of the profile. - `averageRating` (number) The average rating of the Article. - `content` (string) The Article content. The maximum allowed Article content size is 5 MB. - `contentText` (string) The plaintext version of the Article content, which does not have the HTML tags and rich formatting present in content. The maximum allowed Article content size is 5 MB. - `createdBy` (object, required) - `createdBy.id` (string) The ID of the user that created this resource. - `createdBy.userName` (string) The resource creator's username. - `createdBy.firstName` (string) The resource creator's first name. - `createdBy.middleName` (string) The resource creator's middle name. - `createdBy.lastName` (string) The resource creator's last name. - `modifiedBy` (object) - `modifiedBy.id` (string) The ID of the user that modified this resource. - `modifiedBy.userName` (string) The resource modifier's username. - `modifiedBy.firstName` (string) The resource modifier's first name. - `modifiedBy.middleName` (string) The resource modifier's middle name. - `modifiedBy.lastName` (string) The resource modifier's last name. - `ownedBy` (object) - `ownedBy.id` (string) The ID of the user that owns this resource. - `ownedBy.userName` (string) The resource owner's username. - `ownedBy.firstName` (string) The resource owner's first name. - `ownedBy.middleName` (string) The resource owner's middle name. - `ownedBy.lastName` (string) The resource owner's last name. - `createdDate` (string) - `customAttributes` (array) A list of custom attributes. - `customAttributes.name` (string) The custom attribute's name. - `customAttributes.value` (array) The custom attribute's values. - `customAttributes.type` (string) The custom attribute's type. Enum: "STRING", "INTEGER", "BOOLEAN", "DATETIME" - `departmentID` (string) ID of the Article's department. - `description` (string) A description of the Article. The maximum allowed Article description size is 1 KB. - `expirationDate` (string) Date of Article expiration if Article expires otherwise empty. - `imageURL` (string) The URL of an image to be associated with the Article. - `includeInGenAI` (boolean) Indicates whether the Article is included for Generative AI. - `isSubscribed` (boolean) Indicates whether the Article is subscribed for notifications. - `modifiedDate` (string) The date on which the Article was last modified. - `languageCode` (string) Language code of the resource's language. Enum: "en-US", "fr-FR", "en-GB", "es-ES", "it-IT", "nl-NL", "da-DA", "sv-SE", "pt-PT", "fi-FI", "no-NB", "no-NN", "ja-JA", "de-DE", "pt-BR", "zh-CN", "zh-TW", "ko-KO", "ru-RU", "el-EL", "tr-TR", "pl-PL", "cs-CS", "sk-SK", "hu-HU", "sr-SR", "ar-SA", "hr-HR", "ro-RO", "th-TH" - `name` (string, required) The name of the Article. - `structuredAuthoringFields` (object) - `structuredAuthoringFields.confidenceLevel` (object) - `structuredAuthoringFields.confidenceLevel.value` (string) A string that indicates the value. - `structuredAuthoringFields.confidenceLevel.displayValue` (string) Localized string of the value element. - `structuredAuthoringFields.issue` (string) Describes the problem, symptom, or question the article addresses. - `structuredAuthoringFields.environment` (string) Specifies the relevant product(s), category, or business process tied to the issue. - `structuredAuthoringFields.cause` (string) Identifies the underlying cause of the issue. - `articleState` (string) The Article's state. - `timesRated` (integer) The number of times that this Article has been rated. - `topicBreadcrumb` (array, required) A list of topics from the root topic to this Article. There may be multiple paths. - `topicBreadcrumb.topicSummary` (array) An instance of TopicSummary. - `topicBreadcrumb.topicSummary.id` (string) The alphanumeric ID of the topic.A topic ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits. Example: "PROD-1921" - `topicBreadcrumb.topicSummary.name` (string) The name of the topic. - `versionId` (string) The ID of this version of the Article. - `workflow` (object) The Article's workflow. - `workflow.stages` (array) An array of stages for the workflow. - `workflow.stages.name` (string) The name of the stage. - `workflow.stages.milestone` (object) A resource's workflow milestone. - `workflow.stages.milestone.name` (object) The identifiers of the milestone. - `workflow.stages.milestone.name.value` (string) The name of the milestone. - `workflow.stages.milestone.name.displayValue` (string) The readable name of the milestone. - `compliance` (object) This schema contains the compliance details for an Article. - `compliance.startDate` (object) The start date for the Article. - `compliance.startDate.date` (string, required) The date in the format YYYY-MM-DDTHH:MM:SS. - `compliance.dueDate` (object) The end date for the Article. - `personalization` (object) Personalization allows the filtering of search results and controls the access to articles and article editions. - `personalization.accessTags` (object) - `personalization.accessTags.tagCategory` (array) An array of tag categories. Note that the total number of tag categories cannot exceed 20. - `personalization.accessTags.tagCategory.name` (string) The name of the tag category. - `personalization.accessTags.tagCategory.id` (string) The ID of the tag category. A tag category ID is composed of a 4-letter prefix, followed by a dash and 4-15 digits. - `personalization.accessTags.tagCategory.tags` (object) - `personalization.accessTags.tagCategory.tags.tag` (array) An array of tags. - `personalization.accessTags.tagCategory.tags.tag.name` (string) Example: "Blue" - `personalization.accessTags.tagCategory.tags.tag.id` (string) Example: "PROD-13206" - `personalization.accessTags.tagCategory.tagGroups` (object) - `personalization.accessTags.tagCategory.tagGroups.tagGroup` (array) An array of tag groups. - `personalization.filters` (object) - `personalization.publishViews` (object) - `personalization.publishViews.publishView` (array) Publish views allow authors to tailor the contents of an article to different audiences by controlling visibility of certain article content using tags.The total number of publish views is limited to 20. - `personalization.publishViews.publishView.name` (string) name of the publish view - `personalization.publishViews.publishView.tagCategories` (array) Tag categories are comprised of both tags and tag groups.Note that the total number of tag and tag groups cannot exceed 20. - `personalization.publishViews.publishView.tagCategories.tagCategory` (array) - `bookmarkStatus` (object) Article Bookmark Status - `bookmarkStatus.isBookmarked` (boolean, required) Indicates whether the Article is bookmarked - `bookmarkStatus.bookmarkID` (integer,null) The ID of the Bookmark, if Article is bookmarked. - `bookmarkStatus.folderBreadcrumb` (object) This schema contains one or more FolderSummary instances. - `bookmarkStatus.folderBreadcrumb.folderSummary` (array) An instance of FolderSummary. - `bookmarkStatus.folderBreadcrumb.folderSummary.id` (integer) ID of the folder. - `bookmarkStatus.folderBreadcrumb.folderSummary.name` (string) Name of the folder. - `bookmarkStatus.folderBreadcrumb.folderSummary.link` (object) - `bookmarkStatus.folderBreadcrumb.folderSummary.link.rel` (string) Defines the relationship between a linked resource and the current document.For example: self, prev, next or an object name such as 'user', 'folder' etc. - `bookmarkStatus.folderBreadcrumb.folderSummary.link._default` (boolean) Determines if this is a default link. ## Response 400 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 401 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 403 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 404 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 406 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 500 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 204 fields