Stream: community

Topic: โœ” Upload File via Native API


view this post on Zulip Ayu Widi (Oct 30 2023 at 07:01):

Hello ,
I am tried to upload files to a dataset using CURL command in the console as mentioned in https://guides.dataverse.org/en/5.4.1/api/native-api.html#id66 , and the file is successfully created.
But when i try to hit the upload API via Postman, it always return :
{"status":"ERROR","code":404,"message":"API endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org." ....etc

Is it because of upload file is not a kind of CORS API, or something else? Thank you

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 30 2023 at 11:48):

Does the "path" of the URL look something like this?

/api/datasets/:persistentId/add?persistentId=doi:10.5072/FK2/J8SJZB

view this post on Zulip Ayu Widi (Oct 31 2023 at 04:30):

Philip Durbin said:

Does the "path" of the URL look something like this?

/api/datasets/:persistentId/add?persistentId=doi:10.5072/FK2/J8SJZB

yes, exactly

view this post on Zulip Ayu Widi (Oct 31 2023 at 04:50):

Ayu Widi said:

Philip Durbin said:

Does the "path" of the URL look something like this?

/api/datasets/:persistentId/add?persistentId=doi:10.5072/FK2/J8SJZB

yes, exactly

I tried to create a simple PHP script to add file to dataset, and now it works well. thank you

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 31 2023 at 11:05):

Oh! Great! Thanks for letting us know.

view this post on Zulip Notification Bot (Oct 31 2023 at 11:05):

Philip Durbin has marked this topic as resolved.


Last updated: Nov 01 2025 at 14:11 UTC