Project

General

Profile

Project activity #27594

closed

Links api verbeteren/uitbreiden

Added by Diego Mirandola about 1 year ago. Updated 6 months ago.

Status:
Resolved
Priority:
P4 Normal
Category:
-
Target version:
Start date:
25/03/2024
Due date:
% Done:

0%

Estimated time:

Description

Huidige links api werkt zo:

GET /api/links/folder/e6a53d02-5c6e-44fa-b82d-cbcb21b82284

Response:
{
    "querySearch": "ANCESTOR:\"workspace:\/\/SpacesStore\/e6a53d02-5c6e-44fa-b82d-cbcb21b82284\" OR ANCESTOR:\"workspace:\/\/SpacesStore\/5e809366-617a-4b3d-9e9d-99272544ef31\" OR ANCESTOR:\"workspace:\/\/SpacesStore\/0420f667-e28b-4c89-b7c5-8fc2def94457\" OR ANCESTOR:\"workspace:\/\/SpacesStore\/84eb3ea4-5cc9-4d7c-93f8-7007d1bcd6a6\" OR ANCESTOR:\"workspace:\/\/SpacesStore\/3568885e-a983-4d2d-96e7-7b12de25052f\" OR ANCESTOR:\"workspace:\/\/SpacesStore\/bf4175df-3a34-45ba-a178-edefded63c0c\"",
    "queryList": "@sys\\:node\\-uuid:\"e6a53d02-5c6e-44fa-b82d-cbcb21b82284\" OR @sys\\:node\\-uuid:\"5e809366-617a-4b3d-9e9d-99272544ef31\" OR @sys\\:node\\-uuid:\"0420f667-e28b-4c89-b7c5-8fc2def94457\" OR @sys\\:node\\-uuid:\"84eb3ea4-5cc9-4d7c-93f8-7007d1bcd6a6\" OR @sys\\:node\\-uuid:\"3568885e-a983-4d2d-96e7-7b12de25052f\" OR @sys\\:node\\-uuid:\"bf4175df-3a34-45ba-a178-edefded63c0c\"" 
}

Dit is eigenlijk nutteloos, want ik kan dezelfde lijst van node ids lezen vanuit property tza:links en zelf de queries aanmaken.

In #26843 wordt de volgende flow ondersteund:
  1. call /api/links/folder/{uuid} uitvoeren om de relatie query op te halen
  2. uuid lezen vanuit de query uuids lezen vanuit property tza:links van de node
  3. ELKE (van objecten en niet objecten) uuid gebruiken in een objects/{uuid} call naar objects api
Dit zou zo verbeterd kunnen worden:
  • mogelijkheid toevoegen om een filter mee te geven in de call zodat alleen objecten worden teruggegeven, bijvoorbeeld: /api/links/folder/{uuid}?type=object of /api/links/folder/{uuid}?filter=ASPECT:'tza:object'
  • aparte api aanmaken om data vanuit objects api op te kunnen halen ipv querySearch/queryList, bijvoorbeeld /api/links/folder/{uuid}/objects
Actions #3

Updated by Anonymous about 1 year ago

  • Status changed from Backlog to In Progress
  • Target version changed from Contezza Development Backlog to Tezza 2024.04
  • Assignee changed from Contezza Development to Anonymous
Actions #4

Updated by Diego Mirandola about 1 year ago

  • Description updated (diff)
Actions #5

Updated by Anonymous about 1 year ago

analyse:
het enige wat we opslaan bij de links (als property) is de nodeRef, dus dat maakt filteren lastig/tijdrovend, want dan moeten we voor elke gelinkte nodeRef eerst de informatie ophalen voordat we kunnen filteren.

Actions #6

Updated by Anonymous about 1 year ago

  • Assignee changed from Anonymous to Contezza Development

ik ga hier binnenkort niet meer aan toekomen, dus ik zet dit terug op de groep

Actions #7

Updated by Olav Allema about 1 year ago

  • Target version changed from Tezza 2024.04 to Tezza 2024.05
Actions #8

Updated by Anonymous about 1 year ago

  • Assignee changed from Contezza Development to Anonymous
Actions #9

