Using Content Hub (CH) v4.2
I have created a Content Collection
called "McDonalds Content Collection" which has an item of Content Type Advertisement
.
Now, I would like to fetch all the data/items from the respective collections, For e.g., I want to get all the Advertisements
and their data (Title, Image, Description) from "McDonalds Content Collection".
Or just all items in that collection with their details.
Here is my API query:
https://{{hostname}}/api/entities/query?query=Int('id')==93451
93451 is the ID of my Collection item/folder.
This query returns information about the collection and not the items inside it. What should be the query to get only the data inside the collection.
Response
{
"items": [
{
"id": 93451,
"identifier": "LtgrELltiUyy8kRysWqNmA",
"cultures": [
"en-US"
],
"properties": {
"ContentCollectionName": "McDonalds Content Collection",
"ContentCollectionDescription": null,
"PreventPublish": null,
"PublishStatus": {
"identifier": "Published",
"labels": {
"en-US": "Published"
}
},
"PublishStatusDetails": null
},
"relations": {
"RoleProxyToContentCollection": {
"href": "https://example.com/api/entities/93451/relations/RoleProxyToContentCollection"
},
"ContentCollectionToMasterAsset": {
"href": "https://example.com/api/entities/93451/relations/ContentCollectionToMasterAsset"
},
"ContentRepositoryToContentCollection": {
"href": "https://example.com/api/entities/93451/relations/ContentRepositoryToContentCollection"
},
"StatusToContentCollection": {
"href": "https://example.com/api/entities/93451/relations/StatusToContentCollection"
},
"MContentCollectionToAvailableRoute": {
"href": "https://example.com/api/entities/93451/relations/MContentCollectionToAvailableRoute"
},
"MContentCollectionToActiveState": {
"children": [
{
"href": "https://example.com/api/entities/29917"
}
],
"inherits_security": true,
"self": {
"href": "https://example.com/api/entities/93451/relations/MContentCollectionToActiveState"
}
},
"ContentCollectionToContent": {
"href": "https://example.com/api/entities/93451/relations/ContentCollectionToContent"
},
"MContentCollectionToStateMachine": {
"href": "https://example.com/api/entities/93451/relations/MContentCollectionToStateMachine"
}
},
"created_by": {
"href": "https://example.com/api/entities/92202",
"title": "The user who created the entity"
},
"created_on": "2023-03-13T07:12:09.5920623Z",
"modified_by": {
"href": "https://example.com/api/entities/92202",
"title": "The user who last modified the entity"
},
"modified_on": "2023-03-13T07:13:04.818515Z",
"entitydefinition": {
"href": "https://example.com/api/entitydefinitions/M.ContentCollection",
"title": "The entity definition for this entity"
},
"copy": {
"href": "https://example.com/api/entities/93451/copy",
"title": "Copy this entity"
},
"permissions": {
"href": "https://example.com/api/entities/93451/permissions",
"title": "The permissions on this entity"
},
"lifecycle": {
"href": "https://example.com/api/entities/93451/lifecycle",
"title": "The lifecycle action for this entity."
},
"saved_selections": {
"href": "https://example.com/api/entities/93451/savedselections",
"title": "The saved selections this entity belongs to"
},
"roles": {
"href": "https://example.com/api/entities/93451/roles",
"title": "Roles for this entity"
},
"annotations": {
"href": "https://example.com/api/entities/93451/annotations",
"title": "Annotations for this entity"
},
"is_root_taxonomy_item": true,
"is_path_root": false,
"inherits_security": true,
"is_system_owned": false,
"version": 5,
"self": {
"href": "https://example.com/api/entities/93451"
},
"renditions": {}
}
],
"total_items": 1,
"returned_items": 1,
"self": {
"href": "https://example.com/api/entities/query?query=Int(%27id%27)%3D%3D93451",
"title": "This collection"
}
}
Parsing failure: unexpected 'd'; expected c (Line 1, Column 3); recently consumed: An
.