Connecting XCC to MarkLogic Cloud
[v11.1.0 and up]
MarkLogic Cloud is a Software as a Service (SaaS) platform that hosts both MarkLogic Server and Semaphore services. The services work behind a reverse proxy.
Connecting XCC to MarkLogic Cloud requires both token-based authentication and a base path that maps to a port of an application server in the destination MarkLogic cluster.
Note
Connecting XCC to MarkLogic Cloud requires SSL.
When XCC connects to MarkLogic Cloud,
xcc.httpcompliant
is automatically set toTRUE
.Session affinity is automatically preserved.
More information about MarkLogic Cloud is coming soon.
To connect to MarkLogic Cloud, when you construct a ContentSource
object, you specify apiKey
instead of username
and password
. You must also specify basePath
:
host
: The URL of the MarkLogic Cloud Tenancy.apiKey
: The user API key unique to each MarkLogic Cloud user for obtaining the session token from MarkLogic Cloud.User API Key:
A unique key assigned to a MarkLogic Cloud user that XCC uses to obtain session tokens.
By default, user API keys expire after 7 days, but you can configure the expiration time within the limits set for your MarkLogic Cloud tenant.
You must regenerate user API keys whenever they expire or become invalidated.
Session Token:
A token that XCC obtains by passing the user API key to the MarkLogic Cloud token endpoint.
It uniquely identifies a user session to provide the user access to the services hosted by MarkLogic Cloud.
It is used as an authorization header to authorize all subsequent requests to MarkLogic Server.
XCC is fully responsible for obtaining, maintaining, and renewing the session token that MarkLogic Cloud generates.
basePath
: A base URL that maps to a port of an application server on the source MarkLogic cluster hosted by MarkLogic Cloud.By default, MarkLogic Cloud supports several MarkLogic Server Integration Endpoints, which are preconfigured base paths mapped to the ports of auxiliary MarkLogic application servers.
The MarkLogic Cloud tenants can also configure endpoints for the specific environment of their own application servers on the “Services and Endpoints” page in MarkLogic Cloud. An example is the preconfigured endpoint for the default App-Services app server,
/ml/test/marklogic/app-services/
.
port
:443
(since MarkLogic Cloud requires SSL connection).
MarkLogic Cloud errors are reflected in MLCloudRequestException
.
For more details, see ContentSourceFactory.newContentSource()
.