API to create an archive?

304 views
Skip to first unread message

Mazzaroth M.

unread,
May 11, 2015, 5:12:32 PM5/11/15
to memen...@googlegroups.com
I'd like to use archive.is to generate an archive for a web page, but via an API. On archive.is' FAQ page there is this:


Reading around, it's not clear to me how I can do a GET or a POST to archive.is to get returned a URL of the archived content. Any help on how to do this?

Mat Kelly

unread,
May 14, 2015, 11:54:58 AM5/14/15
to memen...@googlegroups.com
Mazzaroth,
I believe the task of submitting URIs to be archived is out of the functional scope of Memento, which is more about archive access.

Despite this, when I developed Mink, I simply extracted the functionality of their URI submission form into an Ajax request. The response from archive.is (previously archive.today and previously archive.is) contains information on the success/failure of the submission as well as the URI of the memento.


-Mat

Michael Nelson

unread,
May 14, 2015, 12:04:03 PM5/14/15
to memen...@googlegroups.com

$ curl -i -d url=http://www.cs.odu.edu/~mln/ http://archive.is/submit/
HTTP/1.1 200 OK
Cache-Control: private, no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Refresh: 0;url=http://archive.is/xVboc
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 14 May 2015 16:01:53 GMT
Connection: keep-alive
Server: nginx/1.6.2

<html><body>
<script>setTimeout(function(){document.location.replace("http://archive.is/xVboc")},1000)</script>
<div>
<img width="48" height="48" style="vertical-align:middle"
src="http://archive.is/loading.gif"/>
<span
style="vertical-align:middle;font-size:48px;padding-left:5px">Loading</span>
<hr/>
</div>
</body></html>



you can read the value either from the "Refresh" header or pull it out of
the html.

regards,

Michael

On Thu, 14 May 2015, Mat Kelly wrote:

> Mazzaroth,I believe the task of submitting URIs to be archived is out of the functional scope of Memento,
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "Memento Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> memento-dev...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

----
Michael L. Nelson m...@cs.odu.edu http://www.cs.odu.edu/~mln/
Dept of Computer Science, Old Dominion University, Norfolk VA 23529
+1 757 683 6393 +1 757 683 4900 (f)

Mazzaroth M.

unread,
May 19, 2015, 6:52:49 AM5/19/15
to memen...@googlegroups.com
Michael & Mat: these are both great, thanks.
Reply all
Reply to author
Forward
0 new messages