mod-kb-ebsco-java (v1)

https://github.com/folio-org/mod-kb-ebsco-java

Table of contents

mod-kb-ebsco-java

Implements the eholdings interface using EBSCO KB as backend.

Cost-per-use

GET /eholdings/resources/{resourceId}/costperuse

Retrieve cost-per-use information for a particular resource

GET /eholdings/resources/{resourceId}/costperuse
URI Parameters
  • resourceId: required (string - pattern: ^\d+-\d+-\d+$)

    Identifier of the resource formed from Provider Id, Package Id, Title Id

    Example:

    22-1887786-1440285
Query Parameters
  • platform: (string)

    Include publisher, non-publisher or all platforms Possible values are

    • publisher
    • nonPublisher
    • all
  • fiscalYear: required (string - pattern: ^\d{4}$)

    Fiscal year of cost-per-use data

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Resource cost-per-use object schema",
  "description": "Resource cost-per-use object schema",
  "type": "object",
  "javaType": "org.folio.rest.jaxrs.model.ResourceCostPerUse",
  "additionalProperties": false,
  "properties": {
    "resourceId": {
      "type": "string",
      "description": "Resource ID",
      "example": "22-1887786-1440285"
    },
    "type": {
      "type": "string",
      "description": "Type of resource",
      "enum": [
        "resourceCostPerUse"
      ],
      "example": "resourceCostPerUse"
    },
    "attributes": {
      "type": "object",
      "description": "Resource cost-per-use attributes",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Resource cost-per-use data attributes object schema",
      "javaType": "org.folio.rest.jaxrs.model.ResourceCostPerUseDataAttributes",
      "additionalProperties": false,
      "properties": {
        "usage": {
          "type": "object",
          "description": "Usage of current resource",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Usage object schema",
          "javaType": "org.folio.rest.jaxrs.model.Usage",
          "additionalProperties": false,
          "properties": {
            "platforms": {
              "type": "array",
              "description": "List of platforms and their usage",
              "items": {
                "type": "object",
                "$schema": "http://json-schema.org/draft-04/schema#",
                "title": "Specific platform usage object schema",
                "description": "Specific platform usage object schema",
                "javaType": "org.folio.rest.jaxrs.model.SpecificPlatformUsage",
                "additionalProperties": false,
                "extends": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Platform usage object schema",
                  "description": "Platform usage object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.PlatformUsage",
                  "additionalProperties": false,
                  "properties": {
                    "counts": {
                      "type": "array",
                      "description": "Counts of usage per month",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        100,
                        0,
                        100,
                        0,
                        0,
                        0,
                        0,
                        null,
                        100,
                        100,
                        0,
                        100
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total count of usage",
                      "example": 500
                    }
                  },
                  "required": [
                    "counts",
                    "total"
                  ]
                },
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of platform",
                    "example": "InjentaConnect"
                  },
                  "isPublisherPlatform": {
                    "type": "boolean",
                    "description": "Publisher or non-publisher type of platform",
                    "example": true
                  }
                },
                "required": [
                  "name",
                  "isPublisherPlatform"
                ]
              }
            },
            "totals": {
              "type": "object",
              "description": "Totals of platform usage",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Usage totals object schema",
              "javaType": "org.folio.rest.jaxrs.model.UsageTotals",
              "additionalProperties": false,
              "properties": {
                "publisher": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Platform usage object schema",
                  "description": "Platform usage object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.PlatformUsage",
                  "additionalProperties": false,
                  "properties": {
                    "counts": {
                      "type": "array",
                      "description": "Counts of usage per month",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        100,
                        0,
                        100,
                        0,
                        0,
                        0,
                        0,
                        null,
                        100,
                        100,
                        0,
                        100
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total count of usage",
                      "example": 500
                    }
                  },
                  "required": [
                    "counts",
                    "total"
                  ]
                },
                "nonPublisher": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Platform usage object schema",
                  "description": "Platform usage object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.PlatformUsage",
                  "additionalProperties": false,
                  "properties": {
                    "counts": {
                      "type": "array",
                      "description": "Counts of usage per month",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        100,
                        0,
                        100,
                        0,
                        0,
                        0,
                        0,
                        null,
                        100,
                        100,
                        0,
                        100
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total count of usage",
                      "example": 500
                    }
                  },
                  "required": [
                    "counts",
                    "total"
                  ]
                },
                "all": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Platform usage object schema",
                  "description": "Platform usage object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.PlatformUsage",
                  "additionalProperties": false,
                  "properties": {
                    "counts": {
                      "type": "array",
                      "description": "Counts of usage per month",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        100,
                        0,
                        100,
                        0,
                        0,
                        0,
                        0,
                        null,
                        100,
                        100,
                        0,
                        100
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total count of usage",
                      "example": 500
                    }
                  },
                  "required": [
                    "counts",
                    "total"
                  ]
                }
              }
            }
          }
        },
        "analysis": {
          "type": "object",
          "description": "Cost of current resource",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Cost analysis object schema",
          "javaType": "org.folio.rest.jaxrs.model.CostAnalysis",
          "additionalProperties": false,
          "properties": {
            "publisherPlatforms": {
              "type": "object",
              "description": "Publisher platforms analysis",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Cost analysis attributes object schema",
              "javaType": "org.folio.rest.jaxrs.model.CostAnalysisAttributes",
              "additionalProperties": false,
              "properties": {
                "cost": {
                  "type": "number",
                  "description": "Cost of resource",
                  "example": "800.00"
                },
                "usage": {
                  "type": "integer",
                  "description": "Count of usage",
                  "example": "800"
                },
                "costPerUse": {
                  "type": "number",
                  "description": "Cost-per-use of resource",
                  "example": "1.00"
                }
              }
            },
            "nonPublisherPlatforms": {
              "type": "object",
              "description": "Non-publisher platforms analysis",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Cost analysis attributes object schema",
              "javaType": "org.folio.rest.jaxrs.model.CostAnalysisAttributes",
              "additionalProperties": false,
              "properties": {
                "cost": {
                  "type": "number",
                  "description": "Cost of resource",
                  "example": "800.00"
                },
                "usage": {
                  "type": "integer",
                  "description": "Count of usage",
                  "example": "800"
                },
                "costPerUse": {
                  "type": "number",
                  "description": "Cost-per-use of resource",
                  "example": "1.00"
                }
              }
            },
            "allPlatforms": {
              "type": "object",
              "description": "All platforms analysis",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Cost analysis attributes object schema",
              "javaType": "org.folio.rest.jaxrs.model.CostAnalysisAttributes",
              "additionalProperties": false,
              "properties": {
                "cost": {
                  "type": "number",
                  "description": "Cost of resource",
                  "example": "800.00"
                },
                "usage": {
                  "type": "integer",
                  "description": "Count of usage",
                  "example": "800"
                },
                "costPerUse": {
                  "type": "number",
                  "description": "Cost-per-use of resource",
                  "example": "1.00"
                }
              }
            }
          }
        },
        "parameters": {
          "type": "object",
          "description": "Response's parameters",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Cost-per-use response parameters object schema",
          "javaType": "org.folio.rest.jaxrs.model.CostPerUseParameters",
          "additionalProperties": false,
          "properties": {
            "startMonth": {
              "type": "string",
              "description": "Fiscal starting month",
              "example": "jan",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "javaType": "org.folio.rest.jaxrs.model.Month",
              "enum": [
                "jan",
                "feb",
                "mar",
                "apr",
                "may",
                "jun",
                "jul",
                "aug",
                "sep",
                "oct",
                "nov",
                "dec"
              ]
            },
            "currency": {
              "type": "string",
              "description": "Currency",
              "example": "USD"
            }
          },
          "required": [
            "startMonth",
            "currency"
          ]
        }
      },
      "required": [
        "usage",
        "analysis",
        "parameters"
      ]
    }
  },
  "required": [
    "type",
    "attributes"
  ]
}

