[Archivesspace_api_doc_adhoc] find_by_id Endpoint Help

Corey Schmidt Corey.Schmidt at uga.edu
Wed Mar 23 16:23:12 EDT 2022


Dear all,

Hello, this is Corey Schmidt from the University of Georgia. I hope everyone is well and enjoying the slow warmup to Spring.

I've been hitting some roadblocks trying to write documentation for API endpoints and I wanted to askfor your help. For the find_by_id resource endpoint<https://archivesspace.github.io/archivesspace/api/?shell#find-resources-by-their-identifiers>, I'm trying to find a resource with a four-part ID, but when I call the endpoint, it keeps giving me an error I can't pin down. Here's what I'm calling:

from asnake.client import ASnakeClient
import asnake.logging as loggin

client = ASnakeClient(baseurl=as_api, username=as_un, password=as_pw)
client.authorize()

find_res_id = client.get('repositories/2/find_by_id/resources', params={'identifier[]': ['test', '1234', 'abcd', '!@#$']})
print(find_res_id.json(), find_res_id)

Here's the error message:
{'error': "Had some trouble parsing your request: unexpected token at 'test'"} <Response [400]>

It may be an issue with the requests package, but I'm not sure. I tested both ASnake and requests, and they gave the same error.

Any help/advice would be appreciated, thanks!

Corey


Corey Schmidt
Special Collections Libraries | ArchivesSpace Project Manager


706-542-8151<tel:7065428151> | Corey.Schmidt at uga.edu<mailto:Corey.Schmidt at uga.edu>


[University of Georgia]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_api_doc_adhoc/attachments/20220323/52f2ddef/attachment.html>


More information about the Archivesspace_api_doc_adhoc mailing list