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.

Packages

GET /eholdings/packages

Retrieve a collection of packages based on the search query.

GET /eholdings/packages
Query Parameters
  • filter[custom]: (string)

    Filter to get list of custom packages Possible values are

    • true

    Example:

    true
  • q: (string)

    String used to search to retrieve a collection

    Example:

    ABC-CLIO
  • filter[selected]: (string)

    Filter to narrow down results based on selection status. Possible values are all, true, false, ebsco.

    Example:

    all
  • filter[type]: (string - default: all)

    Filter to narrow down results based on content type. Defaults to all. Possible values are all, aggregatedfulltext, abstractandindex, ebook, ejournal, print, unknown, onlinereference.

    Example:

    ebook
  • sort: (string - default: relevance)

    Option by which results are sorted. Defaults to relevance if query or name if no query. Possible values are name, relevance.

    Example:

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

    Page offset to retrieve results from Ebsco KB

    Example:

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

    Count of number of results to retrieve from Ebsco KB

    Example:

    100

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Package Collection Schema",
  "description": "Package Collection Schema",
  "javaType": "org.folio.rest.jaxrs.model.PackageCollection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of packages",
      "items": {
        "type": "object",
        "$ref": "packageCollectionItem.json"
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in packages collection",
      "$ref": "../metaTotalResults.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "jsonapi"
  ]
}

Example:

