Hi Jason,

There is a GET /terms endpoint. It does a search and takes a q=.

There is no GET /terms/:id - I guess this is the one that’s giving you a Not 
Found.

And there is no POST /terms.

Here’s the controller:
https://github.com/archivesspace/archivesspace/blob/master/backend/app/controllers/term.rb

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:


/terms q=Audio
{
  "first_page": 1,
  "last_page": 1,
  "this_page": 1,
  "results":
  [
    {
      "lock_version": 0,
      "term": "Audio",
      "created_by": "admin",
      "last_modified_by": "admin",
      "create_time": "2017-02-07T05:34:29Z",
      "system_mtime": "2017-02-07T05:34:29Z",
      "user_mtime": "2017-02-07T05:34:29Z",
      "term_type": "genre_form",
      "jsonmodel_type": "term",
      "uri": "/terms/3",
      "vocabulary": "/vocabularies/1"
    }
  ]
}

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.


Cheers,
James


> On Feb 10, 2017, at 6:40 AM, Jason Loeffler <[email protected]> wrote:
> 
> Can anyone confirm whether the GET method for terms works? I'm getting 'Not 
> Found'. Also, is there an undocumented POST method for terms?
> 
> Thanks.
> 
> Jason Loeffler
> Technology Consultant | The American Academy in Rome
> Minor Science | Application Development & Metadata Strategy
> Brooklyn, New York
> [email protected] <mailto:[email protected]>
> (347) 405-0826
> minorscience (Skype)
> 
> 
> !DSPAM:589cc60444364107784971! _______________________________________________
> Archivesspace_Users_Group mailing list
> [email protected]
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
> 
> 
> !DSPAM:589cc60444364107784971!

_______________________________________________
Archivesspace_Users_Group mailing list
[email protected]
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

Reply via email to