Example:

{
  "resourceId": "1-473-356",
  "type": "resourceCostPerUse",
  "attributes": {
    "usage": {
      "platforms": [
        {
          "name": "Wiley Online Library",
          "isPublisherPlatform": true,
          "counts": [
            0,
            1,
            3,
            1,
            3,
            1,
            16,
            1,
            null,
            null,
            null,
            null
          ],
          "total": 26
        },
        {
          "name": "EBSCOhost",
          "isPublisherPlatform": false,
          "counts": [
            2,
            null,
            1,
            null,
            null,
            null,
            3,
            4,
            null,
            null,
            null,
            null
          ],
          "total": 10
        }
      ],
      "totals": {
        "publisher": {
          "counts": [
            0,
            1,
            3,
            1,
            3,
            1,
            16,
            1,
            null,
            null,
            null,
            null
          ],
          "total": 26
        },
        "nonPublisher": {
          "counts": [
            2,
            null,
            1,
            null,
            null,
            null,
            3,
            4,
            null,
            null,
            null,
            null
          ],
          "total": 10
        },
        "all": {
          "counts": [
            2,
            1,
            4,
            1,
            3,
            1,
            19,
            5,
            null,
            null,
            null,
            null
          ],
          "total": 36
        }
      }
    },
    "analysis": {
      "publisherPlatforms": {
        "cost": 100.0,
        "usage": 26,
        "costPerUse": 3.8461538461538463
      },
      "nonPublisherPlatforms": {
        "cost": 100.0,
        "usage": 10,
        "costPerUse": 10.0
      },
      "allPlatforms": {
        "cost": 100.0,
        "usage": 36,
        "costPerUse": 2.7777777777777777
      }
    },
    "parameters": {
      "startMonth": "apr",
      "currency": "USD"
    }
  }
}

