The article record is the parent container of all versions of an article, whatever the publishing status (draft, published, archived) and the language. While KnowledgeArticle and KnowledgeArticleVersion represent any article in the Knowledge Base, __ka and __kav are the concrete representation of respectively KnowledgeArticle (“__ka” suffix) and KnowledgeArticleVersion (“__kav” suffix) for a specific article type. For example, Offer__kav gives access to every Offer articles. KnowledgeArticle and __ka give access to an article independent of its version. KnowledgeArticleVersion and __kav enables you to retrieve a specific article version and all its standard (KnowledgeArticleVersion) and custom (__kav) fields.
Article Type__ka
Gives access to an article from a specific article type independent of its version. This object is read–only and can't be used in a SOQL clause or in a WITH DATA CATEGORY DataCategorySpec SOSL clause. For more information, see KnowledgeArticle.
KnowledgeArticle
Gives access to an article independent of its version. This object is read–only and can't be used in a SOQL clause or in a WITH DATA CATEGORY DataCategorySpec SOSL clause.
At the API level, that capability of allowing multiple versions of an article at the same time induces a dual object structure. For example for an article type FAQ, you have two objects available in the API, FAQ_ka and FAQ_kav***, the former being mostly just a container, or a stable pointer to the article, when the later represents each version with their content. Those objects, allow access to only FAQ article types and all article types at once.
The word inherit, that is underlined above has its importance. All article types inherit from a common entity that is used for cross article types access. That entity is represented by the (dual) object, KnowledgeArticle and KnowledgeArticleVersion.
To the contrary of what you are doing with __ka" or "__kav" objects, which allows accessing records of one article type, including custom fields, KnowledgeArticle and KnowledgeArticleVersion objects allow you to query the entire knowledge base at once, across all article types, but do not give access to custom fields.
I'm not fully up to date with Salesforce Knowledge articles, but I did find Retrieve a Version of an Article in the Salesforce Knowledge Developer's Guide.
It's a bit short on details, which I suspect is related to the API being in pre-release.
There is also the Salesforce Knowledge Objects Data Model. It has plenty of polymorphic references to other sObjects, but nothing that stands out as "content" to me.
The knowledge article data model is polymorphic in nature.
Hence the creation of the knowledge article process is similar to creation of any other record except we have articletype appended by __kav to get the object name.
Hence to create initial version via API i would use the same calls as I use for other objects.
You will have to insert a knowledge article using the API as below:
curl https://na1.salesforce.com/services/data/v20.0/sobjects/FAQ__kav/ \
-H "Authorization: Bearer token \
-H "Content-Type: application/json" \
-d @newaccount.json"
# newaccount.json:
{
"summary" : "Express Logistics and Transport"
//Include various fields here
}
Remember to set up REST API you will first have to OAUTH with salesforce or obtain session ID using login() call
Also once you draft an article you can manage its lifecycle through various API documented in chapter four of the guide.
Best Answer
From Articles
From Inside Salesforce Knowledge (1): Objects / Data Model
See also: