foliolib.folio.api.eventConfig.EventConfig

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

Bases: foliolib.folio.FolioApi

Event config

CRUD APIs for event configuration.

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_eventConfig(eventConfigId)

Delete eventConfig item with given {eventConfigId}

get_eventConfig(eventConfigId)

Retrieve eventConfig item with given {eventConfigId}

get_eventConfigs(**kwargs)

Get list of funds

modify_eventConfig(eventConfigId, eventConfig)

Update eventConfig item with given {eventConfigId}

set_eventConfig(eventConfig)

Create a new eventConfig item.

delete_eventConfig(eventConfigId: str)

Delete eventConfig item with given {eventConfigId}

DELETE /eventConfig/{eventConfigId}

Parameters

eventConfigId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_eventConfig(eventConfigId: str)

Retrieve eventConfig item with given {eventConfigId}

GET /eventConfig/{eventConfigId}

Parameters

eventConfigId (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": "Event entity",
  "type": "object",
  "properties": {
    "id": {
      "description": "unique identifier of event",
      "type": "string"
    },
    "name": {
      "description": "unique configuration name for module configuration: RESET_PASSWORD, CREATE_PASSWORD and etc.",
      "type": "string"
    },
    "active": {
      "description": "configuration availability",
      "type": "boolean"
    },
    "templates": {
      "description": "templates list",
      "id": "templateData",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "event_template.json"
      }
    },
    "metadata": {
      "description": "metadata",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "active"
  ]
}
get_eventConfigs(**kwargs)

Get list of funds

GET /eventConfig

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.

    searchable using CQL

    Example

    • (username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode

    • name==RESET_PASSWORD_EVENT

  • 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": "Event List",
  "type": "object",
  "properties": {
    "eventEntity": {
      "description": "event entries",
      "id": "eventEntriesData",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "event_config_entity.json"
      }
    },
    "totalRecords": {
      "description": "total records",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "eventEntity",
    "totalRecords"
  ]
}
modify_eventConfig(eventConfigId: str, eventConfig: dict)

Update eventConfig item with given {eventConfigId}

PUT /eventConfig/{eventConfigId}

Parameters
  • eventConfigId (str) –

  • eventConfig (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Event entity",
  "type": "object",
  "properties": {
    "id": {
      "description": "unique identifier of event",
      "type": "string"
    },
    "name": {
      "description": "unique configuration name for module configuration: RESET_PASSWORD, CREATE_PASSWORD and etc.",
      "type": "string"
    },
    "active": {
      "description": "configuration availability",
      "type": "boolean"
    },
    "templates": {
      "description": "templates list",
      "id": "templateData",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "event_template.json"
      }
    },
    "metadata": {
      "description": "metadata",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "active"
  ]
}
set_eventConfig(eventConfig: dict)

Create a new eventConfig item.

POST /eventConfig

Parameters

eventConfig (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

Headers

  • Location - URI to the created eventConfig item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Event entity",
  "type": "object",
  "properties": {
    "id": {
      "description": "unique identifier of event",
      "type": "string"
    },
    "name": {
      "description": "unique configuration name for module configuration: RESET_PASSWORD, CREATE_PASSWORD and etc.",
      "type": "string"
    },
    "active": {
      "description": "configuration availability",
      "type": "boolean"
    },
    "templates": {
      "description": "templates list",
      "id": "templateData",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "event_template.json"
      }
    },
    "metadata": {
      "description": "metadata",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "active"
  ]
}