Find user books with (optional) filter properties.

GET /api/v1/users/{id}/books

Path parameters

  • id string Required

    User ID.

Query parameters

  • languages array[string]

    Filter parameter for the language of the book.

    Values are English, Finnish, Bengali, Spanish, French, German, Russian, Arabic, Chinese, or Japanese.

  • conditions array[string]

    Filter parameter for the condition of the book.

    Values are New, Like New, Good, Fair, or Poor.

  • genres array[string]

    Filter parameter for the genre of the book.

    Values are Fantasy, Science Fiction, Mystery, Horror, Romance, Thriller, Historical Fiction, or Non-Fiction.

  • ownerId string

    Filter parameter for owner's book.

  • notOwnerId string

    Filter parameter for books except mine.

  • pageable object Required
    Hide pageable attributes Show pageable attributes object
    • page integer(int32)

      Minimum value is 0.

    • size integer(int32)

      Minimum value is 1.

    • sort array[string]

Responses

  • 401 */*

    Unauthorized

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 404 */*

    Not Found

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 500 */*

    Internal Server Error

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 400 */*

    Bad Request

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 200 */*

    List of Books.

    Hide response attributes Show response attributes object
    • _embedded object
      Hide _embedded attribute Show _embedded attribute object
      • books array[object]
        Hide books attributes Show books attributes object
        • id string
        • title string
        • author string
        • genres array[string]
        • language string
        • description string
        • condition string
        • coverPhotoUrl string
        • bookLocation string
        • offeredAgo string
        • ownerId string
        • offeredBy string
    • page object
      Hide page attributes Show page attributes object
      • size integer(int64)
      • totalElements integer(int64)
      • totalPages integer(int64)
      • number integer(int64)
GET /api/v1/users/{id}/books
curl \
 --request GET 'http://localhost:8080/api/v1/users/{id}/books?pageable=%7B%7D'
Response examples (401)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (404)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (500)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (400)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (200)
{
  "_embedded": {
    "books": [
      {
        "id": "string",
        "title": "string",
        "author": "string",
        "genres": [
          "string"
        ],
        "language": "string",
        "description": "string",
        "condition": "string",
        "coverPhotoUrl": "string",
        "bookLocation": "string",
        "offeredAgo": "string",
        "ownerId": "string",
        "offeredBy": "string"
      }
    ]
  },
  "_links": {
    "additionalProperty1": {
      "href": "string",
      "hreflang": "string",
      "title": "string",
      "type": "string",
      "deprecation": "string",
      "profile": "string",
      "name": "string",
      "templated": true
    },
    "additionalProperty2": {
      "href": "string",
      "hreflang": "string",
      "title": "string",
      "type": "string",
      "deprecation": "string",
      "profile": "string",
      "name": "string",
      "templated": true
    }
  },
  "page": {
    "size": 42,
    "totalElements": 42,
    "totalPages": 42,
    "number": 42
  }
}