08-10-2022 05:36 AM
I now want to use the API to search and manage Nodes. I therefor created a Rest-Client from the API YAML File.
When I call the Search API I get an Error
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "location" (class com.alfresco.rest.client.search.model.ResultNode), not marked as ignorable (22 known properties: "isLink", "parentId", "isFile", "versionComment", "search", "createdByUser", "name", "allowableOperations", "aspectNames", "properties", "isLocked", "archivedAt", "isFolder", "content", "id", "nodeType", "path", "modifiedByUser", "createdAt", "modifiedAt", "archivedByUser", "versionLabel"]) at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 452] (through reference chain: com.alfresco.rest.client.search.model.ResultSetPaging["list"]->com.alfresco.rest.client.search.model.ResultSetPagingList["entries"]->java.util.ArrayList[0]->com.alfresco.rest.client.search.model.ResultSetRowEntry["entry"]->com.alfresco.rest.client.search.model.ResultNode["location"])
a Sample Response looks like this when I check with the API-Explorer
{ "list": { "pagination": { "count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100 }, "context": { "consistency": { "lastTxId": 46 } }, "entries": [ { "entry": { "createdAt": "2022-08-05T11:02:22.343+0000", "isFolder": true, "search": { "score": 1 }, "isFile": false, "createdByUser": { "id": "admin", "displayName": "Administrator" }, "modifiedAt": "2022-08-05T11:51:18.851+0000", "modifiedByUser": { "id": "admin", "displayName": "Administrator" }, "name": "MyTestNode", "location": "nodes", "id": "dc437fc4-5c0e-4dcf-8552-05ddd18e6869", "nodeType": "test:testNode", "parentId": "75b49f46-962c-45a8-91ec-893da460bd8e" } } ] } }
However the Model does not have this location Field.
Explore our Alfresco products with the links below. Use labels to filter content by product module.