GET /userservice/api/users/{userId}/contents

As of Version

product version 2021 Summer | component version 

Request MethodGET
Response FormatJSON
Description

Retrieve a list of all existing contents stored by the user specified by userId.

Add the optional query parameter size=<N> with any integer value N to the request URL to divide the hit list into sections. Each of them contains N users. Only one section is returned in the response body.

Add the optional query parameter page=<n> with any integer value n to the request URL to retrieve the hit list section of index n.

Add the optional query parameter sort with value asc (desc) to sort the hit list in ascending (descending) order.

Response HTTP status codes:

HTTP Status CodeDescription
200OK
401Unauthorized
403Forbidden
Request Example

https://<host>/userservice/api/users/12345678-abcd-ef90-b620-0e92d5b7140c/contents?page=0&size=50&sort=desc

Response Example

200 OK

response body
{
  "hasMoreItems": true,
  "numItems": 50,
  "objects": [
    {
      "fileName": "avatar.png",
      "fileSize": 42,
      "fileType": "image/png",
      "id": "user-image"
    }
  ],
  "totalNumItems": 1234
}