Skip to main content

Using MarkLogic Content Pump (mlcp)

Connecting mlcp 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 mlcp 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 mlcp to MarkLogic Cloud requires SSL.

  • When mlcp connects to MarkLogic Cloud,

    • -restrict_hosts is automatically set to TRUE.

    • Session affinity is automatically preserved.

  • More information about MarkLogic Cloud is coming soon.

mlcp supports importing, exporting, and copying content through MarkLogic Cloud.

  • -host: Required. The URL of the MarkLogic Cloud Tenancy.

  • -api_key: Required. 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 mlcp 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 mlcp 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.

  • -base_path: Required. 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: Optional. 443 (since MarkLogic Cloud requires SSL connection, mlcp ignores this parameter and uses 443).

  • For copying content, there are parameters such as -input_host, -output_api_key, and so on for source (input) and destination (output) clusters. See Copy Command Line Options.

Here is an example of importing content through MarkLogic Cloud:

# Windows users, see Modifying the Example Commands for Windows
$ mlcp.sh import -host "cloud.marklogic.com" \
-api_key "XZvPaq+3HihncigeegZyA==" \
-base_path "/ml/test/marklogic/app-services/" \
-mode local \
-document_type xml-input_file_type delimited_text \
-delimiter "," \
-input_file_path input/

Here is an example of copying content through MarkLogic Cloud.

MarkLogic Cloud errors are reflected in MLCloudRequestException.