Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an API to upload web archives #828

Open
refparo opened this issue Jul 4, 2021 · 5 comments
Open

Provide an API to upload web archives #828

refparo opened this issue Jul 4, 2021 · 5 comments

Comments

@refparo
Copy link

refparo commented Jul 4, 2021

So that it could work with browser extensions like https://github.com/machawk1/warcreate

@despens
Copy link
Contributor

despens commented Jul 4, 2021

There is an API already, please see https://conifer.rhizome.org/docs/api

@refparo
Copy link
Author

refparo commented Jul 5, 2021

Thanks! A link to this API doc should be provided on the main page.

@refparo
Copy link
Author

refparo commented Jul 5, 2021

How is it exactly used? I tried

curl --cookie "__wr_sesh=(***)" \
  -X "PUT" 'https://conifer.rhizome.org/api/v1/upload' \
  -H 'accept: application/json' \
  --upload-file ./20210705110711693.warc

but kept getting {"error": "not_found"}

@refparo
Copy link
Author

refparo commented Jul 5, 2021

After some experiments with curl, now I can't even upload a warc on the website... The response was a 500 internal server error.

@m4rk3r
Copy link
Member

m4rk3r commented Jul 7, 2021

hey @refparo, we haven't published that API because it still needs some additional details as you are finding out -- sorry about that. You also need to supply the filename in a filename query param. Here's the frontend code as an example. force-coll can be used to add the warc to an existing collection.

Are you still getting a 500 when attempting on the site now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants