<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Hi Jason,</div><div class=""><br class=""></div><div class="">As I said, terms are managed via their parent records’ endpoints. So, for example:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">POST /subjects</div><div class="">{</div><div class=""> "source": "local",</div><div class=""> "terms":</div><div class=""> [</div><div class=""> {</div><div class=""> "term": "Sausages",</div><div class=""> "term_type": "cultural_context",</div><div class=""> "vocabulary": "/vocabularies/1"</div><div class=""> }</div><div class=""> ],</div><div class=""> "vocabulary": "/vocabularies/1”</div><div class="">}</div></blockquote><div class=""><br class=""></div><div class="">Will return something like:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">{</div><div class=""> "status": "Created",</div><div class=""> "id": 4,</div><div class=""> "lock_version": 0,</div><div class=""> "stale": true,</div><div class=""> "uri": "/subjects/4",</div><div class=""> "warnings": []</div><div class="">}</div></blockquote><div class=""><br class=""></div><div class="">And then, you can do:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">/terms q=Saus</div><div class="">{</div><div class=""> "first_page": 1,</div><div class=""> "last_page": 1,</div><div class=""> "this_page": 1,</div><div class=""> "results":</div><div class=""> [</div><div class=""> {</div><div class=""> "lock_version": 0,</div><div class=""> "term": "Sausages",</div><div class=""> "created_by": "admin",</div><div class=""> "last_modified_by": "admin",</div><div class=""> "create_time": "2017-02-09T23:16:24Z",</div><div class=""> "system_mtime": "2017-02-09T23:16:24Z",</div><div class=""> "user_mtime": "2017-02-09T23:16:24Z",</div><div class=""> "term_type": "cultural_context",</div><div class=""> "jsonmodel_type": "term",</div><div class=""> "uri": "/terms/5",</div><div class=""> "vocabulary": "/vocabularies/1"</div><div class=""> }</div><div class=""> ]</div><div class="">}</div></blockquote><div class=""><br class=""></div><div class="">And, yes, the id in the uri is the db id, so:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Courier New" class="">mysql> select id, vocab_id, term, term_type_id from term where id=5;</font></div><div class=""><font face="Courier New" class="">+----+----------+----------+--------------+</font></div><div class=""><font face="Courier New" class="">| id | vocab_id | term | term_type_id |</font></div><div class=""><font face="Courier New" class="">+----+----------+----------+--------------+</font></div><div class=""><font face="Courier New" class="">| 5 | 1 | Sausages | 1267 |</font></div><div class=""><font face="Courier New" class="">+----+----------+----------+--------------+</font></div><div class=""><font face="Courier New" class="">1 row in set (0.00 sec)</font></div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I you wanted to do bulk updates to terms you could do it via the db, or write an endpoint to do it.</div><div class=""><br class=""></div><div class="">Hope that helps.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">James</div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 10, 2017, at 10:05 AM, Jason Loeffler <<a href="mailto:j@minorscience.com" class="">j@minorscience.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra">Thanks, James. Looking at the docs again, I now see my misunderstanding. </div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">term.*.uri is indeed misleading. Could be a mnemonic for the term database identifier (<a href="http://term.id/" class="">term.id</a>) or otherwise a development artifact.</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">So I take it 1) terms can't be updated by conventional means (i.e. the API) and 2) my primary alternative is to issue database queries in order to perform bulk updates to a set of terms? </div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">JL</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Feb 9, 2017 at 5:40 PM, James Bullen<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:james@hudmol.com" target="_blank" class="">james@hudmol.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><br class=""></div>Hi Jason,<div class=""><br class=""></div><div class="">There is a GET /terms endpoint. It does a search and takes a q=.</div><div class=""><br class=""></div><div class="">There is no GET /terms/:id - I guess this is the one that’s giving you a Not Found.</div><div class=""><br class=""></div><div class="">And there is no POST /terms.</div><div class=""><br class=""></div><div class="">Here’s the controller:</div><div class=""><a href="https://github.com/archivesspace/archivesspace/blob/master/backend/app/controllers/term.rb" target="_blank" class="">https://github.com/<wbr class="">archivesspace/archivesspace/<wbr class="">blob/master/backend/app/<wbr class="">controllers/term.rb</a></div><div class=""><br class=""></div><div class="">Terms aren’t really first order objects (they get managed via their parent object), so I’m not sure why they have a uri. For example:</div><div class=""><br class=""></div><div class=""><br class=""></div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><div class="">/terms q=Audio</div><div class="">{</div><div class=""> "first_page": 1,</div><div class=""> "last_page": 1,</div><div class=""> "this_page": 1,</div><div class=""> "results":</div><div class=""> [</div><div class=""> {</div><div class=""> "lock_version": 0,</div><div class=""> "term": "Audio",</div><div class=""> "created_by": "admin",</div><div class=""> "last_modified_by": "admin",</div><div class=""> "create_time": "2017-02-07T05:34:29Z",</div><div class=""> "system_mtime": "2017-02-07T05:34:29Z",</div><div class=""> "user_mtime": "2017-02-07T05:34:29Z",</div><div class=""> "term_type": "genre_form",</div><div class=""> "jsonmodel_type": "term",</div><div class=""> "uri": "/terms/3",</div><div class=""> "vocabulary": "/vocabularies/1"</div><div class=""> }</div><div class=""> ]</div><div class="">}</div><div class=""><br class=""></div></blockquote><div class="">You see it has a uri (/terms/3), but that is a bit of a lie because there is no corresponding endpoint. There could well be a good reason for this, but I’m not aware of it.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">James</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 10, 2017, at 6:40 AM, Jason Loeffler <<a href="mailto:j@minorscience.com" target="_blank" class="">j@minorscience.com</a>> wrote:</div><br class="gmail-m_-6770221942890355445Apple-interchange-newline"><div class=""><div dir="ltr" class="">Can anyone confirm whether the GET method for terms works? I'm getting 'Not Found'. Also, is there an undocumented POST method for terms?<div class=""><div class=""><br class=""></div><div class="">Thanks.</div><div class=""><br clear="all" class=""><div class=""><div class="gmail-m_-6770221942890355445gmail_signature"><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div class=""><font size="2" face="garamond, serif" color="#666666" style="background-color: rgb(255, 255, 255);" class="">Jason Loeffler</font></div><div class=""><font size="2" face="garamond, serif" color="#666666" style="background-color: rgb(255, 255, 255);" class="">Technology Consultant | </font><span style="color: rgb(102, 102, 102); font-family: garamond, serif;" class="">The American Academy in Rome</span></div><div class=""><font size="2" face="garamond, serif" color="#666666" style="background-color: rgb(255, 255, 255);" class="">Minor Science | Application Development & Metadata Strategy</font></div><div class=""><font size="2" face="garamond, serif" color="#666666" style="background-color: rgb(255, 255, 255);" class="">Brooklyn, New York</font></div></div><div class=""><font size="2" face="garamond, serif" color="#666666" style="background-color: rgb(255, 255, 255);" class=""><a href="mailto:jason@minorscience.com" target="_blank" class="">jason@minorscience.com</a></font></div><div class=""><font size="2" face="garamond, serif" color="#666666" style="background-color: rgb(255, 255, 255);" class=""><a href="tel:(347)%20405-0826" value="+13474050826" target="_blank" class="">(347) 405-0826</a></font></div><div class=""><font size="2" face="garamond, serif" color="#666666" style="background-color: rgb(255, 255, 255);" class="">minorscience (Skype)</font></div><div class=""><br class=""><br class=""></div></div></div></div></div></div></div></div>______________________________<wbr class="">_________________<br class="">Archivesspace_Users_Group mailing list<br class=""><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" target="_blank" class="">Archivesspace_Users_Group@<wbr class="">lyralists.lyrasis.org</a><br class=""><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" target="_blank" class="">http://lyralists.lyrasis.org/<wbr class="">mailman/listinfo/<wbr class="">archivesspace_users_group</a><br class=""><br class=""><br class="">!DSPAM:589cc60444364107784971!<br class=""></div></blockquote></div><br class=""></div></div><br class="">______________________________<wbr class="">_________________<br class="">Archivesspace_Users_Group mailing list<br class=""><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@<wbr class="">lyralists.lyrasis.org</a><br class=""><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" rel="noreferrer" target="_blank" class="">http://lyralists.lyrasis.org/<wbr class="">mailman/listinfo/<wbr class="">archivesspace_users_group</a><br class=""><br class=""></blockquote></div><br class=""></div></div><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">!DSPAM:589cf5e8158171473716713! _______________________________________________</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Archivesspace_Users_Group mailing list</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">!DSPAM:589cf5e8158171473716713!</span></div></blockquote></div><br class=""></body></html>