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.

Proxy Types

List of supported proxy types for a given customer.

GET /eholdings/proxy-types

Get a list of supported proxy types.

GET /eholdings/proxy-types

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Proxy Types Schema",
  "description": "Proxy Types Schema",
  "javaType": "org.folio.rest.jaxrs.model.ProxyTypes",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of proxy types for a given customer",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Proxy Type Data schema in ProxyTypes collection",
        "description": "Proxy Type Data schema in ProxyTypes collection",
        "javaType": "org.folio.rest.jaxrs.model.ProxyTypesData",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of proxy",
            "example": "EZProxy"
          },
          "type": {
            "type": "string",
            "description": "Type of proxy",
            "enum": [
              "proxyTypes"
            ],
            "example": "proxyTypes"
          },
          "credentialsId": {
            "type": "string",
            "description": "The UUID of credentials",
            "examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "uuid.schema",
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
          },
          "attributes": {
            "type": "object",
            "description": "Proxy Type object data attributes",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "title": "Proxy Types Data Attributes Schema",
            "javaType": "org.folio.rest.jaxrs.model.ProxyTypesDataAttributes",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "description": "Proxy Type ID",
                "example": "EZProxy"
              },
              "name": {
                "type": "string",
                "description": "Proxy Type Name",
                "example": "EZProxy"
              },
              "urlMask": {
                "type": "string",
                "description": "Proxy Type URL Mask",
                "example": "http://ezproxy.myinstitute.edu/login?url={targetURL}"
              }
            }
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in packages collection",
      "$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"
  ]
}

Example:

{
  "data": [
    {
      "id": "<n>",
      "type": "proxyTypes",
      "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
      "attributes": {
        "id": "<n>",
        "name": "None",
        "urlMask": ""
      }
    },
    {
      "id": "EZProxy",
      "type": "proxyTypes",
      "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
      "attributes": {
        "id": "EZProxy",
        "name": "EZProxy",
        "urlMask": "http://ezproxy.myinstitute.edu/login?url={targetURL}"
      }
    },
    {
      "id": "TestingFolio",
      "type": "proxyTypes",
      "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
      "attributes": {
        "id": "TestingFolio",
        "name": "TestingFolio",
        "urlMask": "https://folio.frontside.io"
      }
    }
  ],
  "meta": {
    "totalResults": 3
  },
  "jsonapi": {
    "version": "1.0"
  }
}

Proxy Types

List of supported proxy types.

GET /eholdings/kb-credentials/{id}/proxy-types

Get a list of supported proxy types for KB Credentials.

GET /eholdings/kb-credentials/{id}/proxy-types
URI Parameters
  • id: required (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Proxy Types Schema",
  "description": "Proxy Types Schema",
  "javaType": "org.folio.rest.jaxrs.model.ProxyTypes",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of proxy types for a given customer",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Proxy Type Data schema in ProxyTypes collection",
        "description": "Proxy Type Data schema in ProxyTypes collection",
        "javaType": "org.folio.rest.jaxrs.model.ProxyTypesData",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of proxy",
            "example": "EZProxy"
          },
          "type": {
            "type": "string",
            "description": "Type of proxy",
            "enum": [
              "proxyTypes"
            ],
            "example": "proxyTypes"
          },
          "credentialsId": {
            "type": "string",
            "description": "The UUID of credentials",
            "examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "uuid.schema",
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
          },
          "attributes": {
            "type": "object",
            "description": "Proxy Type object data attributes",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "title": "Proxy Types Data Attributes Schema",
            "javaType": "org.folio.rest.jaxrs.model.ProxyTypesDataAttributes",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "description": "Proxy Type ID",
                "example": "EZProxy"
              },
              "name": {
                "type": "string",
                "description": "Proxy Type Name",
                "example": "EZProxy"
              },
              "urlMask": {
                "type": "string",
                "description": "Proxy Type URL Mask",
                "example": "http://ezproxy.myinstitute.edu/login?url={targetURL}"
              }
            }
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in packages collection",
      "$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"
  ]
}

