Skip to content

Access to the database import and export functions via APIs

Access to the database import and export functions via APIs

Introduction

STATUS SWAGGER
ACTIVE -
FORMAT ROOT ENDPOINT
REST/OpenAPI <api root>/admintools/

CCH Tagetik CCH Tagetik makes it possible to run database import and export functions via APIs (RESTful APIs) developed according to the OData v.4.0 standard.

Certain conditions are required to use this consultation mode.

Access conditions

To be able to use these specific APIs, the user must be authenticated (Basic Auth, OAuth2).

APIs must also be enabled in the Repository. For reverse proxies, further settings are necessary. They can be used with both http and https protocols.

For more details on authentication and enabling, see REST API Overview.

API for running the export

Method

POST

URL

http://server:port/tagetikcpm/api/admintools/export/v1/database_id

Parameters

database_id = ID of db to export

Note: to export the Repository, database_id = REPOSITORY

Property

In the body of the request it is possible to include the following properties in JSON format:

zipMaxSize = maximum size in MB of files to be produced (default = 2048)

E.g.: { "zipMaxSize":"2048" }

Returned data

The response returns the following ID in JSON format:

dataprocessingId = data processing ID.

E.g.: { "dataprocessingId":"FF8081817A4264E5017A42D08E3C21EB" }

API for checking export status

Method

GET

URL

http://server:port/tagetikcpm/api/admintools/export/v1/dataprocessingId

Returned data

The response returns the data processing status in JSON format:

status: RUNNING/FAILED/COMPLETED

Status Description
RUNNING Running
FAILED Failed
COMPLETED Successfully completed

E.g.: {"requestDateTime": "2021-06-25T10:56:42.850+0000", "status": "COMPLETED"}

impexp.zipFiles.produced: names of produced files

Es: {"requestDateTime": "2021-06-25T10:56:42.850+0000", "status": "COMPLETED", "parameters": {"impexp.zipFiles.produced": "tcpm_USER_DB_xxx_part_1_of_1.zip"}}

API for stopping the export

Method

DELETE

URL

http://server:port/tagetikcpm/api/admintools/export/v1/dataprocessingId

Returned data

The response returns the following ID in JSON format:

message = Stop on dataprocessingOid dataprocessingId" / "Notify on dataprocessingOid dataprocessingId"

Message Description
Stop on dataprocessingOid Data Processing was stopped
Notify on dataprocessingOid Data processing in progress

E.g.: {"message": "Stop on dataprocessingOid FF8081817A4264E5017A42D08E3C21EB"}

API for running the import

Method

POST

URL

http://server:port/tagetikcpm/api/admintools/import/v1/database_id

Parameters

database_id = ID of database to which data is exported

Note: to import the Repository, database_id = REPOSITORY

Property

In the body of the request it is possible to include the following properties in JSON format:

Property Description Options
filename Mandatory. File to import. It is possible to specify: - an individual file name - a list of file names (separator = ;) - all files with .zip extension (filename = *)
endpoint Endpoint to use when the file is located in a remote directory See Endpoint page. -
dir Directory on which files reside If an endpoint is specified, it allows a sub directory to be specified based on the root of the endpoint. If no endpoint has been specified, it allows the following to be specified: - empty field = directory set up as writable folder of CCH Tagetik - relative path = sub-directory of the writable folder - absolute path = generic directory
emptyDb Indicates whether the data in the target database must be completely deleted before importing. true/false (default = false)
deletePartitions Indicate whether all present AIH partitions (tables with prefix AW_) are to be deleted. Not to be used if the target database is the Repository. true/false (default = true)

Note: The dynamic:Multi File syntax can be used for the filename parameter. In this case, since the files to be processed are ZIP archives, the syntax will not evaluate the content of the archives, but only the ZIP files themselves as entities

Examples

{ "filename":"export.awex", "endpoint":"", "dir":"","emptyDb":"false","deletePartitions":"true"} - import of the "export.awex" file from the Writable folder

{ "filename":"export.awex", "endpoint":"", "dir":"tmp","emptyDb":"false","deletePartitions":"true"} - import of the "export.awex" file from the "tmp" della Writable folder subdirectory

{ "filename":"export.awex", "endpoint":"", "dir":"C:\impexp","emptyDb":"false","deletePartitions":"true"} - import of the "export.awex" file from the "C:\impexp" directory

{ "filename":"export.awex", "endpoint":"SFTP", "dir":"","emptyDb":"false","deletePartitions":"true"} - import of the "export.awex" file through the SFTP endpoint

{ "filename":"export.awex", "endpoint":"SFTP", "dir":"tmp","emptyDb":"false","deletePartitions":"true"} - import of the "export.awex" file lpresent in the "tmp" subdirectory of the SFTP endpoint

{ "filename":"export_1_of_2.awex;export_2_of_2.awex", "endpoint":"SFTP", "dir":"","emptyDb":"false","deletePartitions":"true"} - import of the "export_1_of_2.awex" and "export_2_of_2.awex" files present on the SFTP endpoint

{ "filename":"*", "endpoint":"SFTP", "dir":"","emptyDb":"false","deletePartitions":"true"} - import of all files with the ".awex" extension present on the SFTP endpoint

Returned data

The response returns the following ID in JSON format:

dataprocessingId = data processing ID.

E.g.: { "dataprocessingId":"FF8081817A4264E5017A42D08E3C21EB" }

API for checking import status

Method

GET

URL

http://server:port/tagetikcpm/api/admintools/import/v1/dataprocessingId

Returned data

The response returns the data processing status in JSON format:

status: RUNNING/FAILED/COMPLETED

Status Description
RUNNING Running
FAILED Failed
COMPLETED Successfully completed

E.g.: {"requestDateTime": "2021-06-25T10:56:42.850+0000", "status": "COMPLETED"}

API for stopping the import

Method

DELETE

URL

http://server:port/tagetikcpm/api/admintools/import/v1/dataprocessingId

Returned data

The response returns the following ID in JSON format:

message = Stop on dataprocessingOid dataprocessingId" / "Notify on dataprocessingOid dataprocessingId"

Message Description
Stop on dataprocessingOid Data Processing was stopped
Notify on dataprocessingOid Data processing in progress

E.g.: {"message": "Stop on dataprocessingOid FF8081817A4264E5017A42D08E3C21EB"}