Skip to content

Return file info in GetPrivateUrlDataset use case #477

Open

Description

@vera

The dataverse API for retrieving a dataset using a private URL /api/datasets/privateUrlDatasetVersion/... returns information about dataset files, but the transformer used by the GetPrivateUrlDataset use case doesn't transform it, so it's not returned:

public async getPrivateUrlDataset(token: string, keepRawFields: boolean): Promise<Dataset> {
return this.doGet(
this.buildApiEndpoint(this.datasetsResourceName, `privateUrlDatasetVersion/${token}`),
false,
{
returnOwners: true
}
)
.then((response) => transformVersionResponseToDataset(response, keepRawFields))
.catch((error) => {
throw error
})
}

Image

It would be useful to receive the file info from that use case.

Should the use case/transformer be extended? If yes, I'd be open to creating a PR for that.

Activity

  1. ChengShi-1 commented on Aug 20, 2026

    @ChengShi-1
    Contributor

    Thanks for bringing this up. It's true that we are missing this. I am working on a PR for adding previewURLtoken param to GetDataset use cases #473 , I'd like to use that API for get dataset with previewURL instead, but feel free to open a PR if you're actively using this use case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions