foliolib.folio.api.inventoryStorage.NatureOfContentTerm
- class foliolib.folio.api.inventoryStorage.NatureOfContentTerm(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiNature of content term API
This documents the API calls that can be made to query and manage nature-of-content terms of the system
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
Delete natureOfContentTerm item with given {natureOfContentTermId}
get_natureOfContentTerm(natureOfContentTermsId)Retrieve natureOfContentTerm item with given {natureOfContentTermId}
get_natureOfContentTerms(**kwargs)Return a list of nature-of-content terms
Update natureOfContentTerm item with given {natureOfContentTermId}
set_natureOfContentTerm(natureOfContentTerm)Create a new nature-of-content term
- delete_natureOfContentTerm(natureOfContentTermsId: str)
Delete natureOfContentTerm item with given {natureOfContentTermId}
DELETE /nature-of-content-terms/{natureOfContentTermsId}- Parameters
natureOfContentTermsId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- get_natureOfContentTerm(natureOfContentTermsId: str)
Retrieve natureOfContentTerm item with given {natureOfContentTermId}
GET /nature-of-content-terms/{natureOfContentTermsId}- Parameters
natureOfContentTermsId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A term describing the nature of content for an instance", "type": "object", "properties": { "id": { "description": "unique ID of the nature-of-content term", "$ref": "uuid.json" }, "name": { "type": "string", "description": "term for the nature of content" }, "source": { "type": "string", "description": "label indicating where the term originates from, i.e. 'folio' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "name", "source" ] }
- get_natureOfContentTerms(**kwargs)
Return a list of nature-of-content terms
GET /nature-of-content-terms- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
query (str) –
A query expressed as a CQL string (see [dev.folio.org/reference/glossary#cql](https://dev.folio.org/reference/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
offset (int) –
(default=0) Skip over a number of elements by specifying an offset value for the query
Example
0
limit (int) –
(default=10) Limit the number of elements returned in the response
Example
10
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A collection of nature-of-content terms (controlled vocabulary)", "type": "object", "properties": { "natureOfContentTerms": { "description": "List of nature-of-content terms", "id": "natureOfContentTerm", "type": "array", "items": { "type": "object", "$ref": "natureofcontentterm.json" } }, "totalRecords": { "description": "Estimated or exact total number of records", "type": "integer" } }, "required": [ "natureOfContentTerms", "totalRecords" ] }
- modify_natureOfContentTerm(natureOfContentTermsId: str, natureOfContentTerm: dict)
Update natureOfContentTerm item with given {natureOfContentTermId}
PUT /nature-of-content-terms/{natureOfContentTermsId}- Parameters
natureOfContentTermsId (str) –
natureOfContentTerm (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestConflict – Conflict
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A term describing the nature of content for an instance", "type": "object", "properties": { "id": { "description": "unique ID of the nature-of-content term", "$ref": "uuid.json" }, "name": { "type": "string", "description": "term for the nature of content" }, "source": { "type": "string", "description": "label indicating where the term originates from, i.e. 'folio' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "name", "source" ] }
- set_natureOfContentTerm(natureOfContentTerm: dict)
Create a new nature-of-content term
POST /nature-of-content-terms- Parameters
natureOfContentTerm (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created natureOfContentTerm item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A term describing the nature of content for an instance", "type": "object", "properties": { "id": { "description": "unique ID of the nature-of-content term", "$ref": "uuid.json" }, "name": { "type": "string", "description": "term for the nature of content" }, "source": { "type": "string", "description": "label indicating where the term originates from, i.e. 'folio' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "name", "source" ] }