UGC Administrating

API Proxy

Configure a API proxy in front of multiple UGC instances.

If there are multiple instances of UGC with which communication is required, you have the option to deploy an API proxy. The REST API of the proxy gives you the possibility to request voting reports or commit votings, quizzes, and forms to different UGC instances.

Configuration UGC Connections

The connection to diffrent UGC instances can be easily configured. For every UGC instance you have to define a unique tenantId to access the instances. Furthermore a UGC URL and the S3 Configuration of the instance is required.

AttributesDescription
ugc-proxy.tenants.<tenantId>.ugc-urlURL that points to the location of UGC, including the HTTP protocol. If the ugc instance is secured by authentication you can provide the credentials in the url, e.g. "http://username:password@domain.com"
ugc-proxy.tenants.<tenantId>.s3.access-key-idAccess key for UGC S3 bucket
ugc-proxy.tenants.<tenantId>.s3.secret-access-keySecret key, usually bundled with the previous access key
ugc-proxy.tenants.<tenantId>.s3.hostHost for the S3 bucket, e.g. "storage.googleapis.com"
ugc-proxy.tenants.<tenantId>.s3.bucket-nameName of the bucket in which UGC submissions are stored

REST API

The REST API provides you with the ability to make calls to different UGC instances using their tenantId.

Data Classes

The data classes used by the REST API are defined in the UGC API Module. They can be used by adding the following code to your pom.xml.

<dependency> 
	<groupId>com.subshell.sophora.ugc</groupId> 
	<artifactId>ugc-api</artifactId> 
	<version>X.X.X</version> 
</dependency>

Endpoints

The following REST endpoints are available. Post endpoints:

NamePathInput Data ClassDescription
Voting Submission/v1/voting/{tanantId}VotingSubmissionSubmit a user voting to UGC with the tenantId of the UGC instance.
Quiz Submission/v1/quiz/{tanantId}QuizSubmissionSubmit a user quiz to UGC with the tenantId of the UGC instance.
Form Submission/v1/form/{tanantId}FormSubmissionSubmit a user form to UGC with the tenantId of the UGC instance.
Opt-In Confirmation/v1/doubleoptinconfirmation/{tanantId}DoubleOptInConfirmationConfirm double Opt-In with the tenantId of the UGC instance.

GET endpoints:

NamePathResponse Data ClassDescription
Ranking Voting Report/v1/votingreport/ranking/{tanantId}/{externalId}RankingVotingReportRequest a ranking voting report with the external Id of the corresponding votings and the tenantId of the UGC instance.
Simple Voting Report/v1/votingreport/simple/{tanantId}/{externalId}SimpleVotingReportRequest a simple voting report with the external Id of the corresponding votings and the tenantId of the UGC instance.

Authentication

Basic Authentication is enabled when a username and password are specified in the configuration. If these properties are set, you must authenticate yourself to use the Rest API.

AttributesDescription
auth.usernameThe username to authenticate.
auth.passwordThe password to authenticate

Last modified on 6/18/26

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon