Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.

If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping

Answers may be delayed for posts that do not include sufficient information.

API SERVICE: How to specify in endpoint URL correct sort value for related objects

Hi support,
We have a digital documental project with Providence version 1.6.3 and we want show some data collected into his database by using the API Service.
Sorry, but reading the guide at URL and the section Types of information, note 4 Related items, at URL, ;I don't have unsterstood what to do with related objects.

I try to explaine what We need.

Doing this request:

I retrieve the data of one object (related to ca_list_items: list object_types and id cas_obj_monument), related to another object (related to ca_list_items: list object_types and id cas_obj_site):
  "preferred_labels":{ "it_IT":[ { "name":"Piazzale del Teatro (Sabratha)" } ] },
  "object_id":{ "value":"586" },
    "idno":"Piazzale del teatro",
  "type_id":{                                  (( this is an "object_types" which id value is "cas_obj_monument" ))
    "display_text":{ "it_IT":"Monumento Archeologico" }
        "item_type_id":"209",          (( this is an "object_types" which id value is "cas_obj_site" ))
        "idno_sort":"Sabratha    ",
        "labels":{ "11":"Sabratha" },
        "relationship_typename":"is related to",

With the APIs, I need to get all the objects grouped by object_types.cas_obj_monument and sorted primarily by the related grouping object_types.cas_obj_site.
How could I get this sort?

This is the request I use to get all objects grouped by object_types.cas_obj_monument (q parm in querystring):
http://<server>/service.php/find/ca_objects/?lang=it_IT&pretty=1&sort=<item_type_id cas_obj_site>;ca_object_labels.name_sort&summary=1&q=cas_obj_monument&ca_objects.is_enabled=1"

This are the bundles I add into the CURL (PHP):
"bundles" : {
"access" : { "convertCodesToDisplayText" : true },
"status" : { "convertCodesToDisplayText" : true },
        "<item_type_id cas_obj_site>" : { "returnAsArray" : false },
"" : {"returnAsArray" : true },
"ca_object_labels.name_sort" : {"returnAsArray" : true }

With what should I replace "<item_type_id cas_obj_site>" in the request and bundles data ?
Thanks and best regards.

Sign In or Register to comment.