Skip to Main Content

LiveLabs & Workshops

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Content Management REST API for Search Folders or Files response json missing metadata

allreid-OracleMar 11 2022 — edited Mar 12 2022

In https://docs.oracle.com/en/cloud/paas/content-cloud/rest-api-documents/op-documents-api-1.2-folders-search-items-get.html, one of the examples shows a metadata array with values (see bottom json)
When I actually run the query, I get an empty array:
"metadata": { "items": [] }
What am I missing?
--

"metadata":{
                "items":[
                    {
                        "name":"MyMetaCollection",
                        "fields":{
                            "items":[
                                {
                                    "name":"IntField",
                                    "type":"integer",
                                    "value":"12345"
                                },
                                {
                                    "name":"DateField",
                                    "type":"date",
                                    "value":"2023-02-20T12:00:00.000Z"
                                }
                            ]
                        }
                    },
                    {
                        "name":"dDefaultFolderMetaCollection",
                        "fields":{
                            "items":[
                                {
                                    "name":"xTags",
                                    "type":"string",
                                    "value":"FixMe"
                                }
                            ]
                        }
                    }
                ]
            }

Comments

allreid-Oracle

Solved. This was hidden under an expandable section on the API page: Query Parameters fields(optional): string Specify the additional fields to be returned. Currently, the only value supported is metadata, which would result in metadata associated with items returned by the search results being added to the response. The default is not to return metadata in the search results. In order to have metadata returned, use fields=metadata

1 - 1

Post Details

Added on Mar 11 2022
1 comment
240 views