Import - AcceleratorKMS - Version 5.0 - Help - Hexagon

AcceleratorKMS API Guide

Language
English
Product
AcceleratorKMS
Search by Category
Help
AcceleratorKMS Version
5.1

Use the Import API to create content in AcceleratorKMS from existing JSON content.

URL

https://AcceleratorKMS_URL/api/Document/Import

Where:

AcceleratorKMS_URL is replaced with your AcceleratorKMS instance.

HTTP Verb

Make an HTTP POST request using the following header and parameters.

Header

Key

Value

Description

Authorization

bearer <token>

Actual token value acquired from the authentication step

Content-Type

application/json

Designates the POST’s content response as JSON format

Designates the POST’s content response as JSON format

Parameters

Import API accepts the following parameters:

Parameter

Type

Description

[in] document

String

A Mandatory DocumentModel parameter.

Imported documents require JSON string format and the request body must adhere to ApiModel.DocumentModel.

[in] updateExisting

Boolean

An optional query string Boolean parameter that can accept either "true" or "false" [default]:

  • If "true" is passed - Document (if already exists) is updated in AcceleratorKMS.

  • If "false" is passed - User is notified that a similar document already exists in AcceleratorKMS and the operation is aborted.

[in] debug

Boolean

An optional query string Boolean parameter that can accept either "true" or "false" [default]:

  • If "true" is passed - Importing to AcceleratorKMS is not done. Rather, a simulation of import is shown. For more information, see the endpoint return value.

  • If "false" is passed - The document is imported into AcceleratorKMS.

[out] return

String

Results of the import:

Imported documents respond with JSON string format that adheres to Import.ImportResult

For more information about "DocumentModel" and "ImportResult", see AcceleratorKMS API Reference document.

The following features are not supported or cannot be imported:

  • Sub content

  • Flows

  • Asset Procedures and Asset Templates: Will import as procedures

  • Content History

  • Access Role: Set automatically to "Everyone"

Sample Query

{

"titles": {

"en-CA": "Sample Procedure"

},

"descriptions": {

"en-CA": "A sample procedure."

},

"classification": {

"paths": {

"en-CA": "Global"

}

},

"completionSequence": 0,

"contentType": {

"names": {

"en-CA": "Normal Procedure"

}

},

"documentItems": [

{

"sectionHeading": {

"headings": {

"en-CA": "A Sample Section"

}

},

"group": 0,

"childItems": [

{

"statement": {

"type": {

"names": {

"en-CA": "Information"

},

"baseType": 0

},

"statements": {

"en-CA": "<p>A sample information statement.</p>"

}

}

},

{

"statement": {

"type": {

"names": {

"en-CA": "Procedural"

},

"baseType": 1

},

"statements": {

"en-CA": "<p>A sample procedural statement.</p>"

},

"responsibleRole": {

"names": {

"en-CA": "Operator"

},

"abbreviations": {

"en-CA": "OP"

}

}

}

}

]

}

],

"versionComment": "Imported via API"

}