Response 400

Bad Request

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Error Response Schema",
  "description": "Error Response Schema for JSON API",
  "javaType": "org.folio.rest.jaxrs.model.JsonapiError",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "description": "Error Response List",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Error Response object",
        "description": "Error Response Schema for JSON API",
        "javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error Message Title",
            "example": "Invalid KB API Credentials"
          },
          "detail": {
            "type": "string",
            "description": "Error Message Detail",
            "example": "Kb api credentials are invalid"
          },
          "source": {
            "type": "object",
            "description": "Source of Error Message",
            "example": {}
          }
        }
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Some APIGEE error message"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 422

Unprocessable Entity

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Error Response Schema",
  "description": "Error Response Schema for JSON API",
  "javaType": "org.folio.rest.jaxrs.model.JsonapiError",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "description": "Error Response List",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Error Response object",
        "description": "Error Response Schema for JSON API",
        "javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error Message Title",
            "example": "Invalid KB API Credentials"
          },
          "detail": {
            "type": "string",
            "description": "Error Message Detail",
            "example": "Kb api credentials are invalid"
          },
          "source": {
            "type": "object",
            "description": "Source of Error Message",
            "example": {}
          }
        }
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Invalid year"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Cost-per-use

GET /eholdings/titles/{titleId}/costperuse

Retrieve cost-per-use information for a particular title

GET /eholdings/titles/{titleId}/costperuse
URI Parameters
  • titleId: required (string - pattern: ^\d+$)

    Identifier of the title

    Example:

    440285
