Trouble with services.php

Hello,

I have some difficulties on migrating from 1.4 to 1.7.9,

/service.php/item/ca_objects/id/ ---NUMBER--   endpoint with some „bundles“ modifiers works different.

It doesnt return some values

for example

'idno' => 'OBJECT.JMP.COLL/178589' versus      'idno' => NULL 

'ca_collections.hierarchy' =>  array (

  0 =>    array (    26798 =>      array (      1 =>        array (        0 => 'Textil',      ),      2 =>      array (        0 => 'Textile',      ),    ),

    26923 =>      array (      2 =>        array (        0 => 'synagogue textiles',      ),      1 =>        array (        0 => 'textilie synagogální',      ),    ),

    26973 =>      array (      1 =>        array (        0 => 'povijan na Tóru - část nebo fragment',      ),      2 =>        array (        0 => 'Torah binder – part or fragment',      ),    ),  ), ),

 

  versus ca_collections.hierarchy' => array ( ),

and some fields (ca_lots, ca_places) have numerical keys on place of textual ones

ca_places' =>  array (  193736 =>    array (    'item_type_id' => '176',    'place_id' => '29278',    'relationship_type_id' => '11',    'idno' => 'PLACE.JMP.795',    'relation_id' => '193736',    'name' => 'Bohemia',    'locale_id' => '2',    'row_id' => '222773',    'labels' =>      array (      2 => 'Bohemia',      3 => 'Böhmen',       => 'Čechy',    ),    '_key' => 'relation_id',    'direction' => 'ltor',    'relationship_typename' => 'vytvořeno (kde)',    'relationship_type_code' => 'created',    'label' => 'Bohemia',  ), ),

versus

 'ca_places' => array (   0 => '176',   1 => NULL,   2 => '29278',   3 => NULL,   4 => NULL,   5 => '11',   6 => 'PLACE.JMP.795',   7 => '              PLACE.                JMP.                795',   8 => '193736',   9 => 'Čechy',   10 => '1',   11 => '',   12 => '222773',   13 => '193736',   14 =>   array (     1 => 'Čechy',   ),   15 => relation_id',   16 => 'ltor',   17 => 'was created at',   18 => 'created',   19 => 'Čechy', ),

Is there any hidden setting / or it is broken and i should wait for 1.8 / use direct access  like https://docs.collectiveaccess.org/wiki/API:Accessing_Data (with first template i am actually able to do it, hovewer we have some  script running on other server at different organization, and it will be much harder to implement  )?

Do you have some tips?

Comments

  • Those services are very old and are going away. The plan is to implement a new set of GraphQL-based services. Some work has already been done on this. If you want to provide a list of services that are important to you we can try to give you access to them sooner rather than later.

    If you need just read-only access to items either individually or in search sets you may also try the "simple" api. It allows you to configure endpoints in the services.conf file that return key/value payloads of formatted data. See https://docs.collectiveaccess.org/wiki/SimpleAPI

  • Thanks, good to know. We are using it just for reading.

    Queries,which i have found so far, are like "Get me object with id xy", "Get me entity with id xy with related media and related objects" and "Get me entities modified since (last week) with specific type_id" (dtto for objects)"

    Well, i will try to figure out some way.

  • The simple service will be able to do this. If you need help configuring it contact me on Slack.

Sign In or Register to comment.