Config (export) admin API Resource

System configuration drafts handling WS

POST /api/admin/config/export/json

Export current configuration

Example of request:

{"dictionaries":true,"perspectiveSets":true,"presentations":true,"globalLayers":true,"printFormats":true,"toolsets":true, "templates":true, "templatesList" : [{"id":33},{"id":34}]}

Request Parameters
name type description constraints
dictionaries form boolean
globalLayers form boolean
presentations form boolean
printFormats form boolean
templates form boolean
templatesList form  
toolsets form boolean
Request Body
media type data type
application/x-www-form-urlencoded (custom)
Response Body
media type data type description
application/json object (JSON) JSON Response with current configuration.

Example

Request
POST /api/admin/config/export/json
Content-Type: application/x-www-form-urlencoded
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /api/admin/config/import/draft/json

Import configuration Draft from json uploadFile

Request Parameters
name type description constraints
configDraftId query the draft of configurationId to perform import long
objectclasses query if true, objectclasses configuration is imported boolean
perspectives query if true, perspectives configuration is imported boolean
skipDuplicates query if true, duplicate Objects are skipped boolean
skipMatched query applies only when skipDuplicates is false, if false matched Objects are updated, true - they are skipped boolean
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json object (JSON) JSON response with detailed import report

Example of response:

{"list": [{"errorMessage": "Skipped class 'hdv_h3_floor'","errorContext": "Object Classes Import","errorLevel": "INFO"}, "errorMessage": "Skipped field 'fi2spsys_name_h3' for class '131'","errorContext": "Object Class Fields Import","errorLevel": "INFO"},],"success": true}

Example

Request
POST /api/admin/config/import/draft/json
Content-Type: multipart/form-data
Accept: application/json

                

                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /api/admin/config/import/json/{fileGUID}

Start import configuration

Request Parameters
name type description constraints
fileGUID path long
Request Body
media type data type
application/json HdcConfigurationExportOptionsTO (JSON)
Response Body
media type data type description
application/json object (JSON) JSON Response with information about GUID of file to import configuration.

Example

Request
POST /api/admin/config/import/json/{fileGUID}
Content-Type: application/json
Accept: application/json

                
{ }
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

GET /api/admin/config/export/draft/json/{configDraftId}

Export configuration Draft to json file

Request Parameters
name type description constraints
configDraftId path the draft of configurationId to perform export long
objectclasses query if true, objectClasses configuration is exported boolean
perspectives query if true, perspectives configuration is exported boolean
Response Body
media type data type description
application/json object (JSON) json file with configuration Draft configuration

Example

Request
GET /api/admin/config/export/draft/json/{configDraftId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

POST /api/admin/config/export/draft/json/{configDraftId}

Request Parameters
name type description constraints
configDraftId path long
Response Body
media type data type description
application/json object (JSON)

Example

Request
POST /api/admin/config/export/draft/json/{configDraftId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /api/admin/config/import/upload/json/{mode}

Upload configuration XML to import

Request Parameters
name type description
mode path
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json HdcConfigurationImportOptionsTO (JSON) JSON Response with information about GUID of file to import configuration and available import options.

Example of response:

{"message":{"dictionaries":true,"presentations":false,"globalLayers":true,"printFormats":true,"toolsets":false,"templates":true,"templatesList":[],"skipMatched":false},"configurationId":"19","success":true}

Example

Request
POST /api/admin/config/import/upload/json/{mode}
Content-Type: multipart/form-data
Accept: application/json

                

                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{ }