{
  "data": [
    {
      "id": "583-4345",
      "type": "packages",
      "attributes": {
        "contentType": "E-Book",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": true,
        "name": "ABC-CLIO eBook Collection",
        "packageId": 4345,
        "packageType": "Variable",
        "providerId": 583,
        "providerName": "ABC-CLIO",
        "selectedCount": 9589,
        "titleCount": 9590,
        "vendorId": 583,
        "vendorName": "ABC-CLIO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "583-2356523",
      "type": "packages",
      "attributes": {
        "contentType": "E-Book",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "ABC-CLIO eBook Collection 2008 (TAEBC)",
        "packageId": 2356523,
        "packageType": "Complete",
        "providerId": 583,
        "providerName": "ABC-CLIO",
        "selectedCount": 0,
        "titleCount": 693,
        "vendorId": 583,
        "vendorName": "ABC-CLIO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "583-2356522",
      "type": "packages",
      "attributes": {
        "contentType": "E-Book",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "ABC-CLIO eBook Collection 2009 (TAEBC)",
        "packageId": 2356522,
        "packageType": "Complete",
        "providerId": 583,
        "providerName": "ABC-CLIO",
        "selectedCount": 0,
        "titleCount": 1624,
        "vendorId": 583,
        "vendorName": "ABC-CLIO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "vendor": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "583-2356521",
      "type": "packages",
      "attributes": {
        "contentType": "E-Book",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "ABC-CLIO eBook Collection 2010 (TAEBC)",
        "packageId": 2356521,
        "packageType": "Complete",
        "providerId": 583,
        "providerName": "ABC-CLIO",
        "selectedCount": 0,
        "titleCount": 359,
        "vendorId": 583,
        "vendorName": "ABC-CLIO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "583-2356520",
      "type": "packages",
      "attributes": {
        "contentType": "E-Book",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "ABC-CLIO eBook Collection 2011 (TAEBC)",
        "packageId": 2356520,
        "packageType": "Complete",
        "providerId": 583,
        "providerName": "ABC-CLIO",
        "selectedCount": 0,
        "titleCount": 221,
        "vendorId": 583,
        "vendorName": "ABC-CLIO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "vendor": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "583-2356519",
      "type": "packages",
      "attributes": {
        "contentType": "E-Book",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "ABC-CLIO eBook Collection 2012 (TAEBC)",
        "packageId": 2356519,
        "packageType": "Complete",
        "providerId": 583,
        "providerName": "ABC-CLIO",
        "selectedCount": 0,
        "titleCount": 302,
        "vendorId": 583,
        "vendorName": "ABC-CLIO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "583-2356518",
      "type": "packages",
      "attributes": {
        "contentType": "E-Book",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "ABC-CLIO eBook Collection 2014 (TAEBC)",
        "packageId": 2356518,
        "packageType": "Complete",
        "providerId": 583,
        "providerName": "ABC-CLIO",
        "selectedCount": 0,
        "titleCount": 169,
        "vendorId": 583,
        "vendorName": "ABC-CLIO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "vendor": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "203-5302",
      "type": "packages",
      "attributes": {
        "contentType": "Aggregated Full Text",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "Credo ABC-CLIO Collection",
        "packageId": 5302,
        "packageType": "Variable",
        "providerId": 203,
        "providerName": "Credo Reference",
        "selectedCount": 0,
        "titleCount": 339,
        "vendorId": 203,
        "vendorName": "Credo Reference",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "203-5316",
      "type": "packages",
      "attributes": {
        "contentType": "Aggregated Full Text",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "Credo ABC-CLIO Contemporary World Issues",
        "packageId": 5316,
        "packageType": "Variable",
        "providerId": 203,
        "providerName": "Credo Reference",
        "selectedCount": 0,
        "titleCount": 74,
        "vendorId": 203,
        "vendorName": "Credo Reference",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "vendor": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "203-5317",
      "type": "packages",
      "attributes": {
        "contentType": "Aggregated Full Text",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "Credo ABC-CLIO World Mythology Collection",
        "packageId": 5317,
        "packageType": "Variable",
        "providerId": 203,
        "providerName": "Credo Reference",
        "selectedCount": 0,
        "titleCount": 10,
        "vendorId": 203,
        "vendorName": "Credo Reference",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "1075-7698",
      "type": "packages",
      "attributes": {
        "contentType": "Online Reference",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "ABC Chemistry: Directory of Free Full-Text Journals in Chemistry",
        "packageId": 7698,
        "packageType": "Complete",
        "providerId": 1075,
        "providerName": "ABC Chemistry",
        "selectedCount": 0,
        "titleCount": 1,
        "vendorId": 1075,
        "vendorName": "ABC Chemistry",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        }
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "vendor": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "meta": {
    "totalResults": 11
  },
  "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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

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

POST /eholdings/packages

Create a custom package

POST /eholdings/packages
Headers
  • Content-Type: required (string)

    Example:

    application/vnd.api+json
Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Package POST Request Schema",
  "description": "Package Post Request Schema using JSON API",
  "javaType": "org.folio.rest.jaxrs.model.PackagePostRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "description": "Data object of package post request",
      "type": "object",
      "$ref": "packagePostData.json"
    }
  },
  "required": [
    "data"
  ]
}

Example:

 {
   "data": {
     "type": "packages",
     "attributes": {
       "name": "yet another custom package",
       "contentType": "Unknown",
       "customCoverage": {
         "beginCoverage": "2003-01-01",
         "endCoverage": "2004-01-01"
       }
     }
   }
 }

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Package object schema",
  "description": "Package object schema",
  "javaType": "org.folio.rest.jaxrs.model.Package",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "The Data Schema",
      "$ref": "packageCollectionItem.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "jsonapi"
  ]
}

Example:

{
  "data": {
    "id": "123356-3168443",
    "type": "packages",
    "attributes": {
      "contentType": "E-Journal",
      "customCoverage": {
        "beginCoverage": "2003-01-01",
        "endCoverage": "2003-12-01"
      },
      "isCustom": true,
      "isSelected": true,
      "name": "DT custom packages api test one",
      "packageId": 3168443,
      "packageType": "Custom",
      "providerId": 123356,
      "providerName": "API DEV GOVERNMENT CUSTOMER",
      "selectedCount": 0,
      "titleCount": 0,
      "vendorId": 123356,
      "vendorName": "API DEV GOVERNMENT CUSTOMER",
      "visibilityData": {
        "isHidden": false,
        "reason": ""
      },
      "allowKbToAddTitles": false,
      "packageToken": null,
      "proxy": {
        "id": "<n>",
        "inherited": true
      }
    },
    "relationships": {
      "resources": {
        "meta": {
          "included": false
        }
      },
      "provider": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Custom Package with the provided name already exists"
    }
  ],
  "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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Invalid name",
      "detail": "Name can't be blank",
      "source": {}
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

GET /eholdings/packages/{packageId}

Retrieve a specific package given packageId. Note that packageId is providerId-packageId

GET /eholdings/packages/{packageId}
URI Parameters
  • packageId: required (string)

    identifier of the package formed from Provider Id and Package Id (see example)

    Example:

    583-4345
Query Parameters
  • include: (string)

    Include resources or provider in response Possible values are

    • resources
    • provider

    Example:

    resources

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Package object schema",
  "description": "Package object schema",
  "javaType": "org.folio.rest.jaxrs.model.Package",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "The Data Schema",
      "$ref": "packageCollectionItem.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "jsonapi"
  ]
}

Example:

{
  "data": {
    "id": "123355-2848228",
    "attributes": {
      "contentType": "E-Journal",
      "customCoverage": {
        "beginCoverage": "2003-01-01",
        "endCoverage": "2004-01-01"
      },
      "isCustom": true,
      "isSelected": true,
      "name": "test package for documentation again",
      "packageId": 2848228,
      "packageType": "Custom",
      "providerId": 123355,
      "providerName": "API DEV CORPORATE CUSTOMER",
      "selectedCount": 0,
      "titleCount": 0,
      "vendorId": 123355,
      "vendorName": "API DEV CORPORATE CUSTOMER",
      "visibilityData": {
        "isHidden": true,
        "reason": ""
      },
      "allowKbToAddTitles": false,
      "packageToken": {
        "factName":"siteid",
        "prompt":"/itweb/",
        "helpText":"<ul><li>Enter your token</li></ul>",
        "value": "123456"
      },
      "proxy": {
        "id": "<n>",
        "inherited": true
      }
    },
    "relationships": {
      "resources": {
        "meta": {
          "included": false
        }
      },
      "provider": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Package or provider id are invalid"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 404

Not Found

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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Package not found"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

PUT /eholdings/packages/{packageId}

Update a managed or custom package using packageId Note that packageId is providerId-packageId

PUT /eholdings/packages/{packageId}
URI Parameters
  • packageId: required (string)

    identifier of the package formed from Provider Id and Package Id (see example)

    Example:

    583-4345
Headers
  • Content-Type: required (string)

    Example:

    application/vnd.api+json
Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Package PUT Request Schema",
  "description": "Package PUT Request Schema using JSON API",
  "javaType": "org.folio.rest.jaxrs.model.PackagePutRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "description": "Data object of package put request",
      "type": "object",
      "$ref": "packagePutData.json"
    }
  },
  "required": [
    "data"
  ]
}

Example:

{
  "data": {
    "type": "packages",
    "attributes": {
      "name": "test package for documentation",
      "contentType": "Unknown",
      "customCoverage": {
        "beginCoverage": "2003-01-01",
        "endCoverage": "2003-12-01"
      },
      "isSelected": true,
      "visibilityData": {
        "isHidden": true
      },
      "packageToken": {
        "value": "hellotoken"
      },
      "proxy": {
        "id": "EZProxy"
      }
    }
  }
}

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Package object schema",
  "description": "Package object schema",
  "javaType": "org.folio.rest.jaxrs.model.Package",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "The Data Schema",
      "$ref": "packageCollectionItem.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "jsonapi"
  ]
}

Example:

{
  "data": {
    "id": "123355-2880981",
    "type": "packages",
    "attributes": {
      "contentType": "E-Book",
      "customCoverage": {
        "beginCoverage": "2003-01-01",
        "endCoverage": "2004-01-01"
      },
      "isCustom": true,
      "isSelected": true,
      "name": "yet another custom package again",
      "packageId": 2880981,
      "packageType": "Custom",
      "providerId": 123355,
      "providerName": "API DEV CORPORATE CUSTOMER",
      "selectedCount": 0,
      "titleCount": 0,
      "vendorId": 123355,
      "vendorName": "API DEV CORPORATE CUSTOMER",
      "visibilityData": {
        "isHidden": true,
        "reason": ""
      },
      "allowKbToAddTitles": true
    },
    "relationships": {
      "resources": {
        "meta": {
          "included": false
        }
      },
      "provider": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [{
    "title": {
      "errors": [{
        "code": 1005,
        "subCode": 0,
        "message": "Attribute IsSelected is missing."
      }]
    }
  }],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 404

Not Found

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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [{
    "title": {
      "errors": [{
        "code": 1001,
        "subCode": 0,
        "message": "Vendor not found"
      }]
    }
  }],
  "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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [{
      "title": "Invalid beginCoverage",
      "detail": "Begincoverage must be blank",
      "source": {}
    },
    {
      "title": "Invalid endCoverage",
      "detail": "Endcoverage must be blank",
      "source": {}
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

DELETE /eholdings/packages/{packageId}

Delete a specific custom package using packageId. Note that packageId is providerId-packageId

DELETE /eholdings/packages/{packageId}
URI Parameters
  • packageId: required (string)

    identifier of the package formed from Provider Id and Package Id (see example)

    Example:

    583-4345

Response 204

No Content

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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Invalid package",
      "detail": "Package cannot be deleted",
      "source": {}
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

GET /eholdings/packages/{packageId}/resources

Include all resources belonging to a specific package

GET /eholdings/packages/{packageId}/resources
URI Parameters
  • packageId: required (string)

    identifier of the package formed from Provider Id and Package Id (see example)

    Example:

    583-4345
Query Parameters
  • sort: (string - default: relevance)

    Option by which results are sorted. Defaults to relevance if query or name if no query. Possible values are name, relevance.

    Example:

    name
  • filter[selected]: (string)

    Filter to narrow down results based on selection status. Defaults to all. Possible values are all, true, false, ebsco.

    Example:

    ebsco
  • filter[type]: (string)

    Filter to narrow down results based on content type. Possible values are all, audiobook, book, bookseries, database, journal, newsletter, newspaper, proceedings, report, streamingaudio, streamingvideo,thesisdissertation, website, unspecified.

  • filter[name]: (string)

    String to search title name to get a collection of titles

    Example:

    War and Peace
  • filter[isxn]: (string)

    String to search ISSN and ISBN to get a collection of titles

    Example:

    1050-3331
  • filter[subject]: (string)

    String to search subjects to get a collection of titles

    Example:

    history
  • filter[publisher]: (string)

    String to search publishers to get a collection of titles

    Example:

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

    Page offset to retrieve results from Ebsco KB

    Example:

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

    Count of number of results to retrieve from Ebsco KB

    Example:

    100

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Resource Collection Schema",
  "description": "Resource Collection Schema",
  "javaType": "org.folio.rest.jaxrs.model.ResourceCollection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of resources",
      "items": {
        "type": "object",
        "$ref": "resourceCollectionItem.json"
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in resources collection",
      "$ref": "../metaTotalResults.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "jsonapi"
  ]
}

Example:

{
  "data": [{
      "id": "19-6581-581242",
      "type": "resources",
      "attributes": {
        "description": null,
        "edition": null,
        "isPeerReviewed": null,
        "isTitleCustom": false,
        "publisherName": "Wroclaw University of Environmental & Life Sciences",
        "titleId": 581242,
        "contributors": [],
        "identifiers": [{
            "id": "1644-065X",
            "type": "ISSN",
            "subtype": "Print"
          },
          {
            "id": "2083-8654",
            "type": "ISSN",
            "subtype": "Online"
          },
          {
            "id": "97C7",
            "type": "Mid",
            "subtype": "Empty"
          },
          {
            "id": "581242",
            "type": "BHM",
            "subtype": "Empty"
          }
        ],
        "name": "Acta Scientiarum Polonorum. Biotechnologia",
        "publicationType": "Journal",
        "subjects": [{
          "type": "TLI",
          "subject": "Biological Engineering"
        }],
        "coverageStatement": null,
        "customEmbargoPeriod": {
          "embargoUnit": null,
          "embargoValue": 0
        },
        "isPackageCustom": false,
        "isSelected": false,
        "isTokenNeeded": false,
        "locationId": 4829613,
        "managedEmbargoPeriod": {
          "embargoUnit": null,
          "embargoValue": 0
        },
        "packageId": "19-6581",
        "packageName": "EBSCO Biotechnology Collection: India",
        "url": "http://search.ebscohost.com/direct.asp?db=bti&jid=97C7&scope=site",
        "vendorId": 19,
        "vendorName": "EBSCO",
        "providerId": 19,
        "providerName": "EBSCO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        },
        "managedCoverages": [{
          "beginCoverage": "2008-12-01",
          "endCoverage": ""
        }],
        "customCoverages": [],
        "proxy": null
      },
      "relationships": {
        "provider": {
          "meta": {
            "included": false
          }
        },
        "title": {
          "meta": {
            "included": false
          }
        },
        "package": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "19-6581-2467485",
      "type": "resources",
      "attributes": {
        "description": null,
        "edition": null,
        "isPeerReviewed": null,
        "isTitleCustom": false,
        "publisherName": "AVS: Science & Technology of Materials, Interfaces, and Processing",
        "titleId": 2467485,
        "contributors": [],
        "identifiers": [{
            "id": "1934-8630",
            "type": "ISSN",
            "subtype": "Print"
          },
          {
            "id": "1559-4106",
            "type": "ISSN",
            "subtype": "Online"
          },
          {
            "id": "102667066",
            "type": "SPID",
            "subtype": "Empty"
          },
          {
            "id": "122153798",
            "type": "SPID",
            "subtype": "Empty"
          },
          {
            "id": "714936",
            "type": "EjsJournalID",
            "subtype": "Empty"
          },
          {
            "id": "2F7L",
            "type": "Mid",
            "subtype": "Empty"
          },
          {
            "id": "2248363",
            "type": "BHM",
            "subtype": "Empty"
          }
        ],
        "name": "Biointerphases",
        "publicationType": "Journal",
        "subjects": [{
          "type": "TLI",
          "subject": "Physics"
        }],
        "coverageStatement": null,
        "customEmbargoPeriod": {
          "embargoUnit": null,
          "embargoValue": 0
        },
        "isPackageCustom": false,
        "isSelected": false,
        "isTokenNeeded": false,
        "locationId": 4829582,
        "managedEmbargoPeriod": {
          "embargoUnit": null,
          "embargoValue": 0
        },
        "packageId": "19-6581",
        "packageName": "EBSCO Biotechnology Collection: India",
        "url": "http://search.ebscohost.com/direct.asp?db=bti&jid=2F7L&scope=site",
        "vendorId": 19,
        "vendorName": "EBSCO",
        "providerId": 19,
        "providerName": "EBSCO",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        },
        "managedCoverages": [{
          "beginCoverage": "2006-12-01",
          "endCoverage": ""
        }],
        "customCoverages": [],
        "proxy": null
      },
      "relationships": {
        "vendor": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        },
        "title": {
          "meta": {
            "included": false
          }
        },
        "package": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "meta": {
    "totalResults": 157
  },
  "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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Package or provider id are invalid"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 404

Not Found

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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [
    {
      "title": "Package not found"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}