Query Parameters
  • platform: (string)

    Include publisher, non-publisher or all platforms Possible values are

    • publisher
    • nonPublisher
    • all
  • fiscalYear: required (string - pattern: ^\d{4}$)

    Fiscal year of cost-per-use data

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Title cost-per-use object schema",
  "description": "Title cost-per-use object schema",
  "type": "object",
  "javaType": "org.folio.rest.jaxrs.model.TitleCostPerUse",
  "additionalProperties": false,
  "properties": {
    "titleId": {
      "type": "string",
      "description": "Title ID",
      "example": "1440285"
    },
    "type": {
      "type": "string",
      "description": "Type of resource",
      "enum": [
        "titleCostPerUse"
      ],
      "example": "titleCostPerUse"
    },
    "attributes": {
      "type": "object",
      "description": "Title cost-per-use attributes",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Title cost-per-use data attributes object schema",
      "javaType": "org.folio.rest.jaxrs.model.TitleCostPerUseDataAttributes",
      "additionalProperties": false,
      "properties": {
        "usage": {
          "type": "object",
          "description": "Usage of current title",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Usage object schema",
          "javaType": "org.folio.rest.jaxrs.model.Usage",
          "additionalProperties": false,
          "properties": {
            "platforms": {
              "type": "array",
              "description": "List of platforms and their usage",
              "items": {
                "type": "object",
                "$schema": "http://json-schema.org/draft-04/schema#",
                "title": "Specific platform usage object schema",
                "description": "Specific platform usage object schema",
                "javaType": "org.folio.rest.jaxrs.model.SpecificPlatformUsage",
                "additionalProperties": false,
                "extends": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Platform usage object schema",
                  "description": "Platform usage object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.PlatformUsage",
                  "additionalProperties": false,
                  "properties": {
                    "counts": {
                      "type": "array",
                      "description": "Counts of usage per month",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        100,
                        0,
                        100,
                        0,
                        0,
                        0,
                        0,
                        null,
                        100,
                        100,
                        0,
                        100
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total count of usage",
                      "example": 500
                    }
                  },
                  "required": [
                    "counts",
                    "total"
                  ]
                },
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of platform",
                    "example": "InjentaConnect"
                  },
                  "isPublisherPlatform": {
                    "type": "boolean",
                    "description": "Publisher or non-publisher type of platform",
                    "example": true
                  }
                },
                "required": [
                  "name",
                  "isPublisherPlatform"
                ]
              }
            },
            "totals": {
              "type": "object",
              "description": "Totals of platform usage",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Usage totals object schema",
              "javaType": "org.folio.rest.jaxrs.model.UsageTotals",
              "additionalProperties": false,
              "properties": {
                "publisher": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Platform usage object schema",
                  "description": "Platform usage object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.PlatformUsage",
                  "additionalProperties": false,
                  "properties": {
                    "counts": {
                      "type": "array",
                      "description": "Counts of usage per month",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        100,
                        0,
                        100,
                        0,
                        0,
                        0,
                        0,
                        null,
                        100,
                        100,
                        0,
                        100
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total count of usage",
                      "example": 500
                    }
                  },
                  "required": [
                    "counts",
                    "total"
                  ]
                },
                "nonPublisher": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Platform usage object schema",
                  "description": "Platform usage object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.PlatformUsage",
                  "additionalProperties": false,
                  "properties": {
                    "counts": {
                      "type": "array",
                      "description": "Counts of usage per month",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        100,
                        0,
                        100,
                        0,
                        0,
                        0,
                        0,
                        null,
                        100,
                        100,
                        0,
                        100
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total count of usage",
                      "example": 500
                    }
                  },
                  "required": [
                    "counts",
                    "total"
                  ]
                },
                "all": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Platform usage object schema",
                  "description": "Platform usage object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.PlatformUsage",
                  "additionalProperties": false,
                  "properties": {
                    "counts": {
                      "type": "array",
                      "description": "Counts of usage per month",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        100,
                        0,
                        100,
                        0,
                        0,
                        0,
                        0,
                        null,
                        100,
                        100,
                        0,
                        100
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total count of usage",
                      "example": 500
                    }
                  },
                  "required": [
                    "counts",
                    "total"
                  ]
                }
              }
            }
          }
        },
        "analysis": {
          "type": "object",
          "description": "Cost of current title",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Cost analysis object schema",
          "javaType": "org.folio.rest.jaxrs.model.TitleCostAnalysis",
          "additionalProperties": false,
          "properties": {
            "holdingsSummary": {
              "type": "array",
              "description": "Holdings summary analysis",
              "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "title": "Cost analysis attributes object schema",
                "description": "Cost analysis attributes object schema",
                "type": "object",
                "javaType": "org.folio.rest.jaxrs.model.HoldingsCostAnalysisAttributes",
                "additionalProperties": false,
                "extends": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "title": "Cost analysis attributes object schema",
                  "description": "Cost analysis attributes object schema",
                  "type": "object",
                  "javaType": "org.folio.rest.jaxrs.model.CostAnalysisAttributes",
                  "additionalProperties": false,
                  "properties": {
                    "cost": {
                      "type": "number",
                      "description": "Cost of resource",
                      "example": "800.00"
                    },
                    "usage": {
                      "type": "integer",
                      "description": "Count of usage",
                      "example": "800"
                    },
                    "costPerUse": {
                      "type": "number",
                      "description": "Cost-per-use of resource",
                      "example": "1.00"
                    }
                  }
                },
                "properties": {
                  "packageId": {
                    "type": "string",
                    "description": "Package ID",
                    "pattern": "^\\d+-\\d+$",
                    "example": "12-567"
                  },
                  "resourceId": {
                    "type": "string",
                    "description": "Resource ID",
                    "pattern": "^\\d+-\\d+-\\d+$",
                    "example": "12-567-897456"
                  },
                  "packageName": {
                    "type": "string",
                    "description": "Package Name",
                    "example": "EBSCO eBooks"
                  },
                  "coverageStatement": {
                    "type": "string",
                    "description": "Coverage statement",
                    "example": "Only 2000s issues available."
                  },
                  "coverages": {
                    "type": "array",
                    "description": "List of Coverages information",
                    "items": {
                      "type": "object",
                      "description": "Coverages information",
                      "$schema": "http://json-schema.org/draft-04/schema#",
                      "title": "Coverage Schema",
                      "javaType": "org.folio.rest.jaxrs.model.Coverage",
                      "additionalProperties": false,
                      "properties": {
                        "beginCoverage": {
                          "type": "string",
                          "description": "Begin Coverage Date",
                          "example": "2003-01-01"
                        },
                        "endCoverage": {
                          "type": "string",
                          "description": "End Coverage Date",
                          "example": "2003-12-01"
                        }
                      }
                    }
                  },
                  "embargoPeriod": {
                    "type": "object",
                    "description": "Embargo Period information",
                    "$schema": "http://json-schema.org/draft-04/schema#",
                    "title": "Embargo Period Schema",
                    "javaType": "org.folio.rest.jaxrs.model.EmbargoPeriod",
                    "additionalProperties": false,
                    "properties": {
                      "embargoUnit": {
                        "type": "string",
                        "description": "The unit of time to use for the embargo. Possible values are 'Days', 'Weeks', 'Months', 'Years'",
                        "enum": [
                          "Days",
                          "Weeks",
                          "Months",
                          "Years"
                        ],
                        "example": "Days"
                      },
                      "embargoValue": {
                        "type": "integer",
                        "description": "The embargo value (number of embargoUnits). A Null value means there is no embargo.",
                        "example": 7
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": {
          "type": "object",
          "description": "Response's parameters",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Cost-per-use response parameters object schema",
          "javaType": "org.folio.rest.jaxrs.model.CostPerUseParameters",
          "additionalProperties": false,
          "properties": {
            "startMonth": {
              "type": "string",
              "description": "Fiscal starting month",
              "example": "jan",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "javaType": "org.folio.rest.jaxrs.model.Month",
              "enum": [
                "jan",
                "feb",
                "mar",
                "apr",
                "may",
                "jun",
                "jul",
                "aug",
                "sep",
                "oct",
                "nov",
                "dec"
              ]
            },
            "currency": {
              "type": "string",
              "description": "Currency",
              "example": "USD"
            }
          },
          "required": [
            "startMonth",
            "currency"
          ]
        }
      },
      "required": [
        "usage",
        "analysis",
        "parameters"
      ]
    }
  },
  "required": [
    "type",
    "attributes"
  ]
}

Example:

{
  "titleId": "50974",
  "type": "titleCostPerUse",
  "attributes": {
    "usage": {
      "platforms": [
        {
          "name": "OvidSP",
          "isPublisherPlatform": true,
          "counts": [
            0,
            1,
            0,
            0,
            1,
            1,
            0,
            0,
            15,
            27,
            0,
            2
          ],
          "total": 47
        },
        {
          "name": "EBSCOhost",
          "isPublisherPlatform": false,
          "counts": [
            11,
            19,
            29,
            33,
            14,
            10,
            7,
            3,
            7,
            9,
            17,
            3
          ],
          "total": 162
        },
        {
          "name": "ProQuest",
          "isPublisherPlatform": false,
          "counts": [
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            72,
            145,
            null
          ],
          "total": 217
        }
      ],
      "totals": {
        "publisher": {
          "counts": [
            0,
            1,
            0,
            0,
            1,
            1,
            0,
            0,
            15,
            27,
            0,
            2
          ],
          "total": 47
        },
        "nonPublisher": {
          "counts": [
            11,
            19,
            29,
            33,
            14,
            10,
            7,
            3,
            7,
            81,
            162,
            3
          ],
          "total": 379
        },
        "all": {
          "counts": [
            11,
            20,
            29,
            33,
            15,
            11,
            7,
            3,
            22,
            108,
            162,
            5
          ],
          "total": 426
        }
      }
    },
    "analysis": {
      "holdingsSummary": [
        {
          "packageId": "18-53",
          "packageName": "Gale General OneFile",
          "costPerUse": 0.0,
          "coverageStatement": "",
          "coverages": [
            {
              "beginCoverage": "2000-01-06",
              "endCoverage": ""
            }
          ],
          "embargoPeriod": {
            "embargoValue": 0
          },
          "cost": 0.0,
          "usage": 426
        },
        {
          "packageId": "36-434",
          "packageName": "Springer Nature Journals",
          "costPerUse": 19.953051643192488,
          "coverageStatement": "",
          "coverages": [
            {
              "beginCoverage": "1869-01-01",
              "endCoverage": ""
            }
          ],
          "embargoPeriod": {
            "embargoUnit": "Months",
            "embargoValue": 10
          },
          "cost": 8500.0,
          "usage": 426
        },
        {
          "packageId": "273-1812",
          "packageName": "EBSCO Open Access Journals",
          "costPerUse": 0.0,
          "coverages": [
            {
              "beginCoverage": "1869-01-01",
              "endCoverage": "1875-12-31"
            }
          ],
          "embargoPeriod": {
            "embargoValue": 0
          },
          "cost": 0.0,
          "usage": 426
        },
        {
          "packageId": "19-1073",
          "packageName": "Academic Search Alumni Edition",
          "costPerUse": 0.0,
          "coverages": [
            {
              "beginCoverage": "1997-06-05",
              "endCoverage": "2015-11-27"
            }
          ],
          "embargoPeriod": {
            "embargoValue": 0
          },
          "cost": 0.0,
          "usage": 426
        },
        {
          "packageId": "22-4643",
          "packageName": "Research Library",
          "costPerUse": 0.0,
          "coverages": [
            {
              "beginCoverage": "1990-01-04",
              "endCoverage": ""
            }
          ],
          "embargoPeriod": {
            "embargoValue": 0
          },
          "cost": 0.0,
          "usage": 426
        },
        {
          "packageId": "22-2110355",
          "packageName": "ProQuest Central",
          "costPerUse": 0.0,
          "coverages": [
            {
              "beginCoverage": "1990-01-04",
              "endCoverage": ""
            }
          ],
          "embargoPeriod": {
            "embargoValue": 0
          },
          "cost": 0.0,
          "usage": 426
        },
        {
          "packageId": "36-3262872",
          "packageName": "Academic Journals on Nature.com",
          "costPerUse": 0.0,
          "coverages": [
            {
              "beginCoverage": "1869-11-04",
              "endCoverage": ""
            }
          ],
          "embargoPeriod": {
            "embargoValue": 0
          },
          "cost": 0.0,
          "usage": 426
        }
      ]
    },
    "parameters": {
      "startMonth": "jan",
      "currency": "USD"
    }
  }
}

Response 400

Bad Request

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Error Response Schema",
  "description": "Error Response Schema for JSON API",
  "javaType": "org.folio.rest.jaxrs.model.JsonapiError",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "description": "Error Response List",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Error Response object",
        "description": "Error Response Schema for JSON API",
        "javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error Message Title",
            "example": "Invalid KB API Credentials"
          },
          "detail": {
            "type": "string",
            "description": "Error Message Detail",
            "example": "Kb api credentials are invalid"
          },
          "source": {
            "type": "object",
            "description": "Source of Error Message",
            "example": {}
          }
        }
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Some APIGEE error message"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 422

