![]() |
Accelerator Import Models
|
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.
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.
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
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
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
The Import endpoint accept HTTP Post requests and it except the following parameters:
EndpointHeaders Header Header key: Authorization
Header values: bearer token
The Import endpoint accept HTTP Post requests and it except the following parameters:
[in] | document | A Mandatory DocumentModel parameter. A Json string that represent a AcceleratorKms.Model.Api.Import.ContentModel and it is expected in the request body. |
[in] | updateExisting | An 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] | debug | An 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] | return | AcceleratorKms.Dal.Import.ImportResult |