Getting started with Knowledge Accelerators
A project administrator can import the Knowledge Accelerators into Watson Knowledge Catalog using RESTful API endpoints.
Watch this video showing how to import the Knowledge Accelerators into Watson Knowledge Catalog (CC).
Requirements and permissions
- Offering plan
- You can add Knowledge Accelerators to your governance framework if you have the Watson Knowledge Catalog Enterprise plan. For more information on the Enterprise plan, see Watson Knowledge Catalog offering plans.
- Required permissions
- You must have this user permission to import the Knowledge Accelerators:
- Manage governance categories
Finding the Knowledge Accelerators in the gallery
- Log in to Cloud Pak for Data as a Service gallery https://dataplatform.cloud.ibm.com/gallery
- Select
- Open the Knowledge Accelerator gallery tile for a particular industry.
Accessing the Knowledge Accelerators endpoints
The import procedure uses RESTful API endpoints. To access the Knowledge Accelerators endpoints, you need to:
- Create an API key, described at: https://cloud.ibm.com/docs/account?topic=account-userapikey#create_user_key.
- Use the API key to create an IAM bearer token, described at https://cloud.ibm.com/apidocs/watson-data-api#creating-an-iam-bearer-token.Note: Use the value of the
access_token
property for your Watson Data API calls. Set theaccess_token
value as the authorization header parameter for requests to the Watson Data APIs. The format is:Authorization: Bearer <access_token_value_here>
. For example:Authorization: Bearer eyJraWQiOiIyMDE3MDgwOS0wMDowMDowMCIsImFsZyI6IlJTMjU2In0...
Importing Knowledge Accelerators core content
You must import a set of core business terms content for each Knowledge Accelerator industry using an API call.
- With your API key, set up Postman or another REST API tool and run the endpoint using the
following format:
POST /v1/knowledge_accelerators/{ka_id}/import_items?ids=core-bpi&merge_option=all&do_import=true
Where {ka_id} is:- kaeu20 for Knowledge Accelerator for Energy and Utilities
- kafs20 for Knowledge Accelerator for Financial Services
- kahc20 for Knowledge Accelerator for Healthcare
- kain20 for Knowledge Accelerator for Insurance
-
The following are the required commands to import the core vocabulary for each of the Knowledge Accelerators:
- Knowledge Accelerator for Energy and
Utilities:
POST /v1/knowledge_accelerators/kaeu20/import_items?ids=core-bpi&merge_option=all&do_import=true
- Knowledge Accelerator for Financial
Services:
POST /v1/knowledge_accelerators/kafs20/import_items?ids=core-bpi&merge_option=all&do_import=true
- Knowledge Accelerator for
Healthcare:
POST /v1/knowledge_accelerators/kahc20/import_items?ids=core-bpi&merge_option=all&do_import=true
- Knowledge Accelerator for Insurance:
POST /v1/knowledge_accelerators/kain20/import_items?ids=core-bpi&merge_option=all&do_import=true
- Knowledge Accelerator for Energy and
Utilities:
Checking the status of the import job
When the Knowledge Accelerators import is submitted, it is possible to then check the status of that job. It might be necessary or desirable to do this, as in some cases the import process of the Knowledge Accelerator can take some time, depending on the size of the items that are being imported.
When you issue the command to import the Knowledge Accelerator items, a process
id
is returned in the command prompt, for example:
{'process_id': '6e23b62f-e20d-4fd8-88d7-06f92950fdb9'}
GET /v3/governance_artifact_types/import/status/{process_id}
GET /v3/governance_artifact_types/import/status/6e23b62f-e20d-4fd8-88d7-06f92950fdb9
Extracts of responses:
"IN_PROGRESS"
: Import is in progress and shows what step number the process is
at out of the total number of steps...."status": "IN_PROGRESS",
....
"step_number": 49,
"total_steps": 50,.....
"SUCCEEDED"
: Import is complete and response shows how many artifacts are
created or modified. "operations_count": {
"reference_data": {
"IMPORT_CREATE": 290,
"IMPORT_MODIFY": 0
},
"classification": {
"IMPORT_CREATE": 0,
"IMPORT_MODIFY": 22
},
"category": {
"IMPORT_CREATE": 210,
"IMPORT_MODIFY": 0
},
"glossary_term": {
"IMPORT_CREATE": 7694,
"IMPORT_MODIFY": 0
}
},
"process_id": "6e23b62f-e20d-4fd8-88d7-06f92950fdb9",
"status": "SUCCEEDED",....
"step_number": 50,
"total_steps": 50,
Adding collaborators
You need to add collaborators to the Knowledge Accelerators categories, otherwise only the person who imports the accelerator can use the artifacts. See managing access to a category for details on how to do this.
Optional imports and other commands
Importing Knowledge Accelerators Industry Alignment Vocabularies
POST /v1/knowledge_accelerators/{ka_id}/import_items?ids={iav}&merge_option=all&do_import=true
- kaeu20 for Knowledge Accelerator for Energy & Utilities
- kafs20 for Knowledge Accelerator for Financial Services
- kahc20 for Knowledge Accelerator for Healthcare
- kain20 for Knowledge Accelerator for Insurance
POST /v1/knowledge_accelerators/kaeu20/import_items?ids=cim&merge_option=all&do_import=true
Checking which Knowledge Accelerators are installed
GET /v1/knowledge_accelerators/import_items
This command returns a listing of any Knowledge Accelerator categories that are already imported into the Watson Knowledge Catalog instance.
Optional import parameters
The command format to import a Knowledge Accelerator is:
POST
/v1/knowledge_accelerators/{ka_id}/import_items?ids={item_ids}&merge_option={merge_option}&dependencies={dependencies_option}&do_import={import_option}'
.
The following are the query parameters that you can set:
- Mandatory query parameters
-
- merge_option [string]
- No default value so a value must be specified.
Value Description all Imported values replace existing values in catalog. specified Imported values that are not empty replace existing values in catalog. empty Imported values replace only empty values in catalog.
- Optional query parameters
-
- dependencies [string]
- The default value is
all
.Value Description all Imports all the sub items that the selected item depends on, irrespective of whether they exist in glossary. Note: this option can overwrite existing user changes in the glossary. mandatory Imports only the specified dependencies that the user indicates, and anything that is considered mandatory. - do_import [boolean]
- The default value is
false
.Value Description false Does all the logic checking and indicate what going to be imported, useful for checking in advance of doing the import. true At the end of logic checking, triggers the import and returns a process id to the user.