This documents the API calls that can be made to query and manage material types of the system
This documents the API calls that can be made to query and manage material types of the system
Collection of material-type items.
Return a list of material types
Used to send a valid JWT token.
Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
2147483647
Skip over a number of elements by specifying an offset value for the query
10
Maximum:
2147483647
Limit the number of elements returned in the response
Example:10
A query expressed as a CQL string (see dev.folio.org/doc/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields
Example:(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
name=aaa
en
Pattern:
[a-zA-Z]{2}
Requested language. Optional. [lang=en]
Returns a list of material-type items
{
"mtypes": [
{
"name": "book"
},
{
"name": "dvd"
}
],
"totalRecords": 2
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
unable to list material-types -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
unable to list material-types -- unauthorized
Access denied, not valid privilege in resources
Unauthorized
Internal server error, e.g. due to misconfiguration
internal server error, contact administrator
Create a new material type
Used to send a valid JWT token.
Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
en
Pattern:
[a-zA-Z]{2}
Requested language. Optional. [lang=en]
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"metadata": {
"type": "object",
"$ref": "raml-util/schemas/metadata.schema",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"name"
]
}
{
"name": "book"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created material-type item
{
"name": "book"
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
"unable to add material-type -- malformed JSON at 13:3"
Not authorized to perform requested action
unable to create material-types -- unauthorized
Access denied, not valid privilege in resources
Unauthorized
Validation errors
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Internal server error, contact administrator
Delete all material types
All material types deleted
Internal server error, e.g. due to misconfiguration
Internal server error, contact administrator
Pass in the MT code
Retrieve material-type item with given {material-typeId}
Used to send a valid JWT token.
Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
en
Pattern:
[a-zA-Z]{2}
Requested language. Optional. [lang=en]
Returns item with a given ID
{
"name": "book"
}
No valid token found
Unauthorized
Access denied, not valid privilege in resources
Unauthorized
Item with a given ID not found
"material-type not found"
Internal server error, e.g. due to misconfiguration
internal server error, contact administrator
Delete material-type item with given {material-typeId}
Used to send a valid JWT token.
Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
en
Pattern:
[a-zA-Z]{2}
Requested language. Optional. [lang=en]
Item deleted successfully
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
"unable to delete material-type -- constraint violation"
No valid token found
Unauthorized
Access denied, not valid privilege in resources
Unauthorized
Item with a given ID not found
"material-type not found"
Internal server error, e.g. due to misconfiguration
Internal server error, contact administrator
Update material-type item with given {material-typeId}
Used to send a valid JWT token.
Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
en
Pattern:
[a-zA-Z]{2}
Requested language. Optional. [lang=en]
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"metadata": {
"type": "object",
"$ref": "raml-util/schemas/metadata.schema",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"name"
]
}
{
"name": "book"
}
Item successfully updated
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
"unable to update material-type -- malformed JSON at 13:4"
No valid token found
Unauthorized
Access denied, not valid privilege in resources
Unauthorized
Item with a given ID not found
"material-type not found"
Internal server error, e.g. due to misconfiguration
internal server error, contact administrator