Accelerator Import Models
AcceleratorKMS Import Endpoint

About

AcceleratorKMS v3.6.1 and up support importing documents into it directly through an endpoint without the need to use its UI.
This allows an easy and quick way to import documents into AcceleratorKMS.

Attention
The imported documents must be in Json format and adhere to AcceleratorKms.Model.Api.Import.ContentModel format.

Endpoint Authorization

AcceleratorKMS endpoints are using OAuth 2.0 authorization protocol, so extenal applications can access AcceleratorKMS on behalf of a user.
To do so you need to get an access token given a username and password, then pass this token with each request.
In other words, you will send an initial request to get a token, then for all subsequent calls you will use this token for authorization.

Token URL

https://AcceleratorKMSUrl/token
where AcceleratorKMSUrl is the URL of AcceleratorKMS instance

For example if the Url of AcceleratorKMS instance is:
https://test.procedureaccelerator.com
then the token URL should be:
https://test.procedureaccelerator.com/token

Token HTTP Verb

To acquire a token you need to make an HTTP Post request with the following header and body:
TokenHeaders Header Header key: Content-Type
Header value: application/x-www-form-urlencoded
Body Body grant_type=password&username=AcceleratorKMS_username&password=AcceleratorKMS_password

Attention
Replace AcceleratorKMS_username with AcceleratorKMS login name and AcceleratorKMS_password with AcceleratorKMS login password


The Endpoint

URL

The endpoint can be reached at:
https://AcceleratorKMSUrl/api/Document/Import
where AcceleratorKMSUrl is the URL of AcceleratorKMS instance

For example if the Url of AcceleratorKMS instance is:
https://test.procedureaccelerator.com
then the endpoint URL should be:
https://test.procedureaccelerator.com/api/Document/Import

HTTP Verb

The Import endpoint accept HTTP Post requests and it except the following parameters:


EndpointHeaders Header Header key: Authorization
Header values: bearer token

Attention
Replace token with the actual token value acquired from previous step.

Parameters

The Import endpoint accept HTTP Post requests and it except the following parameters:

Parameters
[in]documentA Mandatory DocumentModel parameter.
A Json string that represent a AcceleratorKms.Model.Api.Import.ContentModel and it is expected in the request body.
[in]updateExistingAn optional query string Boolean parameter that can accept either “true” or “false” [default].
When “true” is passed then the document will be updated in case it is already exists in AcceleratorKMS.
When “false” is passed then the user will get notified that a similar document is already exists in AcceleratorKMS and the operation will aborted.
[in]debugAn optional query string Boolean parameter that can accept either “true” or “false” [default].
When “true” is passed then no importing to AcceleratorKMS will be done, but instead a simulation of import will be done to show what will happened if this document get imported (refer to the endpoint return value for more information).
When “false” is passed then the document will be imported into AcceleratorKMS.
[out]returnAcceleratorKms.Dal.Import.ImportResult