foliolib.folio.api.inventoryStorage.ServicePointsUser

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

Bases: foliolib.folio.FolioApi

Service Points Users API

This documents the API calls that can be made to query and manage service points users in the system

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_servicePointsUser(servicePointsUserId)

Delete servicePointsUser item with given {servicePointsUserId}

delete_servicePointsUsers()

DELETE /service-points-users

get_servicePointsUser(servicePointsUserId)

Retrieve servicePointsUser item with given {servicePointsUserId}

get_servicePointsUsers(**kwargs)

Return a list of service points users

modify_servicePointsUser(...)

Update servicePointsUser item with given {servicePointsUserId}

set_servicePointsUser(servicePointsUser)

Create a new service points user

delete_servicePointsUser(servicePointsUserId: str)

Delete servicePointsUser item with given {servicePointsUserId}

DELETE /service-points-users/{servicePointsUserId}

Parameters

servicePointsUserId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

delete_servicePointsUsers()

DELETE /service-points-users

get_servicePointsUser(servicePointsUserId: str)

Retrieve servicePointsUser item with given {servicePointsUserId}

GET /service-points-users/{servicePointsUserId}

Parameters

servicePointsUserId (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": "The list of service points a user is allowed to work at, and the default service point for that user.",
  "type": "object",
  "properties": {
    "id": {
      "description": "The id of record as a UUID.",
      "type": "string"
    },
    "userId": {
      "description": "Id of the user as a UUID.",
      "type": "string"
    },
    "servicePointsIds": {
      "description": "The list of service points a user is allowed to work at.",
      "type": "array",
      "items": {
        "description": "The id of a service point as UUID.",
        "type": "string",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
      }
    },
    "defaultServicePointId": {
      "description": "The id of the user's default service point as UUID.",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "userId"
  ]
}
get_servicePointsUsers(**kwargs)

Return a list of service points users

GET /service-points-users

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 service points users",
  "type": "object",
  "properties": {
    "servicePointsUsers": {
      "description": "List of service points users",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "servicepointsuser.json"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "servicePointsUsers",
    "totalRecords"
  ]
}
modify_servicePointsUser(servicePointsUserId: str, servicePointsUser: dict)

Update servicePointsUser item with given {servicePointsUserId}

PUT /service-points-users/{servicePointsUserId}

Parameters
  • servicePointsUserId (str) –

  • servicePointsUser (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": "The list of service points a user is allowed to work at, and the default service point for that user.",
  "type": "object",
  "properties": {
    "id": {
      "description": "The id of record as a UUID.",
      "type": "string"
    },
    "userId": {
      "description": "Id of the user as a UUID.",
      "type": "string"
    },
    "servicePointsIds": {
      "description": "The list of service points a user is allowed to work at.",
      "type": "array",
      "items": {
        "description": "The id of a service point as UUID.",
        "type": "string",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
      }
    },
    "defaultServicePointId": {
      "description": "The id of the user's default service point as UUID.",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "userId"
  ]
}
set_servicePointsUser(servicePointsUser: dict)

Create a new service points user

POST /service-points-users

Parameters

servicePointsUser (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created servicePointsUser item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "The list of service points a user is allowed to work at, and the default service point for that user.",
  "type": "object",
  "properties": {
    "id": {
      "description": "The id of record as a UUID.",
      "type": "string"
    },
    "userId": {
      "description": "Id of the user as a UUID.",
      "type": "string"
    },
    "servicePointsIds": {
      "description": "The list of service points a user is allowed to work at.",
      "type": "array",
      "items": {
        "description": "The id of a service point as UUID.",
        "type": "string",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
      }
    },
    "defaultServicePointId": {
      "description": "The id of the user's default service point as UUID.",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "userId"
  ]
}