Add interstitial metadata via Web Service API

Hi. Is there a way to add/edit interstitial metadata for a object-movement relationship using the Web Service API?
I'm working with CA 1.7.6.

Thank you

Comments

  • Hi, Was there ever an answer to this question, I'd like to know also.

    Thanks!

  • The new GraphQL API does support this. See https://manual.collectiveaccess.org/developer/web_api/graphql/edit.html. This is still in development, but we expect to be able to release it in 2021.

  • So that means the JSON API doesn't support it?

  • Yes it does, but it's not particularly easy to use. You can set a block of interstitial "attributes" on relationships under "related" when using the JSON Item service.

  • Thanks, I'll give it a go. Is there a way to get it to display the interstitial data when you are using GET on the Item endpoint?

    Also, assuming the graphQL API branch is at dev/graphql-api if I wanted to test it?

  • Monica, if it may be of help, this a JSON post I am actually using to insert interstitial metadata while creating a ca_movement. See "related" section. $name are variables. There are two relationships: to ca_objects and to ca_storage_locations. This one has interstitial metadata coll_spec_mov

    {

    "intrinsic_fields" : { 

        "idno" : $idno ,

        "type_id" : $tipoMovimento 

    },

      "preferred_labels" : [

        {

          "locale" : "it_IT",

          "name" : $causale

        }

      ],

      "attributes" : {

        "removal_date" : [

          { 

          "locale" : "it_IT",

            "removal_date" : " & Format($dataEmis, "d/MM/yyyy") & " &

          }

        ]

      },

      "related" : {

        "ca_objects"": [

          { 

            "object_id" : $ObjID,

            "type_id" : 17

          }

        ],

        "ca_storage_locations" : [

    {

            "location_id": $IDCollDa,

            "type_id": 83,

            "attributes" : {

              "coll_spec_mov" : [

                {

                  "coll_spec_mov" : $coll_spec_da

                } 

              ]

            }

          }

        ]

      }

    }

  • Thank you very much gbenigni. That helps a lot. CHEERS!

Sign In or Register to comment.