user1837797
user1837797

Reputation: 67

Alfresco Rest Api

How do I use the Alfresco REST API to search a document from a particular folder? I want to actually get the node value of a particular file from Alfresco.

Upvotes: 0

Views: 451

Answers (3)

Srikanth Josyula
Srikanth Josyula

Reputation: 904

you can use the below REST services to search Alfresco Content Services REST API Search

Below can be used POST http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search

Request Body

{
"query": {
    "query": "PATH:'/app:company_home/st:sites/cm:test/cm:documentLibrary/cm:folderName//*' ",
    "language": "afts"
   }
}

Upvotes: 0

JazzTeam
JazzTeam

Reputation: 59

In order to get all folder childrens you can use the following query:

To get the data of object childrens by nodeRef

nodeRef = b544cd67-e839-4c60-a616-9605fa2affb7;   
url: "/../alfresco/service/api/node/workspace/SpacesStore/" + nodeRef + "/children"
method: "GET"

nodeRef - folder id in Alfresco. Returns data in xml format.

This resource is available for viewing the other queries with complete description.

http://jazzteam.org/en/technical-articles/list-of-alfresco-services/

Upvotes: 1

Zlatko
Zlatko

Reputation: 19569

Did you find any useful information at Alfresco wiki?

You should be able to send a POST query to /alfresco/service/api/query with the parameters:

  • String statement: Query statement
  • (Optional) Bool searchAllVersions: False (Default)
  • (Optional) Boolean includeAllowableActions: False (default)
  • (Optional) Enum includeRelationships: none (default), source, target, both
  • (Optional) int maxItems: 0 = Repository-default number of items (Default)
  • (Optional) int skipCount: 0 = Start at first position (Default)

Upvotes: 0

Related Questions