Back to Blog
Tutorial

Seamless Integration: Connecting Ekayana with Harvard Dataverse

Step-by-step guide to integrating your Dataverse repository with Ekayana for enhanced discoverability and decentralized backup.

Antra
November 20, 2025
15 min read

Why Integrate with Dataverse?

Harvard Dataverse is one of the world's leading research data repositories. By integrating Ekayana with Dataverse, you get:

  • Decentralized backup: Your data is replicated across IPFS nodes
  • Enhanced discoverability: AI-powered metadata enrichment
  • Persistent identifiers: DIDs that complement DOIs
  • GDPR compliance: Built-in privacy controls

Prerequisites

Before starting, ensure you have:

  • A Dataverse account with API access
  • An Ekayana API key
  • Node.js 18+ installed

Step 1: Install the SDK

bash
npm install @ekayana/sdk @ekayana/dataverse-connector

Step 2: Configure the Connection

typescript
import { EkayanaClient } from '@ekayana/sdk';
import { DataverseConnector } from '@ekayana/dataverse-connector';

const client = new EkayanaClient({
  apiKey: process.env.EKAYANA_API_KEY
});

const dataverse = new DataverseConnector({
  serverUrl: 'https://dataverse.harvard.edu',
  apiToken: process.env.DATAVERSE_API_TOKEN
});

// Link the connector to Ekayana
client.use(dataverse);

Step 3: Sync a Dataset

typescript
// Import an existing Dataverse dataset
const dataset = await client.dataverse.import({
  doi: 'doi:10.7910/DVN/EXAMPLE',
  options: {
    createDID: true,
    pinToIPFS: true,
    extractMetadata: true
  }
});

console.log('DID:', dataset.did);
console.log('IPFS CID:', dataset.cid);
console.log('Extracted entities:', dataset.metadata.entities);

Step 4: Enable Bidirectional Sync

typescript
// Set up automatic synchronization
await client.dataverse.enableSync({
  dataverseDoi: 'doi:10.7910/DVN/EXAMPLE',
  ekayanaDid: dataset.did,
  direction: 'bidirectional',
  interval: '1h'
});

Step 5: Publish Updates

When you update data in Ekayana, it automatically syncs to Dataverse:

typescript
// Upload new file to Ekayana
const file = await client.content.upload('./new-data.csv', {
  did: dataset.did,
  metadata: { description: 'Updated dataset' }
});

// Sync triggers automatically, or manually:
await client.dataverse.sync(dataset.did);

Advanced: Custom Metadata Mapping

typescript
// Define custom field mappings
const mapping = {
  'ekayana:researchers': 'dataverse:author',
  'ekayana:keywords': 'dataverse:keyword',
  'ekayana:license': 'dataverse:license'
};

await client.dataverse.setMapping(dataset.did, mapping);

Troubleshooting

Issue: Sync fails with authentication error Solution: Regenerate your Dataverse API token and update the configuration

Issue: Metadata not appearing in Dataverse Solution: Check that your Dataverse has the required metadata blocks enabled

For more details, see our Dataverse Integration documentation.

Ready to Get Started?

Explore our documentation to learn how to integrate Ekayana into your research workflow.