Query by Id or Path

Let's see what do you need to query a document by its Id or Path.

Query a content by its Id

Following example shows how to query the document with the Id 6.

Copy
GET https://example.com/OData.svc/Root?query=Id:6
🛈 Special characters should be URL encoded

Query multiple content by their Ids

The next example shows how to query multiple documents by Id's 7, 8 and 11.

Copy
GET https://example.com/OData.svc/Root?query=Id:(7 8 11)
🛈 Special characters should be URL encoded

Search in a folder

You can specify a folder to search in using the InFolder param and the chosen parent's Path as its value in the query.

Following query returns the children of the folder named Calgary:

Copy
GET https://example.com/OData.svc/Root?query=InFolder:'/Root/Content/Cars'
🛈 Special characters should be URL encoded

Search in a branch of the content tree

You can also specify a branch of the content repository to search in using the InTree param and the Path of the root content of the chosen branch.

Following query returns all the content items which are stored in the Cars folder even if they are stored in lower level folders:

Copy
GET https://example.com/OData.svc/Root?query=InTree:'/Root/Content/Cars'
🛈 Special characters should be URL encoded