Unprocessable Entity

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Error Response Schema",
  "description": "Error Response Schema for JSON API",
  "javaType": "org.folio.rest.jaxrs.model.JsonapiError",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "description": "Error Response List",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Error Response object",
        "description": "Error Response Schema for JSON API",
        "javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error Message Title",
            "example": "Invalid KB API Credentials"
          },
          "detail": {
            "type": "string",
            "description": "Error Message Detail",
            "example": "Kb api credentials are invalid"
          },
          "source": {
            "type": "object",
            "description": "Source of Error Message",
            "example": {}
          }
        }
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Invalid year"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Cost-per-use

GET /eholdings/packages/{packageId}/costperuse

Retrieve cost-per-use information for a particular package

GET /eholdings/packages/{packageId}/costperuse
URI Parameters
  • packageId: required (string - pattern: ^\d+-\d+$)

    Identifier of the package

    Example:

    15-440285
Query Parameters
  • platform: (string)

    Include publisher, non-publisher or all platforms Possible values are

    • publisher
    • nonPublisher
    • all
  • fiscalYear: required (string - pattern: ^\d{4}$)

    Fiscal year of cost-per-use data

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Package cost-per-use object schema",
  "description": "Package cost-per-use object schema",
  "type": "object",
  "javaType": "org.folio.rest.jaxrs.model.PackageCostPerUse",
  "additionalProperties": false,
  "properties": {
    "packageId": {
      "type": "string",
      "description": "Package ID",
      "example": "15-1440285"
    },
    "type": {
      "type": "string",
      "description": "Type of resource",
      "enum": [
        "packageCostPerUse"
      ],
      "example": "packageCostPerUse"
    },
    "attributes": {
      "type": "object",
      "description": "Package cost-per-use attributes",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Package cost-per-use data attributes object schema",
      "javaType": "org.folio.rest.jaxrs.model.PackageCostPerUseDataAttributes",
      "additionalProperties": false,
      "properties": {
        "analysis": {
          "type": "object",
          "description": "Cost of current package",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Cost analysis object schema",
          "javaType": "org.folio.rest.jaxrs.model.CostAnalysis",
          "additionalProperties": false,
          "properties": {
            "publisherPlatforms": {
              "type": "object",
              "description": "Publisher platforms analysis",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Cost analysis attributes object schema",
              "javaType": "org.folio.rest.jaxrs.model.CostAnalysisAttributes",
              "additionalProperties": false,
              "properties": {
                "cost": {
                  "type": "number",
                  "description": "Cost of resource",
                  "example": "800.00"
                },
                "usage": {
                  "type": "integer",
                  "description": "Count of usage",
                  "example": "800"
                },
                "costPerUse": {
                  "type": "number",
                  "description": "Cost-per-use of resource",
                  "example": "1.00"
                }
              }
            },
            "nonPublisherPlatforms": {
              "type": "object",
              "description": "Non-publisher platforms analysis",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Cost analysis attributes object schema",
              "javaType": "org.folio.rest.jaxrs.model.CostAnalysisAttributes",
              "additionalProperties": false,
              "properties": {
                "cost": {
                  "type": "number",
                  "description": "Cost of resource",
                  "example": "800.00"
                },
                "usage": {
                  "type": "integer",
                  "description": "Count of usage",
                  "example": "800"
                },
                "costPerUse": {
                  "type": "number",
                  "description": "Cost-per-use of resource",
                  "example": "1.00"
                }
              }
            },
            "allPlatforms": {
              "type": "object",
              "description": "All platforms analysis",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Cost analysis attributes object schema",
              "javaType": "org.folio.rest.jaxrs.model.CostAnalysisAttributes",
              "additionalProperties": false,
              "properties": {
                "cost": {
                  "type": "number",
                  "description": "Cost of resource",
                  "example": "800.00"
                },
                "usage": {
                  "type": "integer",
                  "description": "Count of usage",
                  "example": "800"
                },
                "costPerUse": {
                  "type": "number",
                  "description": "Cost-per-use of resource",
                  "example": "1.00"
                }
              }
            }
          }
        },
        "parameters": {
          "type": "object",
          "description": "Response's parameters",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Cost-per-use response parameters object schema",
          "javaType": "org.folio.rest.jaxrs.model.CostPerUseParameters",
          "additionalProperties": false,
          "properties": {
            "startMonth": {
              "type": "string",
              "description": "Fiscal starting month",
              "example": "jan",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "javaType": "org.folio.rest.jaxrs.model.Month",
              "enum": [
                "jan",
                "feb",
                "mar",
                "apr",
                "may",
                "jun",
                "jul",
                "aug",
                "sep",
                "oct",
                "nov",
                "dec"
              ]
            },
            "currency": {
              "type": "string",
              "description": "Currency",
              "example": "USD"
            }
          },
          "required": [
            "startMonth",
            "currency"
          ]
        }
      },
      "required": [
        "usage",
        "analysis",
        "parameters"
      ]
    }
  },
  "required": [
    "type",
    "attributes"
  ]
}

