Exposes the articles api to widgets,themes and automation.
Properties
Name | Access | Type | Description |
---|---|---|---|
ArticleContentViewTypeId | Read | Guid | Id used to track a view to the article. DEPRECATED in v12.1: Use the default view type '00000000-0000-0000-0000-000000000000' instead. |
ContentTypeId | Read | Guid | Content Type Id |
Current | Read | Article | Current |
Methods
Delete
Velocity
#set($additionalInfoResponse = $articles_v1_articles.Delete($id))
JavaScript
var additionalInfoResponse = articles_v1_articles.Delete(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Guid | Id of the article to delete | Required |
Returns
Get
Velocity
#set($articleResponse = $articles_v1_articles.Get("%{ ArticleCollectionId = $articleCollectionIdArg, Id = $idArg, Identifier = $identifierArg }"))
JavaScript
var articleResponse = articles_v1_articles.Get({ ArticleCollectionId: articleCollectionIdArg, Id: idArg, Identifier: identifierArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ArticleCollectionId | Guid | Id of the article collection. Required if passing Identifier | Optional | ||
Id | Guid | Id of the article to return, either Id or ArticleCollectionId and Identifier are required. | Optional | ||
Identifier | String | Identifier of the article to return, must provide ArticleCollectionId as well. | Optional |
Returns
IncrementViewCount
Increments the view count for an article
Velocity
$articles_v1_articles.IncrementViewCount($articleId)
JavaScript
articles_v1_articles.IncrementViewCount(articleId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
articleId | Guid | Article Id | Required |
Returns
NothingList
List Overload 1
Velocity
#set($pagedListResponse = $articles_v1_articles.List())
JavaScript
var pagedListResponse = articles_v1_articles.List();
List Overload 2
Velocity
#set($pagedListResponse = $articles_v1_articles.List("%{ ArticleCollectionId = $articleCollectionIdArg, ArticleCollectionIds = $articleCollectionIdsArg, ArticleIds = $articleIdsArg, AuthorId = $authorIdArg, CategoryIds = $categoryIdsArg, HasScheduledUpdate = $hasScheduledUpdateArg, InCategory = $inCategoryArg, IncludeArticleTypeIds = $includeArticleTypeIdsArg, IsDefault = $isDefaultArg, IsDeleted = $isDeletedArg, IsPublished = $isPublishedArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, PublishAfterDate = $publishAfterDateArg, PublishBeforeDate = $publishBeforeDateArg, PublishGroupId = $publishGroupIdArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, Tags = $tagsArg, WasPublished = $wasPublishedArg }"))
JavaScript
var pagedListResponse = articles_v1_articles.List({ ArticleCollectionId: articleCollectionIdArg, ArticleCollectionIds: articleCollectionIdsArg, ArticleIds: articleIdsArg, AuthorId: authorIdArg, CategoryIds: categoryIdsArg, HasScheduledUpdate: hasScheduledUpdateArg, InCategory: inCategoryArg, IncludeArticleTypeIds: includeArticleTypeIdsArg, IsDefault: isDefaultArg, IsDeleted: isDeletedArg, IsPublished: isPublishedArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, PublishAfterDate: publishAfterDateArg, PublishBeforeDate: publishBeforeDateArg, PublishGroupId: publishGroupIdArg, SortBy: sortByArg, SortOrder: sortOrderArg, Tags: tagsArg, WasPublished: wasPublishedArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ArticleCollectionId | Guid | Used to filter articles by a specific article collection. | Optional | ||
ArticleCollectionIds | String | Comma separated list of article collection id's to filter articles by. | Optional | ||
ArticleIds | String | Comma separated list of article ids to filter by. | Optional | ||
AuthorId | Int32 | Id of the author of the article. | Optional | ||
CategoryIds | String | Comma separated list of category id's. Used to filter articles by specific categories. | Optional | ||
HasScheduledUpdate | Boolean | Whether the article has active unpublished versions that are ready to publish. | Optional | ||
InCategory | Boolean | Allows filtering only article versions within or not within a category. Ignored if CategoryIds is passed in. | Optional | ||
IncludeArticleTypeIds | String | Comma separated list of article type ids to filter the articles by. | Optional | ||
IsDefault | Boolean | Allows filtering articles that are the default of a category or a collection. | Optional | ||
IsDeleted | Boolean | Filters articles that have been deleted. | Optional | False | |
IsPublished | Boolean | Filter to return articles by their IsPublished value. | Optional | True | |
PageIndex | Int32 | The page index to return based on page size. This value is 'zero' based and defaults to zero. | Optional | ||
PageSize | Int32 | The total amount of articles to return per paged request. The default is 20, the maximum is 100. | Optional | ||
PublishAfterDate | DateTime | Include only articles with a publish date after the provided date. | Optional | ||
PublishBeforeDate | DateTime | Include only articles with a publish date before the provided date. | Optional | ||
PublishGroupId | Int32 | Id of the publish group in which the article has active versions. | Optional | ||
SortBy | String | The sort option for the articles. | Optional | ArticleIds, DeleteDate, LastUpdateDate, PublishDate, SortOrder, Title, TotalHelpfulRatings, TotalNotHelpfulRatings | |
SortOrder | String | The direction to sort the articles by based on the current SortBy options. The options are 'Ascending' or 'Descending'. 'Ascending' is the default. | Optional | ||
Tags | String | Comma separated list of tags to filter articles by. | Optional | ||
WasPublished | Boolean | Articles that have been published but are no longer published and do not have a draft. | Optional |
Returns
Lookup
Lookup Overload 1
Velocity
#set($apiListResponse = $articles_v1_articles.Lookup($query))
JavaScript
var apiListResponse = articles_v1_articles.Lookup(query);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
query | String | Query | Required |
Lookup Overload 2
Velocity
#set($apiListResponse = $articles_v1_articles.Lookup($query, "%{ ArticleCollectionId = $articleCollectionIdArg }"))
JavaScript
var apiListResponse = articles_v1_articles.Lookup(query, { ArticleCollectionId: articleCollectionIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
query | String | Query | Required | ||
options | Options | Set of optional parameters including: | Required | ||
ArticleCollectionId | Guid | The ID of the ArticleCollection to search for articles. | Optional |
Returns
Undelete
Velocity
#set($articleResponse = $articles_v1_articles.Undelete($id))
JavaScript
var articleResponse = articles_v1_articles.Undelete(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Guid | Id of the article to undelete | Required |