Start a conversation

Create a Knowledge Base Article

You can create a knowledge base article on a knowledge base board or any knowledge base board that you prefer.

Requirements

You must have the Start discussions and new content permission set to Grant by Administrator.

Knowledge Base Permission
Knowledge Base Permission

Basic Steps

  1. Open the knowledge base board where you want to create a knowledge base article.
  2. Identify the ID of the knowledge base board from the URL of the board as described in the Create a Forum.
  3. Ensure that you have the necessary permission to create the knowledge base article granted by the Administrator.
  4. Create a POST request to create a knowledge base article.

Example

Create a Knowledge Base Article

In this example, we are going to create a knowledge base article in the Water resources board using a GraphQL query.
After you have created a blog message on the board, make sure you have received success as a response.

  1. Sign in to your community.
  2. Go to the Water Resources Board.
  3. Make a note of the ID of the board.
  4. Make a GraphQL POST request to the board.

The ID of the Klass Forum Board is water-resources-board.

Here is the GraphQL POST request and response to create a blog article.


mutation createTkbArticle($createInput:CreateTkbArticleInput!) {
   createTkbArticle(createInput: $createInput) {
        result {
            id
            body
            subject
            introduction
            contentWorkflow {
                state
            }
        }
   }
}

The mutation here initiates a createBlogArticle function using information passed through GraphQL variables. Here is an example to create a blog article.


{
   "createInput":{
        "subject":"Micro Crime City ",
        "body": "If you're a fan of Where's Waldo and other hidden clues games, check out Micro Macro Crime City. You can play this mystery game solo or with others.",
        "teaser": "Micro Crime City is a puzzle game",
        "introduction": "This cooperative detective game is set in a whimsical city riddled with crime. The map is chock full of tiny details and awesome things to explore. Most cases start with a dead body and questions you need to answer in order to find the killer. Players work together to solve crimes on a massive map. The map is about 2.5' x 3.6'.",
        "board":{
            "id":"BOARD:water-resources-board"
        }
    }
}

Here is the response to the above example.


{
    "data": {
        "createTkbArticle": {
            "result": {
                "id": "message:404",
                "body": "If you're a fan of Where's Waldo and other hidden clues games, check out Micro Macro Crime City. You can play this mystery game solo or with others.",
                "subject":"Micro Crime City ",
                "introduction": "This cooperative detective game is set in a whimsical city riddled with crime. The map is chock full of tiny details and awesome things to explore. Most cases start with a dead body and questions you need to answer in order to find the killer. Players work together to solve crimes on a massive map. The map is about 2.5' x 3.6'.",
                "contentWorkflow": {
                    "state": "PUBLISH"
                }
            }
        }
    }
}
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted
  3. Updated

Comments