Example:

{
  "packageId": "1-473",
  "type": "packageCostPerUse",
  "attributes": {
    "analysis": {
      "publisherPlatforms": {
        "cost": 100.0,
        "usage": 26,
        "costPerUse": 3.8461538461538463
      },
      "nonPublisherPlatforms": {
        "cost": 100.0,
        "usage": 10,
        "costPerUse": 10.0
      },
      "allPlatforms": {
        "cost": 100.0,
        "usage": 36,
        "costPerUse": 2.7777777777777777
      }
    },
    "parameters": {
      "startMonth": "apr",
      "currency": "USD"
    }
  }
}

Response 400

Bad Request

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Error Response Schema",
  "description": "Error Response Schema for JSON API",
  "javaType": "org.folio.rest.jaxrs.model.JsonapiError",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "description": "Error Response List",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Error Response object",
        "description": "Error Response Schema for JSON API",
        "javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error Message Title",
            "example": "Invalid KB API Credentials"
          },
          "detail": {
            "type": "string",
            "description": "Error Message Detail",
            "example": "Kb api credentials are invalid"
          },
          "source": {
            "type": "object",
            "description": "Source of Error Message",
            "example": {}
          }
        }
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Some APIGEE error message"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 422

Unprocessable Entity

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Error Response Schema",
  "description": "Error Response Schema for JSON API",
  "javaType": "org.folio.rest.jaxrs.model.JsonapiError",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "description": "Error Response List",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Error Response object",
        "description": "Error Response Schema for JSON API",
        "javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error Message Title",
            "example": "Invalid KB API Credentials"
          },
          "detail": {
            "type": "string",
            "description": "Error Message Detail",
            "example": "Kb api credentials are invalid"
          },
          "source": {
            "type": "object",
            "description": "Source of Error Message",
            "example": {}
          }
        }
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Invalid year"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Cost-per-use

