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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.