How to migrate REST Endpoints from v1 to v3 of QPPNG?
Pre-requisites
Spring boot version: 2.7.5 (Spring framework: 5.3.23)
If you are on an earlier version of spring boot, upgrade it to spring boot 2.7.5.
The following are the changes that are incorporated for the migration of REST Endpoints from v1 to v3 in QPPNG.
Snapshot and Artifactory Updates
Include the snapshot version 3.0.0-SNAPSHOT or replace the version 2.0.0-SNAPSHOT with 3.0.0-SNAPSHOT.
<dependency>
<groupId>com.quark.qcep.contentservices</groupId>
<artifactId>qcep-contentservices-remoting-stubs</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.quark.qcep.automation</groupId>
<artifactId>qcep-automation-interface</artifactId>
<version>3.0.0-SNAPSHOT</version>
<dependency>
Enable v3 in REST Endpoints
- Set the api.version flag to v3 in the file application.properties of qcpcontentservice (api.version=v3).
- Set the blob.service.upload.url flag to /api/v3/blob/uploadTransientBlob in the file application.properties of qcpautomationservice
(blob.service.upload.url=/api/v3/blob/uploadTransientBlob).
Changes in REST Endpoints
Earlier: {{PROTOCOL}}://{{MACHINE_NAME}}:{{PORT}}/api/v1/trusteeService/getAllUsers
Now: {{PROTOCOL}}://{{MACHINE_NAME}}:{{PORT}}/api/v3/trusteeService/getAllUsers
Note: The v1 REST Endpoints might still be accessible, but Quark will deprecate them soon.
Note: Only v3 REST Endpoints support the branching feature
Stub Changes
To enable the branching feature, interfaces of the following services have been changed:
- AssetService
- PublishingService
- IndexingService
- OfficeService
- BranchingService (new interface introduced for branching support)
Note: You must only use the version v3 of stubs for branching (AssetServiceStubV3, PublishingServiceStubV3, and so on). Using stubs of other versions may lead to application breakage.
Replace the following stub imports to enable branching
AssetServiceStub -> AssetServiceStubV3
import com.quark.qpp.core.asset.service.remote.v1.AssetServiceStub with
import com.quark.qpp.core.asset.service.remote.v3.AssetServiceStubV3
PublishingServiceStub -> PublishingServiceStubV3
import com.quark.qpp.core.publishing.service.remote.v1.PublishingServiceStub with
import com.quark.qpp.core.publishing.service.remote.v3.PublishingServiceStubV3
IndexingServiceStub -> IndexingServiceStubV3
import com.quark.qpp.core.indexing.service.remote.v1.IndexingServiceStub with
import com.quark.qpp.core.indexing.service.remote.v3.IndexingServiceStubV3
OfficeServiceStub -> OfficeServiceStubV3
import com.quark.qpp.office.service.remote.v1.OfficeServiceStub with
import com.quark.qpp.office.service.remote.v3.OfficeServiceStubV3
BranchingServiceStub
import com.quark.qpp.core.branching.service.remote.v3.BranchingServiceStub
Note: The stub for branching is introduced only in v3.
To enable branching, you must also set the enable.branching.feature flag to true in the file application.properties of qcpcontentservice.
Note : Please clean the redis cache before restarting your QPPNG server .
Updated swagger collection for v3.