This module can be used to return information about an article with the supplied article ID. Various security checks and detail levels can be set. Requesting a template ID instead of an article returns and empty article structure for that template type which can then be used with iCM_obj_articleUpdate to create a new article.
Properties
Name | Type | Description |
---|---|---|
ArticleID | Integer, optional | Set this to retrieve the contents of an existing article |
ArticleTemplateID | Integer, required | The ID of an installed template. Set this to return the default structure an article of this template type should use. The default structure has default dates, template ID and archiveable states set but is otherwise empty |
UserID | Integer, optional | A website user ID. Article content will only be returned if this user has access to the article. Without a UserID only non-secure article content will be returned. It is also possible to override security |
GroupList | String, optional | A comma separated list of website user group IDs the supplied UserID is in to optimise performance (otherwise serves no purpose) |
Preview | Boolean, optional | Set true of you need to retrieve an article in the preview table (in practice, work in progress articles) |
DetailLevel | String, optional | The detail level returned, see below |
OverrideSecurity | Boolean, optional | Default false - secure articles will not be returned unless a UserID with access is set. If true any article can be retrieved. If set the STATE response object includes information about the security override. Article body text blocks are never returned when overriding security unless OverrideSecurityText is also true ACCESS GRANTED - The article wasn't secure SECURE ACCESS GRANTED - The supplied user had access to the article anyway SECURE ACCESS DENIED - The supplied user didn't have access but you've overridden the security |
OverrideSecurityText | Boolean, optional | Set true to also return article body text when overriding security |
GetExtensionData | Boolean, optional | Set true to return the article extra data. Default false |
Lock | Boolean, optional | If true the article will be locked to the supplied CSUserName until unlocked in iCM or updated using iCM_obj_articleUpdate |
CSUserName | String, optional | An iCM username to lock the article to while getting it |
Datasource | String, optional | The name of a datasource to retrieve data from. Defaults to the iCM datasource |
Detail Level
Setting the detail level determines the level of detail returned by the get request. The default level is ALL.
Level | Description |
---|---|
ID | Retrieves ArticleID only |
SUMMARY | Retrieves ArticleID, ArticleHeading, ArticleIntroText, TemplateID, ArticleDisplay ArticleLinkText and ArticleSummary |
DETAIL | Retrieves all article data, except for ArticleText, ArticleTextAdditional and related content IDs |
ALL | Retrieves all article data, except for related content IDs |
ALL_PLUS_RELATED | Retrieves all article data |
Returns
Name | Type | Description |
---|---|---|
Archiveable | Boolean | If true the article will be archived on the ArchiveDate |
ArchiveDate | DateTime, Required if Archiveable:true | The date on which the article will be archived. Dates in an ISO 8601 combined format, ie "2018-02-01T00:00:00Z" |
ArchiveParentID | Integer, Required if Archiveable:true | The parent beneath which the article will move on its archive date |
ArticleDate | DateTime | The creation date and time of the article. This will always be "now" but needs to be supplied as an empty string |
ArticleDisplay | String | Either "on" or "off". Defaults to "on" (the article is visible on the site) |
ArticleDisplayDate | DateTime | The date and time from which the article will display. Defaults to the article create date/time if left blank. Dates in an ISO 8601 combined format, ie "2018-02-01T00:00:00Z" |
ArticleDisplayEDate | DateTime | The date and time until which the article will display. Defaults to 100 years in the future if left blank. Dates in an ISO 8601 combined format, ie "2018-02-01T00:00:00Z" |
ArticleHeading | String, Required | The article's heading text |
ArticleID | Integer, Required | The ID of the article to be updated. Set as 0 to create a new article |
ArticleIntroText | String | The article introductory text |
ArticleParentID | Integer, Required | The article ID beneath which the article will be created/updated |
ArticleReviewDate | DateTime | The date and time on which the article update is due (whether explicitly set or calculated form the ReviewInterval). Leave blank for no review. Dates in an ISO 8601 combined format, ie "2018-02-01T00:00:00Z" |
ArticleReviewInterval | String | The number of hours between reviews. Leave blank for no review |
ArticleSummary | String | The article summary text |
ArticleTemplateID | Integer, Required | The ID of the template the article will use |
ArticleText | String | The article body text. HTML will be tidied, and unsupported HTML elements removed, following the standard behaviour of the article editor |
ArticleTextAdditional | Object | Additional text blocks, other than the body text, are returned as an object in the format {"BLOCKID": "<p>Text</p>"} |
BoostedKeywords | String | A comma separated list of the article's boosted keywords |
BoostValue | Integer | The search boost value, -10 to +10 |
ChildArticleIDs | String | A comma separated list of child article IDs. If manual ordering of articles is enabled this property can be used to reorder the child articles. Otherwise ignored |
Extension | Object | The article's extension data. This MUST be supplied if the article's template specifies extension data |
FriendlyURL | String | The article's friendly URL |
LocationIndex | Integer | The ordering position where this article will be inserted within its siblings below the parent article if manual of articles is enabled. Otherwise ignored |
OwnerID | Integer | The ID of an iCM user to set as the article owner. Defaults to the ID of the user creating the article (ie the user provided by the API Key) |
RelatedArticleList | String | A comma separated list of content IDs to relate to this article |
RelatedEventList | String | A comma separated list of content IDs to relate to this article |
RelatedFeatureList | String | A comma separated list of content IDs to relate to this article |
RelatedFormList | String | A comma separated list of content IDs to relate to this article |
RelatedForumList | String | A comma separated list of content IDs to relate to this article |
RelatedLinkList | String | A comma separated list of content IDs to relate to this article |
RelatedMediaList | String | A comma separated list of content IDs to relate to this article |
RelatedMetaDataList | String | A comma separated list of content IDs to relate to this article |
RelatedPollList | String | A comma separated list of content IDs to relate to this article |
RelatedProductList | String | A comma separated list of content IDs to relate to this article |
RelatedRackList | String | A comma separated list of content IDs to relate to this article |
SecureUserList | String | A comma separated list of site user group IDs this article is secured to |
Example
function(params, credentials) {
let getArticle = this.callWorkerMethod("icmapi", "iCM_obj_articleGet", {
"attributes": {
"ArticleID": 57,
"UserID": 3,
"GetExtensionData": true,
"OverrideSecurity": true
}
});
return getArticle;
}
{
"id": 124,
"result": {
"CONTENT": {
"ArticleDate": "Thu Jan 04 09:54:49 GMT 2024",
"BoostedKeywords": "",
"ArticleHeading": "My New Article",
"ArticleIntroText": "",
"ArticleReviewNotes": "",
"ArticleSummary": "",
"ArchiveDate": "Mon Jan 04 09:54:48 GMT 2123",
"BestLinkText": "My New Article",
"Archiveable": "No",
"OwnerID": 21,
"ArticleLinkText": "",
"ArticleTemplateID": 1,
"FriendlyURL": "",
"ChildArticleIDs": "",
"ArticleReviewInterval": 0,
"ArticleID": 3608,
"LastModifiedDate": "Thu Jan 04 09:54:49 GMT 2024",
"ArticleUserID": 21,
"BoostValue": 0,
"ArticleDisplay": "on",
"ArticleText": "",
"ArticleReviewDate": "",
"ArticleDisplaydate": "Thu Jan 04 09:54:48 GMT 2024",
"ArticleDisplayedate": "Mon Jan 04 09:54:48 GMT 2123",
"ArticleParentID": 3424,
"ArchiveParentID": "",
"OwnerType": "User"
},
"STATE": {
"Status": "ACCESS GRANTED",
"Message": ""
}
},
"jsonrpc": "2.0"
}