### Example Default Configuration File Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/installation-main.md An example configuration file that can be placed in the installer's working directory to override default installation settings. If this file is not present, default values are used. ```properties # Example default.config file # # Set the following variables to override the default values used by the installer. # # SOLR_HOST=localhost # SOLR_PORT=8080 # SOLR_PATH=/solr # SOLR_SSL=false # # DB_HOST=localhost # DB_PORT=5432 # DB_NAME=dataverse # DB_USER=dataverse # DB_PASSWORD=password # # DATAVERSE_HOST_NAME=localhost # DATAVERSE_SITE_URL=http://localhost:8080/dataverse # # Built-in Solr configuration (if not using a remote Solr server) # SOLR_INSTALL_DIR=/usr/local/payara7/glassfish/domains/domain1/solr # # Payara Server configuration # PAYARA_INSTALL_DIR=/usr/local/payara7 # PAYARA_DOMAIN=domain1 # PAYARA_ADMIN_USER=admin # PAYARA_ADMIN_PASSWORD=admin # # Java configuration # JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 # # Other configuration # INSTALLER_DIR=/home/user/dataverse-installer # LOG_DIR=/var/log/dataverse # TEMP_DIR=/tmp # # Uncomment and set any of the above variables to override the defaults. # For example, to set a custom Solr host and port: # SOLR_HOST=my-solr-server.example.com # SOLR_PORT=8983 # # To set a custom database name and user: # DB_NAME=my_dataverse_db # DB_USER=my_dataverse_user # # To set a custom Dataverse site URL: # DATAVERSE_SITE_URL=https://dataverse.example.com ``` -------------------------------- ### Install Dependency for Markdown Guides Source: https://github.com/iqss/dataverse/blob/develop/doc/release-notes/6.2-release-notes.md Run this command to install the necessary dependency for supporting Markdown format and tabs in guides. ```bash pip install -r requirements.txt ``` -------------------------------- ### Build External Search Example JARs Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/search-services.md Commands to build external search example JAR files using Maven. Use the appropriate profile based on whether you need GET or POST examples. ```bash mvn clean package -DskipTests=true -Pexternal-search-get -Pexternal-search-post ``` ```bash mvn clean package -DskipTests=true -Ptrivial-search-examples ``` -------------------------------- ### Download README_python.txt Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/installation-main.md Alternative method to access the installer's README file by downloading it directly from the guide's resources. ```html [`README_python.txt`](../../../../scripts/installer/README_python.txt) ``` -------------------------------- ### Build PDF Version of Dataverse Guides with Docker Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/contributor/documentation.md Use this Docker command to build a PDF version of the guides from the root of the git repository. Ensure Docker is installed. The PDF will be located at doc/sphinx-guides/build/latex/Dataverse.pdf. ```bash docker run -it --rm -v $(pwd):/docs sphinxdoc/sphinx-latexpdf:7.4.0 bash -c "cd doc/sphinx-guides && pip3 install -r requirements.txt && make latexpdf LATEXMKOPTS=\"-interaction=nonstopmode\"; cd ../.. && ls -1 doc/sphinx-guides/build/latex/Dataverse.pdf" ``` -------------------------------- ### Setup Rserve Daemon Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/prerequisites.md Executes the Rserve setup script to create a system user, install the init.d startup script, and configure Rserve to run as a daemon process. ```bash cd /scripts/r/rserve ./rserve-setup.sh ``` -------------------------------- ### Example Script for Stress Testing and Monitoring Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/tools.md This example script demonstrates how to stress a Dataverse application with GET requests and then use jmap and jstat to monitor memory allocation and garbage collection. This script is for example purposes and may require modification. ```bash #!/bin/sh ``` -------------------------------- ### Start and Enable Solr on init.d Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/prerequisites.md Commands to start the Solr service and enable it to start on boot for systems using init.d. ```bash cp /tmp/solr /etc/init.d service start solr chkconfig solr on ``` -------------------------------- ### Navigate and Read Installer README Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/installation-main.md Navigate to the 'dvinstall' directory and use 'less' to read the README_python.txt file for detailed installer instructions. This file contains crucial information for configuring the installation. ```bash $ cd dvinstall $ less README_python.txt ``` -------------------------------- ### Install PostgreSQL on Linux Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/classic-dev-env.md Example command to install PostgreSQL on a Linux system using yum. Consult the Dataverse documentation for specific commands for your distribution. ```bash yum install postgresql ``` -------------------------------- ### Build Dataverse Installer Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/making-releases.md Navigate to the installer scripts directory and execute the make clean and make commands to build the dvinstall.zip installer. ```bash cd scripts/installer make clean make ``` -------------------------------- ### Setup Cross-Platform Builder on Linux Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/container/configbaker-image.md Install qemu-user-static and reset the Docker builder for cross-platform image building on Linux. This is a prerequisite for building multi-arch images on non-native architectures. ```bash docker run --rm --privileged multiarch/qemu-user-static --reset -p yes ``` -------------------------------- ### Navigate to Installer Directory Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/classic-dev-env.md Change directory to the Dataverse installer scripts. ```bash cd scripts/installer ``` -------------------------------- ### Start Service Dependencies with Docker Compose Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/classic-dev-env.md Use this command to start necessary service dependencies like PostgreSQL and Solr in detached mode. Ensure you have Docker and Docker Compose installed. ```bash docker-compose -f docker-compose-dev.yml up -d --scale dev_dataverse=0 ``` -------------------------------- ### Run the Dataverse installer script Source: https://github.com/iqss/dataverse/blob/develop/scripts/installer/README_python.txt Execute the new Python installer script using the 'python' or 'python3' command. Use 'python3' if it is installed separately from the default Python 2 version. ```bash python install.py ``` ```bash python3 install.py ``` -------------------------------- ### Install PostgreSQL 16 on RHEL/Derivative Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/prerequisites.md Commands to install PostgreSQL 16, including adding the repository, installing the server package, initializing the database, and enabling the service. ```bash # sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm # sudo dnf check-update # sudo dnf install -y postgresql16-server # sudo /usr/pgsql-16/bin/postgresql-16-setup initdb # sudo /usr/bin/systemctl start postgresql-16 # sudo /usr/bin/systemctl enable postgresql-16 ``` -------------------------------- ### Start and Enable Solr on systemd Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/prerequisites.md Commands to start the Solr service and enable it to start on boot for systems using systemd. ```bash cp /tmp/solr.service /etc/systemd/system systemctl daemon-reload systemctl start solr.service systemctl enable solr.service ``` -------------------------------- ### Install psycopg2-binary Source: https://github.com/iqss/dataverse/blob/develop/scripts/installer/README_python.txt Use this command to install the pre-built binary version of the psycopg2 package, which is a PostgreSQL client required by the installer. This is the recommended method. ```bash pip install psycopg2-binary ``` ```bash pip3 install psycopg2-binary ``` -------------------------------- ### Guides in PDF Format Source: https://github.com/iqss/dataverse/blob/develop/doc/release-notes/5.14-release-notes.md Information on accessing experimental PDF versions of Dataverse guides. ```APIDOC ## Guides in PDF Format ### Description An experimental version of the Dataverse guides is available in PDF format. Advice for contributing to the PDF version is also provided. ### Access - **URL**: http://preview.guides.gdcc.io/_/downloads/en/develop/pdf/ - **Contribution Advice**: https://guides.dataverse.org/en/5.14/developers/documentation.html#pdf-version-of-the-guides ``` -------------------------------- ### Install jq on Red Hat/derivatives Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/prerequisites.md Commands to install the jq utility using dnf, a command-line JSON processor. ```bash # dnf install epel-release # dnf install jq ``` -------------------------------- ### Install Munin Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/admin/monitoring.md Installs the Munin monitoring tool on RHEL or CentOS 7 systems. ```bash yum install munin ``` -------------------------------- ### Set Superuser Status Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Sets the superuser status for a user by providing a boolean value (true or false). Refer to the Dataverse getting started guide for details on using environment variables with curl. ```bash export SERVER_URL=http://localhost:8080 export USERNAME=jdoe export IS_SUPERUSER=true curl -X PUT "$SERVER_URL/api/admin/superuser/$USERNAME" -d "$IS_SUPERUSER" ``` ```bash curl -X PUT "http://localhost:8080/api/admin/superuser/jdoe" -d true ``` -------------------------------- ### Create Installer Directory and Copy WAR File Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/making-releases.md Prepare the target directory and copy the generated WAR file for the installer build process. Ensure the 'target' directory exists. ```bash mkdir target cp /tmp/dataverse-6.10.1.war target ``` -------------------------------- ### GET /api/info/metrics/accounts Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/metrics.md Retrieves the total count of dataverses in the installation as of the current time. ```APIDOC ## GET /api/info/metrics/accounts ### Description Retrieves the total count of dataverses in the Dataverse installation as of now. ### Method GET ### Endpoint /api/info/metrics/accounts ### Response #### Success Response (200) - **count** (integer) - The total number of dataverses. #### Response Example ```json { "count": 150 } ``` ``` -------------------------------- ### Install Swift Client (Optional) Source: https://github.com/iqss/dataverse/blob/develop/scripts/backup/run_backup/README_HOWTO.txt Install the swiftclient module if you intend to add support for backing up files to Swift storage. This is an optional step. ```bash swiftclient ``` -------------------------------- ### Build All Documentation Formats with Make Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/contributor/documentation.md If you have Make installed, this command builds the documentation in all available formats (HTML, PDF, EPUB). ```bash make docs-all ``` -------------------------------- ### Show Dataverse Installation Server Name Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves the server name of the Dataverse installation, useful for multi-server setups behind a load balancer. Ensure the SERVER_URL is correctly exported. ```bash export SERVER_URL=https://demo.dataverse.org curl "$SERVER_URL/api/info/server" ``` ```bash curl "https://demo.dataverse.org/api/info/server" ``` -------------------------------- ### GET /api/info/metrics/accounts/toMonth/{yyyy-MM} Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/metrics.md Retrieves the cumulative count of dataverses in the installation up to a specified month. ```APIDOC ## GET /api/info/metrics/accounts/toMonth/{yyyy-MM} ### Description Retrieves the cumulative count of dataverses in the Dataverse installation up to the specified month. ### Method GET ### Endpoint /api/info/metrics/accounts/toMonth/{yyyy-MM} ### Path Parameters - **yyyy-MM** (string) - Required - The month in 'yyyy-MM' format to retrieve the cumulative count up to. ### Response #### Success Response (200) - **count** (integer) - The cumulative number of dataverses up to the specified month. #### Response Example ```json { "count": 145 } ``` ``` -------------------------------- ### Build HTML Documentation with Sphinx Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/contributor/documentation.md After setting up the environment and installing dependencies, use the 'make html' command to build the documentation. ```bash make html ``` -------------------------------- ### Create and Activate Python Virtual Environment Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/classic-dev-env.md Sets up a Python virtual environment for installing dependencies. Activate it using the `source` command. ```bash python3 -m venv venv ``` ```bash source venv/bin/activate ``` -------------------------------- ### Get a list of active Banner Messages Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieve a list of all currently active banner messages in the Dataverse installation. ```default curl -X GET "http://$SERVER/api/admin/bannerMessage" ``` -------------------------------- ### Download and Install Counter Processor Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/prerequisites.md Run these commands as root to download and install the Counter Processor software. Ensure you are in the /usr/local directory before executing. ```default cd /usr/local wget https://github.com/gdcc/counter-processor/archive/refs/tags/v1.06.tar.gz tar xvfz v1.06.tar.gz cd /usr/local/counter-processor-1.06 ``` -------------------------------- ### Switch to Solr User Source: https://github.com/iqss/dataverse/blob/develop/doc/release-notes/6.0-release-notes.md Become the 'solr' user to perform installation and configuration tasks. Assumes a 'solr' user already exists. ```bash su - solr ``` -------------------------------- ### List All Harvesting Sets Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieve a list of all Harvesting Sets defined in the installation. This is a GET request to the harvesting sets endpoint. ```bash GET http://$SERVER/api/harvest/server/oaisets/ ``` -------------------------------- ### Get Maximum Embargo Duration In Months Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves the maximum duration, in months, for which datasets can be embargoed. This setting is configured in the Dataverse installation. ```APIDOC ## GET /api/info/settings/:MaxEmbargoDurationInMonths ### Description Retrieves the maximum embargo duration allowed for datasets, specified in months. This value is configured during Dataverse installation. ### Method GET ### Endpoint /api/info/settings/:MaxEmbargoDurationInMonths ### Parameters None ### Request Example ```bash curl "https://demo.dataverse.org/api/info/settings/:MaxEmbargoDurationInMonths" ``` ### Response #### Success Response (200) Returns a JSON object with the maximum embargo duration in months. #### Response Example ```json { "maxEmbargoDurationInMonths": 12 } ``` ``` -------------------------------- ### Install Payara Server Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/classic-dev-env.md Commands to install Payara server by unzipping the downloaded archive and setting ownership. Assumes the archive is in /tmp. ```bash cd /usr/local ``` ```bash cp /tmp/payara*zip . ``` ```bash sudo unzip payara*.zip ``` ```bash sudo chown -R $USER /usr/local/payara7 ``` -------------------------------- ### Get Fixity Algorithm Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves the configured fixity/checksum algorithm used by the Dataverse installation. This is useful for understanding how file integrity is managed. ```bash export SERVER_URL=https://demo.dataverse.org curl "$SERVER_URL/api/files/fixityAlgorithm" ``` -------------------------------- ### Build EPUB Documentation with Make Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/contributor/documentation.md If you have Make installed, this command builds the documentation in EPUB format. ```bash make docs-epub ``` -------------------------------- ### Python Example - Basic API Request Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/index.md A simple Python script to make a GET request to the Dataverse API. Requires the 'requests' library. ```python import requests server = "http://localhost:8080" api_token = "abcdef12-3456-7890-abcd-ef1234567890" headers = {"X-Dataverse-Key": api_token} response = requests.get(f"{server}/api/info/version", headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") ``` -------------------------------- ### List All Configured Harvesting Clients Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves a list of all harvesting clients configured in the Dataverse installation. Refer to curl examples for environment variable usage. ```bash export SERVER_URL=https://demo.dataverse.org curl "$SERVER_URL/api/harvest/clients" ``` ```bash curl "https://demo.dataverse.org/api/harvest/clients" ``` -------------------------------- ### Get API Terms of Use URL Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves the URL for the API Terms of Use. This example demonstrates using environment variables for the server URL. ```bash export SERVER_URL=https://demo.dataverse.org curl "$SERVER_URL/api/info/apiTermsOfUse" ``` ```bash curl "https://demo.dataverse.org/api/info/apiTermsOfUse" ``` -------------------------------- ### Maven Release Prepare Interactive Prompts Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/making-library-releases.md Example of the interactive prompts during the 'mvn release:prepare' command. Defaults can often be accepted by pressing Enter. ```bash [INFO] 5/17 prepare:map-release-versions What is the release version for "SWORD v2 Common Server Library (forked)"? (sword2-server) 2.0.0: : [INFO] 6/17 prepare:input-variables What is the SCM release tag or label for "SWORD v2 Common Server Library (forked)"? (sword2-server) sword2-server-2.0.0: : [INFO] 7/17 prepare:map-development-versions What is the new development version for "SWORD v2 Common Server Library (forked)"? (sword2-server) 2.0.1-SNAPSHOT: : [INFO] 8/17 prepare:rewrite-poms-for-release ``` -------------------------------- ### Get Publish Dataset Disclaimer Text Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves the disclaimer text for publishing datasets. The example shows how to use environment variables for the server URL. ```bash export SERVER_URL=https://demo.dataverse.org curl "$SERVER_URL/api/info/settings/:PublishDatasetDisclaimerText" ``` ```bash curl "https://demo.dataverse.org/api/info/settings/:PublishDatasetDisclaimerText" ``` -------------------------------- ### Download and Install Payara Server Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/prerequisites.md Steps to download, unzip, and move the Payara server installation. Ensure you have write permissions to the target directory. ```bash # wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/7.2026.2/payara-7.2026.2.zip # unzip payara-7.2026.2.zip # mv payara7 /usr/local ``` -------------------------------- ### Get Fixity Algorithm Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves the configured fixity/checksum algorithm used by the Dataverse installation. This algorithm is used for file uploads managed by the Dataverse software. ```APIDOC ## GET /api/files/fixityAlgorithm ### Description Retrieves the configured fixity/checksum algorithm used by the Dataverse installation. This algorithm is used for file uploads managed by the Dataverse software. ### Method GET ### Endpoint /api/files/fixityAlgorithm ### Response #### Success Response (200) - **fixityAlgorithm** (string) - The configured fixity algorithm (e.g., MD5, SHA-1, SHA-256, SHA-512). ``` -------------------------------- ### Build HTML Documentation with Make Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/contributor/documentation.md If you have Make installed, this command builds the documentation in HTML format. ```bash make docs-html ``` -------------------------------- ### Start Dataset Migration Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/dataset-migration-api.md Use this command to initiate the migration of a dataset. Requires superuser permissions and a JSON-LD file with dataset metadata. Ensure the PID in the file is supported by your Dataverse instance and update the `dataverse.siteUrl` in the `@context`. ```bash export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx export SERVER_URL=https://demo.dataverse.org export DATAVERSE_ID=root curl -H X-Dataverse-key:$API_TOKEN -X POST $SERVER_URL/api/dataverses/$DATAVERSE_ID/datasets/:startmigration --upload-file dataset-migrate.jsonld ``` -------------------------------- ### Download and Extract Solr Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/prerequisites.md Switches to the solr user, navigates to the installation directory, downloads the specified Solr version, and extracts it. This is part of the initial Solr setup. ```bash su - solr cd /usr/local/solr wget https://archive.apache.org/dist/solr/solr/9.8.0/solr-9.8.0.tgz tar xvzf solr-9.8.0.tgz cd solr-9.8.0 cp -r server/solr/configsets/_default server/solr/collection1 ``` -------------------------------- ### Get List of Active Banner Messages Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves a list of all currently active banner messages configured in the Dataverse installation. This allows administrators to view existing communications. ```APIDOC ## Get a list of active Banner Messages ### Description Retrieves a list of all active banner messages currently configured in the Dataverse installation. This endpoint allows administrators to view the banners that are being displayed to users. ### Method GET ### Endpoint /api/admin/bannerMessage ### Response #### Success Response (200) - **banners** (array) - An array of banner message objects. ``` -------------------------------- ### Get Dataset Download Count Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves the total number of download requests for a dataset. Optionally includes download counts from before MDC start if includeMDC is set to True. ```bash API_TOKEN='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' export DATASET_ID=1 export includeMDC=True curl -s -H "X-Dataverse-key:$API_TOKEN" -X GET http://localhost:8080/api/datasets/$DATASET_ID/download/count curl -s -H "X-Dataverse-key:$API_TOKEN" -X GET http://localhost:8080/api/datasets/$DATASET_ID/download/count?includeMDC=true ``` ```bash curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" "https://demo.dataverse.org/api/datasets/1/download/count?includeMDC=False" ``` -------------------------------- ### List All Database Settings Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Use this command to retrieve all database settings. It requires setting the SERVER_URL environment variable. ```bash export SERVER_URL="http://localhost:8080" curl "$SERVER_URL/api/admin/settings" ``` ```bash curl http://localhost:8080/api/admin/settings ``` -------------------------------- ### Get Effective Dataverse Collection Storage Driver Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/admin/dataverses-datasets.md Retrieves the effective storage driver for a Dataverse collection, which may be inherited from a parent or be the installation default. This will never be null. ```default curl -H "X-Dataverse-key: $API_TOKEN" http://$SERVER/api/dataverses/$dataverse-alias/storageDriver?getEffective=true ``` -------------------------------- ### Prepare WSL Environment Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/windows.md Installs essential packages like zip and unzip in the WSL environment. This is a prerequisite for managing SDKs. ```bash sudo apt update sudo apt install zip ``` ```bash sudo apt update sudo apt install unzip ``` -------------------------------- ### Stub out a new shibboleth.te file Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/selinux.md Initialize a new SELinux TE file with the required module declaration. The 'module' line must be the first line in the file. ```bash echo 'module shibboleth 1.0;' > /root/shibboleth.te ``` -------------------------------- ### Get Effective Storage Driver for a Dataverse Collection Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/admin/dataverses-datasets.md Retrieves the effective storage driver for a Dataverse collection, which may be inherited from a parent collection or be the installation default. This will never be null. ```APIDOC ## GET /api/dataverses/$dataverse-alias/storageDriver?getEffective=true ### Description Retrieves the effective storage driver for a Dataverse collection, considering inheritance and installation defaults. ### Method GET ### Endpoint /api/dataverses/$dataverse-alias/storageDriver?getEffective=true ### Parameters #### Path Parameters - **dataverse-alias** (string) - Required - The alias of the Dataverse collection to query. #### Query Parameters - **getEffective** (boolean) - Required - Set to true to retrieve the effective storage driver. ### Response #### Success Response (200) - **name** (string) - The name of the storage driver. - **label** (string) - The label of the storage driver. (This will never be null.) ``` -------------------------------- ### GET /api/info/metrics/tree Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/metrics.md Retrieves a collection subtree of dataverses starting at the root or a specified parentAlias. Includes details like id, ownerId, alias, name, computed depth, and an array of children dataverses. The underlying code may include draft dataverses, which are not currently accessible via the API. Depth starts at 0. ```APIDOC ## GET /api/info/metrics/tree ### Description Retrieves a collection subtree of dataverses starting at the root or a specified parentAlias with their id, owner id, alias, name, a computed depth, and array of children dataverses. ### Method GET ### Endpoint /api/info/metrics/tree ### Query Parameters - **parentAlias** (string) - Optional - The alias of the parent dataverse to start the tree from. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the dataverse. - **ownerId** (integer) - The unique identifier of the owner of the dataverse. - **alias** (string) - The alias of the dataverse. - **name** (string) - The name of the dataverse. - **depth** (integer) - The computed depth of the dataverse in the tree, starting at 0. - **children** (array) - An array of child dataverse objects. #### Response Example ```json { "id": 1, "ownerId": 0, "alias": "root", "name": "root", "depth": 0, "children": [ { "id": 2, "ownerId": 1, "alias": "dataverse1", "name": "Dataverse One", "depth": 1, "children": [] } ] } ``` ``` -------------------------------- ### Configure Sign-Up URL Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/config.md Set the relative path URL for user sign-up. The default is provided. ```bash curl -X PUT -d '/dataverseuser.xhtml?editMode=CREATE' http://localhost:8080/api/admin/settings/:SignUpUrl ``` -------------------------------- ### SAMLtest IdP Session Attributes Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/shibboleth.md This is an example of the attributes you should see when troubleshooting your Dataverse installation's SAML session with the SAMLtest Identity Provider. It displays user information and authentication details. ```none Miscellaneous Session Expiration (barring inactivity): 479 minute(s) Client Address: 75.69.182.6 SSO Protocol: urn:oasis:names:tc:SAML:2.0:protocol Identity Provider: https://samltest.id/saml/idp Authentication Time: 2019-11-28T01:23:28.381Z Authentication Context Class: urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport Authentication Context Decl: (none) Attributes displayName: Rick Sanchez eppn: rsanchez@samltest.id givenName: Rick mail: rsanchez@samltest.id sn: Sanchez telephoneNumber: +1-555-555-5515 uid: rick ``` -------------------------------- ### Install Java and Maven using SDKMAN Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/developers/windows.md Installs specific versions of Java (21) and Maven using SDKMAN. Ensure SDKMAN is initialized before running these commands. ```bash sdk install java 21 ``` ```bash sdk install maven ``` -------------------------------- ### Get Dataset Submit For Review Popup Custom Text Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves the custom text for the dataset submission for review popup. This example demonstrates using environment variables for the server URL. ```bash export SERVER_URL=https://demo.dataverse.org curl "$SERVER_URL/api/info/settings/:DatasetSubmitForReviewPopupCustomText" ``` ```bash curl "https://demo.dataverse.org/api/info/settings/:DatasetSubmitForReviewPopupCustomText" ``` -------------------------------- ### Get Information about Configured PID Providers Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Retrieves information about the configured Persistent Identifier (PID) Providers within the Dataverse installation. This includes details on how new dataset and datafile PIDs are generated. ```APIDOC ## GET /api/pids/providers ### Description Retrieves information about the configured Persistent Identifier (PID) Providers within the Dataverse installation. This includes details on how new dataset and datafile PIDs are generated. ### Method GET ### Endpoint /api/pids/providers ### Response #### Success Response (200) - **response** (JSONObject) - A JSON object listing configured providers and their management details. ``` -------------------------------- ### Configure License Properties Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/config.md Example of how to configure license names and descriptions in properties files for internationalization. Ensure license names are converted to lowercase with spaces replaced by underscores for key creation. ```properties license.cc0_1.0.description=Creative Commons CC0 1.0 Universal Public Domain Dedication. license.cc0_1.0.name=CC0 1.0 ``` -------------------------------- ### Payara 7 domain.xml JVM Options Source: https://github.com/iqss/dataverse/blob/develop/doc/release-notes/6.10-release-notes.md Example of Dataverse-related JVM options to be added to the Payara 7 domain.xml file. Ensure paths are updated to reflect the new Payara 7 installation directory. ```xml -Ddataverse.files.directory=/usr/local/dvn/data -Ddataverse.files.file.type=file -Ddataverse.files.file.label=file ``` -------------------------------- ### Get PID Info using cURL (with environment variables) Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/native-api.md Example using cURL to retrieve information about a Persistent Identifier (PID), requiring a superuser API token and specifying the server URL and PID. ```bash export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx export SERVER_URL=https://demo.dataverse.org export PID=doi:10.70122/FK2/9BXT5O curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/pids?persistentId=$PID" ``` -------------------------------- ### Enable Public Install Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/config.md Set the PublicInstall option to true to disable file and dataset restrictions. Use this when files are stored in public access. ```bash curl -X PUT -d true http://localhost:8080/api/admin/settings/:PublicInstall ``` -------------------------------- ### Iterate Through Search Results in Python Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/api/search.md This Python script demonstrates how to paginate through all search results from the Dataverse API. It uses the `start` and `per_page` parameters to fetch results in batches until all items are retrieved. Ensure you have the `urllib2` and `json` libraries installed. ```Python #!/usr/bin/env python import urllib2 import json base = 'https://demo.dataverse.org' rows = 10 start = 0 page = 1 condition = True # emulate do-while while (condition): url = base + '/api/search?q=*' + "&start=" + str(start) data = json.load(urllib2.urlopen(url)) total = data['data']['total_count'] print "=== Page", page, "===" print "start:", start, " total:", total for i in data['data']['items']: print "- ", i['name'], "(" + i['type'] + ")" start = start + rows page += 1 condition = start < total ``` -------------------------------- ### Enable Apache and Shibd to Start at Boot (CentOS 6) Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/shibboleth.md Enable the httpd and shibd services to start automatically at boot on CentOS 6. ```bash chkconfig httpd on chkconfig shibd on ``` -------------------------------- ### Enable Apache and Shibd to Start at Boot (CentOS 7/8) Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/shibboleth.md Enable the httpd and shibd services to start automatically at boot on CentOS 7 and 8. ```bash systemctl enable httpd.service systemctl enable shibd.service ``` -------------------------------- ### Add Web Analytics Code to Dataverse Source: https://github.com/iqss/dataverse/blob/develop/doc/sphinx-guides/source/installation/config.md This example shows how to add Google Analytics code to your Dataverse installation by creating a custom HTML file and updating the WebAnalyticsCode setting via curl. Ensure the 'async' attribute is set to 'async="async"' for compatibility. ```html ``` ```bash curl -X PUT -d '/var/www/dataverse/branding/analytics-code.html' http://localhost:8080/api/admin/settings/:WebAnalyticsCode ```