Retrieving Objects
In Contendo Server, there are multiple operations for retrieving objects. Objects can be retrieved directly one-by-one or in various lists.
Operations for retrieving objects
Operation | Description |
---|---|
Get Object | Retrieves details about a single object in the repository. |
Get Children | Retrieves a list of child objects within a specified folder. |
Additionally, Querying objects can also be used to search for objects.
Get Object
The getObject
operation in Contendo Server retrieves details about an object in the repository. This operation returns
metadata about the object. By default returns the object's properties, but relationships, permissions
and renditions can be returned depending on the request parameters.
Request Format
- Operation:
object
- HTTP method:
GET
- Target object: the folder where the new object will be created. See Specifying the Target Object.
Query Parameters
Name | Required | Description | Link |
---|---|---|---|
succinct |
No | If true , the response is more compact. |
Succinct |
filter |
No | Comma-separated list of properties to include in the response. | Filter |
includeAllowableActions |
No | If set to true , the response includes the set of actions the user is allowed to perform on the object. |
Allowable Actions |
includeACL |
No | If set to true , the response includes the Access Control List (ACL) of the object. |
Access Control |
includeRelationships |
No | Specifies whether relationships should be included in the response. Possible values: none , source , target , both . |
Relationships |
renditionFilter |
No | Specifies which renditions of the object should be included in the response. | Renditions |
Example Request - Fetching an object by ID:
curl -X 'GET' \
'{REPOSITORY_URL}?operation=getObject&objectId={target_objectId}&succinct=true&filter=name,description'
Fetching an object by Path:
curl -X 'GET' \
'{REPOSITORY_URL}/root/Animals/Dogs/Rex?operation=getObject&succinct=true&filter=name,description'
Response Format
- Content-Type:
application/json
- Response body: the JSON representation of the retrieved object:
Field Name | Condition | Description | Link |
---|---|---|---|
properties |
succinct=false or succinct omitted |
The object's properties in detailed format. | Properties |
succinctProperties |
succinct=true |
The object's properties in concise format. | Succinct Properties |
allowableActions |
includeAllowableActions=true |
The actions the user can perform on the object. | Allowable Actions |
relationships |
includeRelationships |
Any relationships the object has. | Relationships |
ACL |
includeACL=true |
The access control list for the object. | Access Control |
renditions |
If renditionFilter is set |
Available renditions of the object. | Renditions |
Example Response:
{
"succinctProperties": {
"name": "Rex",
"description": "Dog"
}
}
Get Children
The getChildren
operation in Contendo Server retrieves the list of child objects within a specified folder. This
operation returns metadata about the child objects and supports filtering, pagination, and optional inclusion of
additional details.
Request Format
- Operation:
children
- HTTP method:
GET
- Target object: the folder whose children are being retrieved. See Specifying the Target Object.
Parameters
Name | Required | Description | Link |
---|---|---|---|
succinct |
No | If true , the response is more compact. |
Succinct |
filter |
No | Comma-separated list of properties to include in the response. | Filter |
includeAllowableActions |
No | If true , includes allowable actions for each child object. |
Allowable Actions |
includeRelationships |
No | Specifies whether relationships should be included in the response. Possible values: none , source , target , both . |
Relationships |
renditionFilter |
No | Specifies which renditions of child objects should be included in the response. | Renditions |
orderBy |
No | Comma-separated list of property IDs defining sorting order. Use ASC for ascending (default) or DESC for descending. |
— |
maxItems |
No | Limits the number of child objects returned. | — |
skipCount |
No | Skips the first N child objects (used for pagination). | — |
Example Request:
curl -X 'GET' \
'{REPOSITORY_URL}?operation=getChildren&objectId={folderId}&succinct=true&filter=name,description'
Response Format
- Content-Type:
application/json
- Response body: A JSON object with the following fields:
Field Name | Condition | Description |
---|---|---|
objects |
Always present | A list of objects representing the children of the folder. Each entry contains:
|
hasMoreItems |
Always present | Indicates if there are more items to retrieve. |
numItems |
Always present | The total number of child objects. |
Object Structure
Each object
in the objects
array contains:
Field Name | Condition | Description | Link |
---|---|---|---|
properties |
succinct=false or succinct omitted |
The object's properties in detailed format. | Properties |
succinctProperties |
succinct=true |
The object's properties in concise format. | Succinct Properties |
allowableActions |
includeAllowableActions=true |
The actions the user can perform on the object. | Allowable Actions |
relationships |
includeRelationships |
Any relationships the object has. | Relationships |
Example Response:
{
"objects": [
{
"object": {
"succinctProperties": {
"name": "Rex",
"description": "Dog"
}
},
"pathSegment": "Rex"
},
{
"object": {
"succinctProperties": {
"name": "Whiskers",
"description": "Cat"
}
},
"pathSegment": "Whiskers"
}
],
"numItems": 2,
"hasMoreItems": false
}