Forum Stats

  • 3,826,361 Users
  • 2,260,636 Discussions
  • 7,896,916 Comments

Discussions

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

allreid-Oracle
allreid-Oracle Member Posts: 2 Employee
edited Mar 12, 2022 12:46AM in Low Code Development

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"
                                }
                            ]
                        }
                    }
                ]
            }


Tagged:

Answers

  • allreid-Oracle
    allreid-Oracle Member Posts: 2 Employee

    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