Unified Access Service APIs

Usage Scenarios

Export Configurations

This is a unified API to bring all configurations related to a content type and multiple content types specified in contentTypeHierarchies in request body. 

ServiceName is additional request body param where we can specify services for which we want to download the configuration. List of options include application service files, AI service configuration, authentication service which include landing login page look and feel, webhooks configurations, preferences settings on system and asset service will archive assets related to content types along with collection. 
  • Request Type: POST

  • Request URL: 

    {{PROTOCOL}}://{{MACHINE_NAME}}/uas/api/v5/importExport/exportConfigurations

  • RAW JSON Body: 

    {

         "contentTypeHierarchies": ["System;Structured Content;Smart Content;Document;Smart Document;customSmartDocumenType"],

         "serviceNames":["qcpapplicationservice","qcpaiservice","qcpauthenticationservice","qcpwebhookservice","preferenceservice","assetservice"]

    }

Case 1: Content Types, All related settings and Assets of those content types

  • Method: POST

  • URL: {{PROTOCOL}}://{{MACHINE_NAME}}/uas/api/v5/importExport/exportConfigurations

  • Body:

    {
        "contentTypeHierarchies": ["System;Structured Content;Smart Content;Document;Smart Document"],
        "serviceNames": ["qcpaiservice","qcpwebhookservice",”assets”]
    }
  • Description: This API will get default configurations related to smart document. In addition to that, qcpaiservice and webhooks service settings will be exported. Assets will be exported since 'assets' is present in service names list. 

Case 2: Content Types, related settings, specific services and query-based assets only

  • Method: POST

  • URL: {{PROTOCOL}}://{{MACHINE_NAME}}/uas/api/v5/importExport/exportConfigurations

  • Body: 

    {
        "contentTypeHierarchies": ["System;Structured Content;Smart Content;Document;Smart Document"],
        "serviceNames": ["perferenceservice","qcpapplicationservice"],
        "queryName": "FTLS",
            "archiveConfig": {
                "allVersions": true,
            }
    }
  • Description: This API will get default configurations related to smart document. In addition to that, preferences and application service settings will be exported. Assets exported will be as per the results of the query FTLS and not as per the content type. 

Case 3: Content Types, related settings, excluding specific services, no assets

  • Method: POST

  • URL: {{PROTOCOL}}://{{MACHINE_NAME}}/uas/api/v5/importExport/exportConfigurations

  • Body: 

    {
            "contentTypeHierarchies": ["System;Structured Content;Smart Content;Document;Smart Document"],
            "excludedServiceNames": ["qcpaiservice","assets"]
    }

Case 4: Query results Assets Only

Users can export only query results assets and any related assets by not specifying ContentTypeHierarchies param. 

Method: POST

URL: {{PROTOCOL}}://{{MACHINE_NAME}}/uas/api/v5/importExport/exportConfigurations

Headers: 

Body Parameters: 

{
          "queryName": "FTLS",
          "archiveConfig": {
          "allVersions": true,
          "deleteAfterArchive": false,
          "exportWithCollections": true,
          "includeBranches": true,
          "archiveRelations": true
          }
}

Description: Specifying the query name will only archive/export the assets results of that saved query and the assets that are in relations to that asset depending on archiveRelations flag. 

Asset Archive Options Description

Param

Default Value

Description

allVersions 

true 

If set to false, only latest version of asset is archived. 

deleteAfterArchive 

false 

If set to true, asset which is getting archived will be deleted from machine, if it is successfully archived. 

exportWithCollections 

true 

If set to true, full hierarchy of collections, their attributes, domain attributes, other attributes are archived along with the asset in which it is present.

includeBranches 

true 

Branches of assets is archived if this flag is set to true. 

archiveRelations 

true 

Relation information and related assets are archived. 

Names of supported services
  • qcpapplicationservice

  • qcpaiservice

  • qcpauthenticationservice

  • qcpwebhookservice

  • preferenceservice

  • assets (this option is renamed from assetservice in v5.0 to assets in v5.1)

