Hitachi Content Platform​

 View Only

 Can I receive only the object file names in a specific directory inside HCP via HTTP Get method .json format?

Myoung han Yun's profile image
Myoung han Yun posted 06-07-2022 03:37
Hi.

The customer who is using our HCP asked me the following question.

Can I receive only the object file names in a specific directory inside HCP via HTTP Get method .json format(not in .xml format)?

Therefore, I saw the 'Working with directories' and 'Listing directory contents' documents in Hitachi Vantara Portal search,
but the 'Response Body' and 'HTTP GET request' samples show that they are only supported for xml storage format
as shown below.

-----------------------------
Response body
The body of the HTTP response consists of XML that lists the contents of the requested directory, including
metadata for the objects the directory contains. It lists only the immediate directory contents, not the contents of
any subdirectories.
-----------------------------
Example: Listing the contents of a directory that includes deleted objects
Here’s a sample HTTP GET request that lists all the contents, including any deleted objects or subdirectories, of
a directory named quarterly_rpts in a namespace that supports versioning.

Request with curl command line
curl -k -H "Authorization: HCP bXl1c2Vy:3f3c6784e97531774380db177774ac8d"
"https://finance.europe.hcp.example.com/rest/quarterly_rpts?deleted=true"
> quarterly_rpts.xml

--------------------------------


If you know how to use HTTP Get Method to receive only object file names in a specific directory in .json storage format, please reply.

Best Regards
Yun Myoung Han