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
- URL:
{REPOSITORY_URL}
- Target Object: the folder where the new object will be created.
Query Parameters
Name | Required | Description | Link |
---|---|---|---|
succinct |
No | If true (default), the response is more compact. If false it is more detailed. |
Succinct |
filter |
No | Comma-separated list of properties to include in the response. | Filter |
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 |
Example Request - Fetching an object by ID:
```bash curl -X 'GET' \ '{REPOSITORY_URL}?operation=getObject&objectId={target_objectId}&filter=name,description'
Fetching an object by Path:
```bash
curl -X 'GET' \
'{REPOSITORY_URL}/root/Animals/Dogs/Rex?operation=getObject&filter=name,description'
Response Format
- Content-Type:
application/json
- Response body: the JSON representation of the retrieved object:
Field Name | Condition | Description | Link |
---|---|---|---|
properties / succinctProperties |
Always present | The properties of the object. | Properties |
relationships |
includeRelationships |
Any relationships the object has. | Relationships |
ACL |
includeACL=true |
The access control list for the object. | Access Control |
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
- URL:
{REPOSITORY_URL}
- Target Object: the folder whose children are being retrieved.
Parameters
Name | Required | Description | Link |
---|---|---|---|
succinct |
No | If true (default), the response is more compact. If false it will be more detailed. |
Succinct |
filter |
No | Comma-separated list of properties to include in the response. | Filter |
includeRelationships |
No | Specifies whether relationships should be included in the response. Possible values: none , source , target , both . |
Relationships |
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}&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. | |
├ pathSegment |
Always present | The relative path segment for this object within the folder. | |
└object |
Always present | The child object with its metadata and related information | |
├ properties / succinctProperties |
Always present | The properties of the object. | Properties |
└ relationships |
includeRelationships=true |
Any relationships the object has. | Relationships |
hasMoreItems |
Always present | Indicates if there are more items to retrieve. | |
numItems |
Always present | The total number of child objects. |
Example Response:
{
"objects": [
{
"object": {
"succinctProperties": {
"name": "Rex",
"description": "Dog"
}
},
"pathSegment": "Rex"
},
{
"object": {
"succinctProperties": {
"name": "Whiskers",
"description": "Cat"
}
},
"pathSegment": "Whiskers"
}
],
"numItems": 2,
"hasMoreItems": false
}