Skip to content

Upstream quirks

Behavior of the live Dataverse native API, with the guides.dataverse.org API documentation as the reference. Observations below come from the Harvard Dataverse (dataverse.harvard.edu, version 6.12.1) in November 2026. Where a quirk affects bibliofabric.dataverse, the behavior of the client is noted.

One base URL, many installations

More than one hundred installations serve the same API with their own configuration: enabled metadata blocks, exporters, licenses, and metrics differ per installation. bibliofabric.dataverse therefore keeps base_url a setting (default https://dataverse.harvard.edu/api/v1/) and treats per-installation facts as data, not constants.

Identifiers and routing

  • The root collection answers 404 under the alias root on Harvard; the alias of the root collection is harvard. Other installations name theirs differently; subtree=harvard works on the search route.
  • A dataset takes a numeric id (46625) or a persistent id (doi:10.7910/DVN/27221). The persistent id routes spell the id in the path as the literal :persistentId and carry the value in a persistentId query parameter. bibliofabric.dataverse picks the route from the argument's shape.
  • Search results carry no numeric id by default. entity_id appears only with show_entity_ids=true; without it, only global_id (the persistent id) identifies a result.
  • File search results spell the numeric id file_id and the dataset id as a string dataset_id.

Search route

  • The envelope nests results twice: data.items. Every other list route answers data as a bare array. The unwrapper reads both.
  • per_page caps at 1,000; larger values answer an error.
  • sort reads name, date, and score; the direction travels in a separate order parameter (asc/desc). The client accepts the combined "date:desc" spelling and splits it.
  • type accepts one value or a list (dataset, file, dataverse); unknown values answer 400.
  • subtree and fq repeat as query parameters; so does type.

Datasets, versions, and files

  • /datasets/{id} returns the dataset with latestVersion nested. Version routes take the specifiers :latest, :draft, :latest-published, or a major.minor pair; a bare major number is not a version. bibliofabric.dataverse validates the specifier before sending.
  • The version listing (versions) and the files of one version (versions/{v}/files) page with limit and offset, unlike the search route's start and per_page. Neither reports a total; the Page.total of those listings is None.
  • The files route of a version takes filter parameters (contentType, categoryName, tabularTagName, searchText, accessStatus, orderCriteria). bibliofabric.dataverse passes them through a filters mapping and rejects unknown keys and unknown orderCriteria/accessStatus values before sending, because the route answers 400 for a bad value.
  • A dataset version carries its metadata as typed fields (typeName, multiple, typeClass, value). Primitive fields hold a string, multiple fields a list, compound fields a list of objects whose members are further typed fields. The model keeps the values exactly as the API serves them.

Files and downloads

  • /files/{id} answers a file metadata entry with dataFile nested inside; the numeric id lives in dataFile.id, not at the top level. There is no route that lists the versions of one file: the literal /files/{id}/versions answers 404 ("API endpoint does not exist"), and a file's version membership can only be read from the file listings of each dataset version.
  • GET /access/datafile/{id} serves the bytes and answers 206 Partial Content for a Range request. It also answers for a persistent id route and takes format=original (the uploaded bytes instead of the converted ones) and imageThumb sizes.
  • GET /access/dataset/{id} streams every released file of a dataset as one zip, rejects a Range request with 406, and rejects the Accept: application/json header with 406 ("API endpoint does not accept your request") unless the request carries Accept: application/zip or */*; the datafile route tolerates both. The client sends Accept: application/zip on the dataset bundle route.
  • Both download routes redirect and the client follows the redirects, writing through the atomic core helper. The datafile route redirects to a presigned storage URL; the dataset bundle redirects to the installation's zip service (an rserve CGI host on Harvard, not the API host).

Collections

  • /dataverses/{alias}/contents answers one unpaged list with child collections first and child datasets second. The root of a busy installation makes this route slow; Harvard's root times out. The client does not page it and the docs warn about large collections.
  • /dataverses/{alias}/facets answers facet names as plain strings; with returnDetails=true it answers objects with id, displayName, and name.

Metadata blocks and exports

  • /metadatablocks lists the blocks the installation defines (24 on Harvard). /metadatablocks/{name}?returnDatasetFieldTypes=true returns the full definition: fields maps each typeName to its definition, including childFields, controlledVocabularyValues, and isRequired. Without the parameter Harvard still returns the fields; the client sends the parameter by default and exposes a return_field_types=False switch that only drops it.
  • /datasets/export?exporter=...&persistentId=... answers raw text (Datacite XML, dataverse_json, and so on), not the JSON envelope. The exporter set is per installation (/info/exportFormats lists 12 on Harvard, including Datacite, dataverse_json, ddi, croissant, and schema.org); the display names differ from the exporter values (Datacite answers DataCite). The client rejects a persistent id that is not one and an exporter with path characters before sending.

Info and metrics

  • /info/version answers {"version": "6.12.1", "build": ...}; /info/server answers the host name under the key message, a leftover of the route's original notification use. The client names the field server.
  • There is no route that lists the available metrics. The documented names (datasets, dataverses, files, downloads, and their /bySubject, /byCategory, and byMake variants) work as path segments under /info/metrics/; an unknown name answers 404. The suffixes /monthly, /toMonth/YYYY-MM, and /pastDays/n are separate arguments in the client, and the client rejects a name that already ends in one of the suffixes.
  • /info/metrics itself answers 404 on Harvard. parentAlias, dataLocation (local, remote, all), and country are query parameters on the metrics routes.
  • Metrics time series answer a JSON array of {"date": "YYYY-MM", "count": n} objects; single-count metrics answer one object with count. The MetricResponse model keeps count for the object shape and the raw list in data.

Errors

The framework maps the HTTP status of an answer to its error class: an unknown identifier answers 404 and the client raises NotFoundError; a malformed request that passes the client's local checks (a per_page above 1,000 forced through params=, for example) answers 400 and raises APIError; a 401 or 403 raises AuthError; a 429 raises RateLimitError. Bad sort fields, type values, metric names, month spellings, files filters, and version specifiers never reach the API; they raise ConfigurationError before the request.

Rate limits

The documentation names no rate limit. Sustained reads at 2 requests per second against Harvard answered no 429s during development; the client keeps a default pace under 2 requests per second with no special rate class. If an installation answers 429, the framework's retry handling honors Retry-After.

Routes outside this client

The native API has more routes than this client wraps. Not covered:

  • Write routes, which need an API key: create and publish datasets, upload and replace files, manage dataverses, roles, and permissions (the SWORD API too).
  • /api/datasets/{id}/versions/{v}/metadata with ?exclude= blocks/fields subset selections beyond the whole-block read.
  • Per-dataset DataCite and citation metadata routes (/api/datasets/{id}/metadata/datacite and similar).
  • The files bundle: dateCitations (/api/datasets/{id}/citations), DDI codebook variants (/api/datasets/{id}/versions/{v}/ddi and /api/access/datafile/{id}?format=ddi is wrapped through output_format=), file provenance, and the files/{id}/metadata write routes.
  • dirindex (/api/datasets/{id}/dirindex), per-file downloadCount, dataTables, Make Data Count per-dataset metrics, licenses list, dataset types, guestbooks, notifications, mydata, PID variants (/api/pids), harvest server management, user routes, featured items, and the Swagger/OpenAPI document itself.
  • Batch download of several files by id list (/api/access/datafiles), which needs a POST body.