Updated by Anonymous about 1 year ago

ik pak deze weer op

Actions #10

Updated by Anonymous about 1 year ago · Edited

voorbeeld response:

[
    {
        "url": "http://objecten.local:8000/api/v1/objects/53f4625c-33b4-4533-a21a-0d34ed3b2dc8",
        "uuid": "53f4625c-33b4-4533-a21a-0d34ed3b2dc8",
        "type": "http://objecttypen.local:8000/api/v1/objecttypes/936ed45f-ea34-44fb-abb7-a4ace08d2f40",
        "record": {
            "correctedBy": null,
            "correctionFor": null,
            "correctionFor": null,
            "entAt": null,
            "geometry": null,
            "index": "1",
            "registrationAt": "2024-05-07",
            "startAt": "2024-05-07",
            "typeVersion": "1",
            "data": {
                "omschrijving": "testpand",
                "titel": "test",
                "objectCode": "tst" 
            }
        }
    },
    {
        "url": "http://objecten.local:8000/api/v1/objects/93b16076-4575-490c-a26e-6f1fb6556577",
        "uuid": "93b16076-4575-490c-a26e-6f1fb6556577",
        "type": "http://objecttypen.local:8000/api/v1/objecttypes/87c18619-e214-47db-b4b0-b63b28b60c3e",
        "record": {
            "correctedBy": null,
            "correctionFor": null,
            "correctionFor": null,
            "entAt": null,
            "geometry": null,
            "index": "1",
            "registrationAt": "2024-05-07",
            "startAt": "2024-05-07",
            "typeVersion": "1",
            "data": {
                "URL_BAGNR_VERBLIJFPLAATS": "https://ajsdflajsdf.nl",
                "URL_BAGNR_PAND": "https://ajsdflajsdf.nl",
                "BAGNR_NUMMERAANDUIDING": "asdf",
                "LON": "123",
                "BAGNR_PAND": "123",
                "Postcode": "<verwijderd>",
                "Complexnaam": "testnaam",
                "RE_COMPLEXNR": "123",
                "BAGNR_VERBLIJFPLAATS": "fasdf",
                "Geb-Perc nummer": "123",
                "URL_BAGNR_NUMMERAANDUIDING": "http://jasdfasdf.nl",
                "RE_GBWPCL_OMSCHRIJVING": "teststraat nummer 2" 
            }
        }
    }
]

Actions #11

Updated by Anonymous 12 months ago

feature/expand-links-api/#27594

Actions #12

Updated by Anonymous 12 months ago

  • Status changed from In Progress to Ready in Dev
  • Assignee changed from Anonymous to Diego Mirandola

dit staat vanaf morgen op dev tezza.

aanroepen kan op deze manier:
GET {{url}}/alfresco/s/api/links/folder/${ZAAK_UUID}/objects

voobeeld response:

