This documentation and the Cisco Observability Platform functionalities it describes are subject to change. Data saved on the platform may disappear and APIs may change without notice.
Fetch a Knowledge Object by ID
To fetch a specific knowledge object by its ID, run the following command:
fsoc knowledge get –-type <fully-qualified-typename>
--layer-type <SOLUTION|ACCOUNT|GLOBALUSER|TENANT|LOCALUSER>
--layer-id <layer-id>
--object-id <object-id>
layer-id is required for requests made to the SOLUTION layer. This attribute is optional for requests made to the LOCALUSER, GLOBALUSER, and TENANT layers. If layer-id is not provided, it will be automatically generated based on the provided layer-type.
Limitation: The ACCOUNT and GLOBALUSER layers are not currently supported.
Prefetch Reference Properties
If the knowledge object that you want to fetch contains reference properties, the default output of the fsoc knowledge get command will display the values of the reference properties as the fully qualified IDs (FQID) of the referenced knowledge objects.
To prefetch the actual content of the referenced knowledge objects, use one or both of the following flags.
--prefetch-refs
If this flag is added:
- In the output, the reference property value will be the FQID of the referenced knowledge object.
- In the output, a new
referencessection will be added. The key will be the FQID of the referenced knowledge object, and the value will be the content of the referenced knowledge object.
Accepted values:
- To prefetch all reference properties in the knowledge object, set the value to
*. - To prefetch only a specific reference property, set the value to the JSON pointer of the reference property. To prefetch multiple properties, add a new
--prefetch-refsflag for each property.
Sample command:
fsoc knowledge get --type <fully-qualified-typename>
--layer-type <layer-type>
--layer-id <layer-id>
--object-id <object-id>
--prefetch-refs "<json-pointer-to-reference-property1>"
--prefetch-refs "<json-pointer-to-reference-property2>"
Sample output:
In this example, the reference properties are solutionInfo and tenantInfo.
Expand
{
"layerType": "SOLUTION",
"id": "testreferenceproperties3.test:test1",
"layerId": "testreferenceproperties3.test",
"data": {
"name": "test1",
"fontName": "Arial",
"fontSize": "13px",
"tenantInfo": [
"testreferenceproperties3.test:simpletheme/testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue;layerId=testreferenceproperties3.test;layerType=SOLUTION"
],
"solutionInfo": "extensibility:solution/extensibility;layerId=extensibility;layerType=SOLUTION",
"backgroundColor": "blue"
},
"objectMimeType": "application/json",
"targetObjectId": null,
"patch": null,
"blobInfo": null,
"createdAt": "2024-04-22T21:54:41.595Z",
"updatedAt": "2024-04-22T21:54:41.595Z",
"objectType": "testreferenceproperties3.test:complexreference",
"fqid": "testreferenceproperties3.test:complexreference/testreferenceproperties3.test:test1;layerId=testreferenceproperties3.test;layerType=SOLUTION",
"references": {
"extensibility:solution/extensibility;layerId=extensibility;layerType=SOLUTION": {
"layerType": "SOLUTION",
"id": "extensibility",
"layerId": "extensibility",
"data": {
"tag": "stable",
"name": "extensibility",
"isSystem": true,
"solutionID": "extensibility",
"dependencies": [],
"isSubscribed": true,
"solutionType": "component",
"isNonStableTag": false
},
"objectMimeType": "application/json",
"targetObjectId": null,
"patch": null,
"objectVersion": 24,
"createdAt": "2023-03-24T21:51:17.330Z",
"updatedAt": "2024-04-12T17:35:37.818Z",
"tags": {
"app-cco": "yes"
},
"blobInfo": {},
"objectType": "extensibility:solution",
"fqid": "extensibility:solution/extensibility;layerId=extensibility;layerType=SOLUTION"
},
"testreferenceproperties3.test:simpletheme/testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue;layerId=testreferenceproperties3.test;layerType=SOLUTION": {
"layerType": "SOLUTION",
"id": "testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue",
"layerId": "testreferenceproperties3.test",
"data": {
"name": "cisco3",
"fontName": "Arial",
"fontSize": "12px",
"backgroundColor": "blue"
},
"tags": null,
"objectMimeType": "application/json",
"targetObjectId": null,
"patch": null,
"objectVersion": 1,
"blobInfo": null,
"createdAt": "2024-04-22T21:54:41.558Z",
"updatedAt": "2024-04-22T21:54:41.558Z",
"objectType": "testreferenceproperties3.test:simpletheme",
"fqid": "testreferenceproperties3.test:simpletheme/testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue;layerId=testreferenceproperties3.test;layerType=SOLUTION"
}
}
}
layerType: SOLUTION
id: 'testreferenceproperties3.test:test1'
layerId: testreferenceproperties3.test
data:
name: test1
fontName: Arial
fontSize: 13px
tenantInfo:
- >-
testreferenceproperties3.test:simpletheme/testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue;layerId=testreferenceproperties3.test;layerType=SOLUTION
solutionInfo: >-
extensibility:solution/extensibility;layerId=extensibility;layerType=SOLUTION
backgroundColor: blue
objectMimeType: application/json
targetObjectId: null
patch: null
blobInfo: null
createdAt: '2024-04-22T21:54:41.595Z'
updatedAt: '2024-04-22T21:54:41.595Z'
objectType: 'testreferenceproperties3.test:complexreference'
fqid: >-
testreferenceproperties3.test:complexreference/testreferenceproperties3.test:test1;layerId=testreferenceproperties3.test;layerType=SOLUTION
references:
'extensibility:solution/extensibility;layerId=extensibility;layerType=SOLUTION':
layerType: SOLUTION
id: extensibility
layerId: extensibility
data:
tag: stable
name: extensibility
isSystem: true
solutionID: extensibility
dependencies: []
isSubscribed: true
solutionType: component
isNonStableTag: false
objectMimeType: application/json
targetObjectId: null
patch: null
objectVersion: 24
createdAt: '2023-03-24T21:51:17.330Z'
updatedAt: '2024-04-12T17:35:37.818Z'
tags:
app-cco: 'yes'
blobInfo: {}
objectType: 'extensibility:solution'
fqid: >-
extensibility:solution/extensibility;layerId=extensibility;layerType=SOLUTION
'testreferenceproperties3.test:simpletheme/testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue;layerId=testreferenceproperties3.test;layerType=SOLUTION':
layerType: SOLUTION
id: 'testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue'
layerId: testreferenceproperties3.test
data:
name: cisco3
fontName: Arial
fontSize: 12px
backgroundColor: blue
tags: null
objectMimeType: application/json
targetObjectId: null
patch: null
objectVersion: 1
blobInfo: null
createdAt: '2024-04-22T21:54:41.558Z'
updatedAt: '2024-04-22T21:54:41.558Z'
objectType: 'testreferenceproperties3.test:simpletheme'
fqid: >-
testreferenceproperties3.test:simpletheme/testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue;layerId=testreferenceproperties3.test;layerType=SOLUTION
--prefetch-refs-inline
After you add the --prefetch-refs flag, you can also add the --prefetch-refs-inline flag to fetch the referenced knowledge object in line. In the output, the value of the reference property will be the content of the referenced knowledge object.
Sample command:
fsoc knowledge get --type <fully-qualified-typename>
--layer-type <layer-type>
--layer-id <layer-id>
--object-id <object-id>
--prefetch-refs "<json-pointer-to-reference-property1>"
--prefetch-refs "<json-pointer-to-reference-property2>"
--prefetch-refs-inline
Sample output:
In this example, the reference properties are solutionInfo and tenantInfo.
Expand
{
"layerType": "SOLUTION",
"id": "testreferenceproperties3.test:test1",
"layerId": "testreferenceproperties3.test",
"data": {
"name": "test1",
"fontName": "Arial",
"fontSize": "13px",
"tenantInfo": [
{
"layerType": "SOLUTION",
"id": "testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue",
"layerId": "testreferenceproperties3.test",
"data": {
"name": "cisco3",
"fontName": "Arial",
"fontSize": "12px",
"backgroundColor": "blue"
},
"tags": null,
"objectMimeType": "application/json",
"targetObjectId": null,
"patch": null,
"objectVersion": 1,
"blobInfo": null,
"createdAt": "2024-04-22T21:54:41.558Z",
"updatedAt": "2024-04-22T21:54:41.558Z",
"objectType": "testreferenceproperties3.test:simpletheme",
"fqid": "testreferenceproperties3.test:simpletheme/testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue;layerId=testreferenceproperties3.test;layerType=SOLUTION"
}
],
"solutionInfo": {
"layerType": "SOLUTION",
"id": "extensibility",
"layerId": "extensibility",
"data": {
"tag": "stable",
"name": "extensibility",
"isSystem": true,
"solutionID": "extensibility",
"dependencies": [],
"isSubscribed": true,
"solutionType": "component",
"isNonStableTag": false
},
"objectMimeType": "application/json",
"targetObjectId": null,
"patch": null,
"objectVersion": 24,
"createdAt": "2023-03-24T21:51:17.330Z",
"updatedAt": "2024-04-12T17:35:37.818Z",
"tags": {
"app-cco": "yes"
},
"blobInfo": {},
"objectType": "extensibility:solution",
"fqid": "extensibility:solution/extensibility;layerId=extensibility;layerType=SOLUTION"
},
"backgroundColor": "blue"
},
"objectMimeType": "application/json",
"targetObjectId": null,
"patch": null,
"blobInfo": null,
"createdAt": "2024-04-22T21:54:41.595Z",
"updatedAt": "2024-04-22T21:54:41.595Z",
"objectType": "testreferenceproperties3.test:complexreference",
"fqid": "testreferenceproperties3.test:complexreference/testreferenceproperties3.test:test1;layerId=testreferenceproperties3.test;layerType=SOLUTION"
}
layerType: SOLUTION
id: 'testreferenceproperties3.test:test1'
layerId: testreferenceproperties3.test
data:
name: test1
fontName: Arial
fontSize: 13px
tenantInfo:
- layerType: SOLUTION
id: 'testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue'
layerId: testreferenceproperties3.test
data:
name: cisco3
fontName: Arial
fontSize: 12px
backgroundColor: blue
tags: null
objectMimeType: application/json
targetObjectId: null
patch: null
objectVersion: 1
blobInfo: null
createdAt: '2024-04-22T21:54:41.558Z'
updatedAt: '2024-04-22T21:54:41.558Z'
objectType: 'testreferenceproperties3.test:simpletheme'
fqid: >-
testreferenceproperties3.test:simpletheme/testreferenceproperties3.test:/name=cisco3;/backgroundColor=blue;layerId=testreferenceproperties3.test;layerType=SOLUTION
solutionInfo:
layerType: SOLUTION
id: extensibility
layerId: extensibility
data:
tag: stable
name: extensibility
isSystem: true
solutionID: extensibility
dependencies: []
isSubscribed: true
solutionType: component
isNonStableTag: false
objectMimeType: application/json
targetObjectId: null
patch: null
objectVersion: 24
createdAt: '2023-03-24T21:51:17.330Z'
updatedAt: '2024-04-12T17:35:37.818Z'
tags:
app-cco: 'yes'
blobInfo: {}
objectType: 'extensibility:solution'
fqid: >-
extensibility:solution/extensibility;layerId=extensibility;layerType=SOLUTION
backgroundColor: blue
objectMimeType: application/json
targetObjectId: null
patch: null
blobInfo: null
createdAt: '2024-04-22T21:54:41.595Z'
updatedAt: '2024-04-22T21:54:41.595Z'
objectType: 'testreferenceproperties3.test:complexreference'
fqid: >-
testreferenceproperties3.test:complexreference/testreferenceproperties3.test:test1;layerId=testreferenceproperties3.test;layerType=SOLUTION