foliolib.folio.api.inventoryStorage.ContributorNameType

class foliolib.folio.api.inventoryStorage.ContributorNameType(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)

Bases: foliolib.folio.FolioApi

Contributor Name Types API

This documents the API calls that can be made to query and manage contributor name types

Parameters
  • tenant (str) – Tenant id

  • okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.

Methods

delete_contributorNameType(contributorNameTypeId)

Delete contributorNameType item with given {contributorNameTypeId}

get_contributorNameType(contributorNameTypeId)

Retrieve contributorNameType item with given {contributorNameTypeId}

get_contributorNameTypes(**kwargs)

Return a list of contributor name types

modify_contributorNameType(...)

Update contributorNameType item with given {contributorNameTypeId}

set_contributorNameType(contributorNameType)

Create a new contributor name type

delete_contributorNameType(contributorNameTypeId: str)

Delete contributorNameType item with given {contributorNameTypeId}

DELETE /contributor-name-types/{contributorNameTypeId}

Parameters

contributorNameTypeId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_contributorNameType(contributorNameTypeId: str)

Retrieve contributorNameType item with given {contributorNameTypeId}

GET /contributor-name-types/{contributorNameTypeId}

Parameters

contributorNameTypeId (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 contributor name type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "label for the type of contributor name",
      "type": "string"
    },
    "ordering": {
      "description": "used for ordering of contributor name types in displays, i.e. in select lists",
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name"
  ]
}
get_contributorNameTypes(**kwargs)

Return a list of contributor name types

GET /contributor-name-types

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 contributor name types (controlled vocabulary)",
  "type": "object",
  "properties": {
    "contributorNameTypes": {
      "description": "List of contributor name types",
      "id": "contributorNameType",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "contributornametype.json"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "contributorNameTypes",
    "totalRecords"
  ]
}
modify_contributorNameType(contributorNameTypeId: str, contributorNameType: dict)

Update contributorNameType item with given {contributorNameTypeId}

PUT /contributor-name-types/{contributorNameTypeId}

Parameters
  • contributorNameTypeId (str) –

  • contributorNameType (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 contributor name type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "label for the type of contributor name",
      "type": "string"
    },
    "ordering": {
      "description": "used for ordering of contributor name types in displays, i.e. in select lists",
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name"
  ]
}
set_contributorNameType(contributorNameType: dict)

Create a new contributor name type

POST /contributor-name-types

Parameters

contributorNameType (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created contributorNameType item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A contributor name type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "label for the type of contributor name",
      "type": "string"
    },
    "ordering": {
      "description": "used for ordering of contributor name types in displays, i.e. in select lists",
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name"
  ]
}