[
    {
        "url": "http://objecten.local:8000/api/v1/objects/887574f2-2502-47ea-adbe-d59f5ccdc7cb",
        "uuid": "887574f2-2502-47ea-adbe-d59f5ccdc7cb",
        "type": "http://objecttypen.local:8000/api/v1/objecttypes/936ed45f-ea34-44fb-abb7-a4ace08d2f40",
        "record": {
            "correctedBy": null,
            "correctionFor": null,
            "correctionFor": null,
            "entAt": null,
            "geometry": null,
            "index": "1",
            "registrationAt": "2024-05-15",
            "startAt": "2024-05-15",
            "typeVersion": "1",
            "data": {
                "omschrijving": "asdfasdf",
                "titel": "asdfasdf",
                "objectCode": "asdfasdf" 
            }
        }
    },
    {
        "url": "http://objecten.local:8000/api/v1/objects/73405f84-4dbf-4859-9e2c-9a0f3543021f",
        "uuid": "73405f84-4dbf-4859-9e2c-9a0f3543021f",
        "type": "http://objecttypen.local:8000/api/v1/objecttypes/87c18619-e214-47db-b4b0-b63b28b60c3e",
        "record": {
            "correctedBy": null,
            "correctionFor": null,
            "correctionFor": null,
            "entAt": null,
            "geometry": null,
            "index": "1",
            "registrationAt": "2024-05-15",
            "startAt": "2024-05-15",
            "typeVersion": "1",
            "data": {
                "URL_BAGNR_VERBLIJFPLAATS": "https://ahsdjlfasdfh.nl",
                "URL_BAGNR_PAND": "https://ahsdjlfasdfh.nl",
                "BAGNR_NUMMERAANDUIDING": "fasd",
                "BAGNR_PAND": "asdf",
                "Postcode": "asdf",
                "Complexnaam": "asdf",
                "RE_COMPLEXNR": "123,123,123",
                "BAGNR_VERBLIJFPLAATS": "asdfasdf",
                "Geb-Perc nummer": "12,341,234,124",
                "URL_BAGNR_NUMMERAANDUIDING": "https://ahsdjlfasdfh.nl",
                "LAT": "12,341,234",
                "RE_GBWPCL_OMSCHRIJVING": "asdfasdf 12" 
            }
        }
    },
    {
        "url": "http://objecten.local:8000/api/v1/objects/cd8d3ce1-ea95-46de-93e9-41bae28e5c95",
        "uuid": "cd8d3ce1-ea95-46de-93e9-41bae28e5c95",
        "type": "http://objecttypen.local:8000/api/v1/objecttypes/b218e365-669c-401a-afd6-96e46b88ec0e",
        "record": {
            "correctedBy": null,
            "correctionFor": null,
            "correctionFor": null,
            "entAt": null,
            "geometry": null,
            "index": "1",
            "registrationAt": "2024-05-15",
            "startAt": "2024-05-15",
            "typeVersion": "1",
            "data": {
                "BAGlv": "https://hasjdfhaklsdhf.nl",
                "mailadres": "ahsdljfh@dhfajsdklfh.nl",
                "gebruikerBRP": "https://ajsdkfasjldfja.nl",
                "eigendomsverhouding": "eigendom",
                "gebruiker": "asdfa",
                "beheerder": "asdvasdf" 
            }
        }
    }
]

@Diego Mirandola wil jij dit testen en kijken of dit voldoet aan de verwachtingen?

Actions #13

Updated by Tahir Malik 11 months ago

  • Target version deleted (Tezza 2024.05)
Actions #14

Updated by Tahir Malik 11 months ago

  • Target version set to Tezza 2024.06
Actions #15

Updated by Diego Mirandola 11 months ago

  • Assignee changed from Diego Mirandola to Anonymous

Met request alfresco/service/api/links/folder/23d7aa43-04f0-4100-a1cd-011a8357efb1/objects (op dev-tezza)
krijg ik

{
    "querySearch": "",
    "queryList": "" 
}

Is dit eigenlijk nog steeds op dev?

Actions #16

Updated by Anonymous 11 months ago

  • Assignee changed from Anonymous to Diego Mirandola

de tezza-services versie op dev stond op de release. Hierdoor is deze feature niet meegenomen. Het zou vanaf maandag weer op dev moeten staan.

Actions #17

Updated by Diego Mirandola 11 months ago

  • Status changed from Ready in Dev to In Progress
  • Assignee changed from Diego Mirandola to Anonymous

Bij call:
alfresco/service/api/links/folder/23d7aa43-04f0-4100-a1cd-011a8357efb1/objects

Error:

{
  "status" : 
  {
    "code" : 500,
    "name" : "Internal Error",
    "description" : "An error inside the HTTP server which prevented it from fulfilling the request." 
  },  

  "message" : "05190065 Wrapped Exception (with status template): 05192680 Fout bij verwerking van de sjabloon 'The following has evaluated to null or missing:\n==> jsonUtils.encodeJSONString(y)  [in template \"nl\/contezza\/api\/repository\/objects\/folder-objects.get.json.ftl\" at line 2, column 23]\n\n----\nTip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing<\/#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??\n----\n\n----\nFTL stack trace (\"~\" means nesting-related):\n\t- Failed at: ${record.getEndAt()} auto-escaped  [in template \"nl\/contezza\/api\/repository\/objects\/folder-objects.get.json.ftl\" in macro \"renderItem\" at line 30, column 26]\n\t- Reached through: @renderItem i  [in template \"nl\/contezza\/api\/repository\/objects\/folder-objects.get.json.ftl\" at line 69, column 9]\n----'. Neem contact op met uw systeembeheerder.",  
  "exception" : "",

  "callstack" : 
  [ 

  ],

  "server" : "Enterprise v7.3.1 (.2 rd1d26290-b563) schema 17.100",
  "time" : "19 jun. 2024 11:30:51" 
}