GET /eholdings/packages/{packageId}/resources/costperuse

Retrieve cost-per-use information for package resources

GET /eholdings/packages/{packageId}/resources/costperuse
URI Parameters
  • packageId: required (string - pattern: ^\d+-\d+$)

    Identifier of the package

    Example:

    15-440285
Query Parameters
  • platform: (string)

    Include publisher, non-publisher or all platforms Possible values are

    • publisher
    • nonPublisher
    • all
  • fiscalYear: required (string - pattern: ^\d{4}$)

    Fiscal year of cost-per-use data

  • order: (one of asc, desc - default: asc)

    Order

  • sort: (string - default: name)

    Option by which results are sorted. Possible values are name, type, cost, usage, costperuse, percent.

  • page: (integer - default: 1 - minimum: 1 - maximum: 2147483647)

    Page number

    Example:

    1
  • count: (integer - default: 100 - minimum: 1 - maximum: 1000)

    Page size

    Example:

    100

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Resources' cost-per-use collection object schema",
  "description": "Resources' cost-per-use collection object schema",
  "type": "object",
  "javaType": "org.folio.rest.jaxrs.model.ResourceCostPerUseCollection",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of resources' cost-per-use",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Resources' cost-per-use collection item object schema",
        "description": "Resources' cost-per-use collection item object schema",
        "javaType": "org.folio.rest.jaxrs.model.ResourceCostPerUseCollectionItem",
        "additionalProperties": false,
        "properties": {
          "resourceId": {
            "type": "string",
            "description": "Resource ID",
            "example": "22-1887786-1440285"
          },
          "type": {
            "type": "string",
            "description": "Type of resource",
            "enum": [
              "resourceCostPerUseItem"
            ],
            "example": "resourceCostPerUseItem"
          },
          "attributes": {
            "type": "object",
            "description": "Resource cost-per-use collection item attributes",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "title": "Resource cost analysis object schema",
            "javaType": "org.folio.rest.jaxrs.model.ResourceCostAnalysisAttributes",
            "additionalProperties": false,
            "extends": {
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "Cost analysis attributes object schema",
              "description": "Cost analysis attributes object schema",
              "type": "object",
              "javaType": "org.folio.rest.jaxrs.model.CostAnalysisAttributes",
              "additionalProperties": false,
              "properties": {
                "cost": {
                  "type": "number",
                  "description": "Cost of resource",
                  "example": "800.00"
                },
                "usage": {
                  "type": "integer",
                  "description": "Count of usage",
                  "example": "800"
                },
                "costPerUse": {
                  "type": "number",
                  "description": "Cost-per-use of resource",
                  "example": "1.00"
                }
              }
            },
            "properties": {
              "name": {
                "type": "string",
                "description": "Resource name",
                "example": "American Journal of Undergraduate Research"
              },
              "publicationType": {
                "type": "string",
                "description": "Publication type",
                "$schema": "http://json-schema.org/draft-04/schema#",
                "title": "Publication Type schema",
                "javaType": "org.folio.rest.jaxrs.model.PublicationType",
                "additionalProperties": false,
                "enum": [
                  "All",
                  "Audiobook",
                  "Audio book",
                  "Book",
                  "Book Series",
                  "Database",
                  "Journal",
                  "Newsletter",
                  "Newspaper",
                  "Proceedings",
                  "Report",
                  "Streaming Audio",
                  "Streaming Video",
                  "Thesis & Dissertation",
                  "Thesis/Dissertation",
                  "Website",
                  "Web site",
                  "Unspecified"
                ],
                "example": "Journal"
              },
              "percent": {
                "type": "number",
                "description": "Percent of usage",
                "example": "20.5"
              }
            }
          }
        },
        "required": [
          "resourceId",
          "type",
          "attributes"
        ]
      }
    },
    "parameters": {
      "type": "object",
      "description": "Response's parameters",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Cost-per-use response parameters object schema",
      "javaType": "org.folio.rest.jaxrs.model.CostPerUseParameters",
      "additionalProperties": false,
      "properties": {
        "startMonth": {
          "type": "string",
          "description": "Fiscal starting month",
          "example": "jan",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "javaType": "org.folio.rest.jaxrs.model.Month",
          "enum": [
            "jan",
            "feb",
            "mar",
            "apr",
            "may",
            "jun",
            "jul",
            "aug",
            "sep",
            "oct",
            "nov",
            "dec"
          ]
        },
        "currency": {
          "type": "string",
          "description": "Currency",
          "example": "USD"
        }
      },
      "required": [
        "startMonth",
        "currency"
      ]
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in collection",
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata total results Schema",
      "javaType": "org.folio.rest.jaxrs.model.MetaTotalResults",
      "additionalProperties": false,
      "properties": {
        "totalResults": {
          "type": "integer",
          "description": "Total number of results",
          "example": 2
        }
      },
      "required": [
        "totalResults"
      ]
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  },
  "required": [
    "data",
    "meta",
    "jsonapi"
  ]
}

