[Archivesspace_Users_Group] batch update of container_profile assignments

Majewski, Steven Dennis (sdm7g) sdm7g at eservices.virginia.edu
Thu Mar 2 11:22:35 EST 2017


I haven’t used that API endpoint, but for all of the ones that can take an array of values, for example accessing resources with id_set[] param, the URL syntax is something like:

/repositories/3/resources?id_set[]=230&id_set[]=223&id_set[]=222

so for that endpoint, you probably want to append “?id[]=2” to the URL.

And if you’re using curl, remember to use the ‘-g’ (glob off) option so it doesn’t interpret “[]” internally.

— Steve.



On Mar 2, 2017, at 10:28 AM, Trevor Thornton <trthorn2 at ncsu.edu<mailto:trthorn2 at ncsu.edu>> wrote:

Hi everybody-

I'm trying to batch update container_profiles assigned to top_containers using the API endpoint documented here:

http://archivesspace.github.io/archivesspace/api/#post-repositories-repo_id-top_containers-batch-container_profile

... and I'm having trouble passing the 'ids' parameter. The data type for this parameter is '[Integer]' (with the brackets). Everything I try results in an error complaining that the value I sent is a string and not an [Integer], eg:

"Wanted type [Integer] but got '2'"
"Wanted type [Integer] but got '[2]'"

Can anyone explain how to correctly format the parameters for this? Any insight is appreciated.

(BTW - we're using version 1.5.1.)

Thanks,
Trevor

--
Trevor Thornton
Applications Developer, Digital Library Initiatives
North Carolina State University Libraries
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20170302/e3ea2c3b/attachment.html>


More information about the Archivesspace_Users_Group mailing list