Actions #18

Updated by Anonymous 11 months ago

Dit was een issue rond het formatten van nummers en booleans in de JSON response. Dit is nu opgelost op de dev branch van tezza-services en staat vanaf morgen op dev.

Actions #19

Updated by Anonymous 11 months ago

  • Status changed from In Progress to Ready in Dev
  • Assignee changed from Anonymous to Diego Mirandola
Actions #20

Updated by Diego Mirandola 11 months ago

  • Status changed from Ready in Dev to In Progress
  • Assignee changed from Diego Mirandola to Anonymous

Ik krijg nog steeds dezelfde.

Actions #21

Updated by Tahir Malik 10 months ago

  • Target version changed from Tezza 2024.06 to Tezza 2024.07
Actions #22

Updated by Anonymous 10 months ago · Edited

lokaal werkt het wel. Er lijkt wat fout te gaan rond het releaseproces op dev, want elke keer dat we releasen, springt de tezza-services versie terug naar een release versie. (op de dev branch)

Actions #23

Updated by Anonymous 10 months ago

Ik heb gister de juiste tezza versie op dev-tezza gezet en heb dit kunnen valideren.

response:

[
    {
        "url": "https://dev-tezza-objecten.contezza.cloud/api/v1/objects/ff67e384-b581-4c9b-b1cb-dcb95e610d4d",
        "uuid": "ff67e384-b581-4c9b-b1cb-dcb95e610d4d",
        "type": "https://dev-tezza-objecttypen.contezza.cloud/api/v1/objecttypes/936ed45f-ea34-44fb-abb7-a4ace08d2f40",
        "record": {
            "correctedBy": null,
            "correctionFor": null,
            "correctionFor": null,
            "entAt": null,
            "geometry": null,
            "index": "1",
            "registrationAt": "2024-07-18",
            "startAt": "2024-07-18",
            "typeVersion": "1",
            "data": {
                "omschrijving": "Test 12345" 
            }
        }
    }
]

Actions #24

Updated by Anonymous 10 months ago

  • Status changed from In Progress to Ready in Dev
  • Assignee changed from Anonymous to Diego Mirandola
Actions #25

Updated by Tahir Malik 10 months ago

  • Target version changed from Tezza 2024.07 to Tezza 2024.08
Actions #26

Updated by Diego Mirandola 9 months ago

  • Assignee changed from Diego Mirandola to Anonymous

Ik heb de response gevalideerd op branch feature/expand-links-api/#27594

Het is lastig om hiermee verder te ontwikkelen want lokaal heb ik geen toegang tot contezza-proxy api en tot de kadaster koppeling.

Ik zou dit releasen zodat mensen kunnen met dev koppelen voor verder ontwikkeling.

Actions #27

Updated by Tjerk Vaags 9 months ago

  • Assignee changed from Anonymous to Bram Geerlings
Actions #28

Updated by Bram Geerlings 8 months ago

  • Status changed from Ready in Dev to Ready in Test
Actions #29

Updated by Bram Geerlings 8 months ago

  • Status changed from Ready in Test to Test approved
Actions #30

Updated by Tahir Malik 8 months ago

  • Target version changed from Tezza 2024.08 to Tezza 2024.09
Actions #31

Updated by Bram Geerlings 8 months ago

  • Status changed from Test approved to Resolved
Actions #32

Updated by Bas Frequin 6 months ago

  • Target version deleted (Tezza 2024.09)
  • Parent task deleted (#26647)
Actions #33

Updated by Bas Frequin 6 months ago

  • Project changed from 287 to Tezza
  • Target version set to Tezza 2024.09
  • Parent task set to #29758

Also available in: Atom PDF