{"id":595,"date":"2018-02-12T16:44:01","date_gmt":"2018-02-12T16:44:01","guid":{"rendered":"http:\/\/blogs.harvard.edu\/perma\/?p=595"},"modified":"2018-02-16T16:21:44","modified_gmt":"2018-02-16T16:21:44","slug":"how-the-harvard-national-security-journal-uses-the-perma-cc-api","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/perma\/2018\/02\/12\/how-the-harvard-national-security-journal-uses-the-perma-cc-api\/","title":{"rendered":"How the Harvard National Security Journal Uses the Perma.cc API"},"content":{"rendered":"<p><em>Guest post from Harvard Law J.D. student Aaron Marks:<\/em><\/p>\n<p><span style=\"font-weight: 400\">As the Online Editor for the<\/span><strong><a href=\"http:\/\/harvardnsj.org\/\"> Harvard National Security Journal<\/a><\/strong><span style=\"font-weight: 400\">, I am the go-to person for many of the Journal\u2019s technical questions. \u00a0This semester I was able to put my technical skills to use by implementing a new tool that uses the Perma API. \u00a0The National Security Journal\u2019s fall issue (<\/span><strong><a href=\"http:\/\/harvardnsj.org\/2018\/01\/volume-9-issue-1\/\">out now!<\/a><\/strong><span style=\"font-weight: 400\">) contains several hundred weblinks. \u00a0We wanted to use Perma so that the content at those links would be permanently accessible. \u00a0But we did not want to manually create Perma archives for hundreds of URLs, which could take some time.<\/span><\/p>\n<p><span style=\"font-weight: 400\">On a hunch, I suspected that Perma might have an API that would enable us to programmatically generate these links. \u00a0It turned out that not only did Perma have an<\/span><strong><a href=\"https:\/\/perma.cc\/docs\/developer\"> API<\/a><\/strong><span style=\"font-weight: 400\">, but it was surprisingly simple to setup and use. \u00a0In just a few hours, I wrote <\/span><strong><a href=\"https:\/\/github.com\/aaronmarks\/autoperma\">a Ruby application<\/a><\/strong><span style=\"font-weight: 400\"> that could import a spreadsheet of URLs, generate Perma archives for those URLs, and output a new spreadsheet that includes the URLs for each new Perma archive.\u00a0<a href=\"http:\/\/blogs.harvard.edu\/perma\/files\/2018\/02\/Screen-Shot-2018-02-16-at-11.15.15-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-601\" src=\"http:\/\/blogs.harvard.edu\/perma\/files\/2018\/02\/Screen-Shot-2018-02-16-at-11.15.15-AM-1024x572.png\" alt=\"\" width=\"649\" height=\"363\" srcset=\"https:\/\/archive.blogs.harvard.edu\/perma\/files\/2018\/02\/Screen-Shot-2018-02-16-at-11.15.15-AM-1024x572.png 1024w, https:\/\/archive.blogs.harvard.edu\/perma\/files\/2018\/02\/Screen-Shot-2018-02-16-at-11.15.15-AM-300x167.png 300w, https:\/\/archive.blogs.harvard.edu\/perma\/files\/2018\/02\/Screen-Shot-2018-02-16-at-11.15.15-AM-768x429.png 768w, https:\/\/archive.blogs.harvard.edu\/perma\/files\/2018\/02\/Screen-Shot-2018-02-16-at-11.15.15-AM-676x377.png 676w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400\">In addition to programming with the Perma API, the experience let me interact with the Perma support team. \u00a0This happened when I discovered a bug: on creating a new Perma archive, our custom archive title would revert, after a few seconds, back to the default title that Perma generates when a custom title is not submitted. \u00a0Luckily the Perma support team was quite responsive after I reported the bug. \u00a0In fact, they resolved the problem before the Journal published our latest issue.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Although I was a software engineer before coming to law school, I have not coded much in the past three years and so my programming skills were somewhat rusty. \u00a0Happily, the API was very user-friendly and easily enabled our Journal to programmatically generate Perma archives. \u00a0I would recommend trying the Perma API to integrate Perma archives into your publication, website, software application, or anything else that links to web-content that you want to be preserved.<\/span><\/p>\n<p><span style=\"font-weight: 400\">PS \u2013 Special thanks to Brett and Rebecca from Perma who helped fix the bug that I discovered!<\/span><\/p>\n<p><i><span style=\"font-weight: 400\">Aaron Marks is a third-year J.D. student at Harvard Law School. \u00a0He is currently the Online Editor of the Harvard National Security Journal.<\/span><\/i><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Guest post from Harvard Law J.D. student Aaron Marks: As the Online Editor for the Harvard National Security Journal, I am the go-to person for many of the Journal\u2019s technical questions. \u00a0This semester I was able to put my technical skills to use by implementing a new tool that uses the Perma API. \u00a0The National [&hellip;]<\/p>\n","protected":false},"author":6300,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-595","post","type-post","status-publish","format-standard","hentry","category-uncategorized","post-preview"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4RYx6-9B","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/posts\/595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/users\/6300"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/comments?post=595"}],"version-history":[{"count":6,"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/posts\/595\/revisions"}],"predecessor-version":[{"id":602,"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/posts\/595\/revisions\/602"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/media?parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/categories?post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/perma\/wp-json\/wp\/v2\/tags?post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}