Example:

{
  "data": [
    {
      "resourceId": "1-222222-19",
      "type": "resourceCostPerUseItem",
      "attributes": {
        "name": "Sample name 1",
        "publicationType": "Book",
        "cost": 100.0,
        "usage": 2,
        "costPerUse": 50.0
      }
    },
    {
      "resourceId": "1-222222-9",
      "type": "resourceCostPerUseItem",
      "attributes": {
        "name": "Sample name 2",
        "publicationType": "Book",
        "cost": 100.0,
        "usage": 2,
        "costPerUse": 50.0
      }
    }
  ],
  "parameters": {
    "startMonth": "apr",
    "currency": "USD"
  },
  "meta": {
    "totalResults": 20
  },
  "jsonapi": {
    "version": "1.0"
  }
}

Response 400

Bad Request

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Error Response Schema",
  "description": "Error Response Schema for JSON API",
  "javaType": "org.folio.rest.jaxrs.model.JsonapiError",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "description": "Error Response List",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Error Response object",
        "description": "Error Response Schema for JSON API",
        "javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error Message Title",
            "example": "Invalid KB API Credentials"
          },
          "detail": {
            "type": "string",
            "description": "Error Message Detail",
            "example": "Kb api credentials are invalid"
          },
          "source": {
            "type": "object",
            "description": "Source of Error Message",
            "example": {}
          }
        }
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Some APIGEE error message"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 422

Unprocessable Entity

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Error Response Schema",
  "description": "Error Response Schema for JSON API",
  "javaType": "org.folio.rest.jaxrs.model.JsonapiError",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "description": "Error Response List",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Error Response object",
        "description": "Error Response Schema for JSON API",
        "javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error Message Title",
            "example": "Invalid KB API Credentials"
          },
          "detail": {
            "type": "string",
            "description": "Error Message Detail",
            "example": "Kb api credentials are invalid"
          },
          "source": {
            "type": "object",
            "description": "Source of Error Message",
            "example": {}
          }
        }
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "JSON API Version Schema",
      "javaType": "org.folio.rest.jaxrs.model.JsonAPI",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of json api being used",
          "example": "1.0"
        }
      },
      "required": [
        "version"
      ]
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Invalid year"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}