Scope & Limitations
  • Query will be accessible to users for exporting assets. 

  • Query not accessible, query with 0 results, Collection query, Parameterized Query will lead to error in API. No assets will be archived. The API returns generic error "Failed to create manifest". Content service logs will specify exact exception occurring. 

  • If queryName is specified, only the assets returned by query will be considered for export. In that case, user is also not required to mention "assets" in serviceNameslist. 

  • If serviceNames is not provided, data from all services will be included. 

  • If serviceNames is empty list, only defaults without any services will be exported. 

  • If serviceNames and excludedServiceNames is specified, excludedServiceNames will be given preference. 

Download Configurations

  • Method: GET 

  • URL: {{PROTOCOL}}://{{MACHINE_NAME}}/uas/api/v5/importExport/download?contextId=17620972-1b3e-4b07-a655-ad374e89c6bf

  • Description: This API downloads exported application configuration packages based on provided identifiers. 

Query Parameters

Key

Value

Description

*contextId

17620972-1b3e-4b07-a655-ad374e89c6bf

Context ID generated by export or import configuration API to be used. 

type

logs

(optional) Defaults to config download configs for context ID generated by export configurations API. Other value logs which are used to get logs generated by import configuration API. 

Import Configurations

  • Method: POST

  • URL: {{PROTOCOL}}://{{MACHINE_NAME}}/uas/api/v5/importExport/importConfigurations

  • Body: form-data

Key

Value

Content Type

override

true

(optional) Defaults to true. If configuration is present in system, it will be overridden as per import if this parameter is set to true. 

importConfig

{"override":true,"restoreConfig":{"overrideCollections":true}}

application/json

file

<ZIP file to be uploaded>

application/zip

It returns a context ID.

importConfig options

{
        "override": true,
        "restoreConfig": {
                "lookupEntityBy": "name",
                "retainAssetId": true,
                "setWorkflows": true,
                "setGroups": true,
                "setUsers": true,
                "setRoutings": true,
                "setRevisionControls": true,
                "setJobJackets": false,
                "overrideCollections": true
        }
}
Param
  • override: This param is used to specify that if imported settings are already present on target system, then it should ignore or update that setting. 

    • If override is false, then that setting is ignored/skipped. 

    • If override is true, then that setting is updated as per data in the import ZIP. 

Restore Options Description

Param

Default Value

Description

lookupEntityBy

"name"

While restoring asset, asset preexistence will be checked based on name. 

retainAssetId

false

If set to true, the asset will be restored with same asset ID as it was in source. If asset with same ID is already present, then it will be deleted, or error will be thrown based on override flag. 

setWorkflows

true

If set to true, during restore process if collection is created then workflows will be automatically applied to collection. If workflow is not present, then error will be registered in restore logs. This option can be set to false when assets/collections do not have workflows. 

setGroups

true

If set to true, during restore process if collection is created, then groups will be automatically applied to collection. If the group is not present, then error will be registered in restore logs. This option can be set to false when assets/collections do not have groups assignment. 

setUsers

true

If set to true, during restore process if collection is created, then users will be automatically applied to collection. If the user is not present, then error will be registered in restore logs. This option can be set to false if revision history/creator/ last modifier information is not important while restoring asset. In that case user doing import will be considered as creator, last modifier and routed to of asset will be left empty. 

setRevisionControls 

true 

Revision controls of content types on collection to be applied while restoring asset. 

setJobJackets 

true 

Job Jackets setting if any are applied on collection while asset restore. 

setRoutings 

true 

Workflow status routing settings to be applied to collection while restoring asset. If users/groups or workflows are not present in system and this flag is true, it will result in error. 

overrideCollections 

false 

If the collection is preexisting, then it will not be updated. If set to true, all settings will be updated on collection during asset restore.

Get Export or Import Status

  • Method: GET

  • URL: {{PROTOCOL}}://{{MACHINE_NAME}}/uas/api/v5/importExport/status?contextId=6124af60-6038-4236-bd78-b84227b0f985

  • Description: This API provides a way to get status of import or export process. It provides details of which configurations are currently being exported or imported along with overall percentage completion status. Users have to provide its context ID which is being generated by export or import configurations API. 

Query Parameters

Key

Value

Description

contextId

6124af60-6038-4236-bd78-b84227b0f985

Context ID to be used here which is given by export or import API.