Example:

{
  "data": [
    {
      "id": "<n>",
      "type": "proxyTypes",
      "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
      "attributes": {
        "id": "<n>",
        "name": "None",
        "urlMask": ""
      }
    },
    {
      "id": "EZProxy",
      "type": "proxyTypes",
      "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
      "attributes": {
        "id": "EZProxy",
        "name": "EZProxy",
        "urlMask": "http://ezproxy.myinstitute.edu/login?url={targetURL}"
      }
    },
    {
      "id": "TestingFolio",
      "type": "proxyTypes",
      "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
      "attributes": {
        "id": "TestingFolio",
        "name": "TestingFolio",
        "urlMask": "https://folio.frontside.io"
      }
    }
  ],
  "meta": {
    "totalResults": 3
  },
  "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",
        "$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": "KB credentials with id '99999999-9999-9999-9999-999999999999' not found"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Root Proxy

Root Proxy that is currently selected from proxy-type list.

GET /eholdings/root-proxy

Get the ID of root proxy that is currently selected from proxy-type list.

GET /eholdings/root-proxy

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Root Proxy Schema",
  "description": "Root Proxy Schema",
  "javaType": "org.folio.rest.jaxrs.model.RootProxy",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Details of root proxy set for a given customer",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Root Proxy Data schema",
      "javaType": "org.folio.rest.jaxrs.model.RootProxyData",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of root proxy",
          "enum": [
            "root-proxy"
          ],
          "example": "root-proxy"
        },
        "type": {
          "type": "string",
          "description": "Type of root proxy",
          "enum": [
            "rootProxies"
          ],
          "example": "rootProxies"
        },
        "credentialsId": {
          "type": "string",
          "description": "The UUID of credentials",
          "examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "id": "uuid.schema",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
        },
        "attributes": {
          "type": "object",
          "description": "Root Proxy object data attributes",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Root Proxy Data Attributes Schema",
          "javaType": "org.folio.rest.jaxrs.model.RootProxyDataAttributes",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "description": "Root Proxy ID",
              "enum": [
                "root-proxy"
              ],
              "example": "root-proxy"
            },
            "proxyTypeId": {
              "type": "string",
              "description": "Proxy Type Id",
              "example": "EZProxy"
            }
          },
          "required": [
            "id",
            "proxyTypeId"
          ]
        }
      }
    },
    "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"
  ]
}

Example:

{
  "data": {
    "id": "root-proxy",
    "type": "rootProxies",
    "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
    "attributes": {
      "id": "root-proxy",
      "proxyTypeId": "<n>"
    }
  },
  "jsonapi": {
    "version": "1.0"
  }
}

Root Proxy

Root Proxy that is currently selected from proxy-type list for KB Credentials.

GET /eholdings/kb-credentials/{id}/root-proxy

Get the ID of root proxy that is currently selected from proxy-type list.

GET /eholdings/kb-credentials/{id}/root-proxy
URI Parameters
  • id: required (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Root Proxy Schema",
  "description": "Root Proxy Schema",
  "javaType": "org.folio.rest.jaxrs.model.RootProxy",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Details of root proxy set for a given customer",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Root Proxy Data schema",
      "javaType": "org.folio.rest.jaxrs.model.RootProxyData",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of root proxy",
          "enum": [
            "root-proxy"
          ],
          "example": "root-proxy"
        },
        "type": {
          "type": "string",
          "description": "Type of root proxy",
          "enum": [
            "rootProxies"
          ],
          "example": "rootProxies"
        },
        "credentialsId": {
          "type": "string",
          "description": "The UUID of credentials",
          "examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "id": "uuid.schema",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
        },
        "attributes": {
          "type": "object",
          "description": "Root Proxy object data attributes",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Root Proxy Data Attributes Schema",
          "javaType": "org.folio.rest.jaxrs.model.RootProxyDataAttributes",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "description": "Root Proxy ID",
              "enum": [
                "root-proxy"
              ],
              "example": "root-proxy"
            },
            "proxyTypeId": {
              "type": "string",
              "description": "Proxy Type Id",
              "example": "EZProxy"
            }
          },
          "required": [
            "id",
            "proxyTypeId"
          ]
        }
      }
    },
    "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"
  ]
}

Example:

{
  "data": {
    "id": "root-proxy",
    "type": "rootProxies",
    "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
    "attributes": {
      "id": "root-proxy",
      "proxyTypeId": "<n>"
    }
  },
  "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",
        "$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": "KB credentials with id '99999999-9999-9999-9999-999999999999' not found"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

PUT /eholdings/kb-credentials/{id}/root-proxy

Update root-proxy for a Kb Credentials.

PUT /eholdings/kb-credentials/{id}/root-proxy
URI Parameters
  • id: required (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
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": "Root Proxy Put Request Schema",
  "description": "Root Proxy Put Request Schema using JSON API",
  "javaType": "org.folio.rest.jaxrs.model.RootProxyPutRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Data object of root proxy put request",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Root Proxy Put Data Schema",
      "javaType": "org.folio.rest.jaxrs.model.RootProxyPutData",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "Root Proxy Id",
          "enum": [
            "root-proxy"
          ],
          "example": "root-proxy"
        },
        "type": {
          "type": "string",
          "description": "Root Proxy Type",
          "enum": [
            "rootProxies"
          ],
          "example": "rootProxies"
        },
        "attributes": {
          "type": "object",
          "description": "Root Proxy Data Attributes",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Root Proxy Data Attributes Schema",
          "javaType": "org.folio.rest.jaxrs.model.RootProxyDataAttributes",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "description": "Root Proxy ID",
              "enum": [
                "root-proxy"
              ],
              "example": "root-proxy"
            },
            "proxyTypeId": {
              "type": "string",
              "description": "Proxy Type Id",
              "example": "EZProxy"
            }
          },
          "required": [
            "id",
            "proxyTypeId"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "attributes"
      ]
    }
  },
  "required": [
    "data"
  ]
}

Example:

{
  "data": {
    "id": "root-proxy",
    "type": "rootProxies",
    "attributes": {
      "id": "root-proxy",
      "proxyTypeId": "EZProxy"
    }
  }
}

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Root Proxy Schema",
  "description": "Root Proxy Schema",
  "javaType": "org.folio.rest.jaxrs.model.RootProxy",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Details of root proxy set for a given customer",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Root Proxy Data schema",
      "javaType": "org.folio.rest.jaxrs.model.RootProxyData",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of root proxy",
          "enum": [
            "root-proxy"
          ],
          "example": "root-proxy"
        },
        "type": {
          "type": "string",
          "description": "Type of root proxy",
          "enum": [
            "rootProxies"
          ],
          "example": "rootProxies"
        },
        "credentialsId": {
          "type": "string",
          "description": "The UUID of credentials",
          "examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "id": "uuid.schema",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
        },
        "attributes": {
          "type": "object",
          "description": "Root Proxy object data attributes",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "title": "Root Proxy Data Attributes Schema",
          "javaType": "org.folio.rest.jaxrs.model.RootProxyDataAttributes",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "description": "Root Proxy ID",
              "enum": [
                "root-proxy"
              ],
              "example": "root-proxy"
            },
            "proxyTypeId": {
              "type": "string",
              "description": "Proxy Type Id",
              "example": "EZProxy"
            }
          },
          "required": [
            "id",
            "proxyTypeId"
          ]
        }
      }
    },
    "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"
  ]
}

Example:

{
  "data": {
    "id": "root-proxy",
    "type": "rootProxies",
    "credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
    "attributes": {
      "id": "root-proxy",
      "proxyTypeId": "EZProxy"
    }
  },
  "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 id",
      "detail": "Id :Invalid proxy",
      "source": {}
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}