foliolib.folio.api.oaiPmh.RequestMetadata

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

Bases: foliolib.folio.FolioApi

Request Metadata API

API for retrieving MARC21_WITHHOLDINGS harvesting request metadata.

Parameters
  • tenant (str) – Tenant id

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

Methods

get_failedInstances(requestId, **kwargs)

Get list of failed instances UUIDs

get_failedToSaveInstances(requestId, **kwargs)

Get list of failed to save instances UUIDs

get_requestMetadata(**kwargs)

Get list of request metadata

get_skippedInstances(requestId, **kwargs)

Get list of skipped instances UUIDs

get_suppressedFromDiscoveryInstances(...)

Get list of suppressed from discovery instances UUIDs

get_failedInstances(requestId: str, **kwargs)

Get list of failed instances UUIDs

GET /oai/request-metadata/{requestId}/failed-instances

Parameters
  • requestId (str) –

  • **kwargs (properties) – Keyword Arguments

Keyword Arguments
  • 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

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "UUID collection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "uuidCollection": {
      "description": "list of UUIDs",
      "type": "array",
      "id": "uuidCollection",
      "items": {
        "type": "object",
        "$ref": "../common/uuid.json"
      }
    },
    "totalRecords": {
      "type": "integer",
      "description": "Total number of records"
    }
  },
  "required": [
    "uuidCollection",
    "totalRecords"
  ]
}
get_failedToSaveInstances(requestId: str, **kwargs)

Get list of failed to save instances UUIDs

GET /oai/request-metadata/{requestId}/failed-to-save-instances

Parameters
  • requestId (str) –

  • **kwargs (properties) – Keyword Arguments

Keyword Arguments
  • 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

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "UUID collection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "uuidCollection": {
      "description": "list of UUIDs",
      "type": "array",
      "id": "uuidCollection",
      "items": {
        "type": "object",
        "$ref": "../common/uuid.json"
      }
    },
    "totalRecords": {
      "type": "integer",
      "description": "Total number of records"
    }
  },
  "required": [
    "uuidCollection",
    "totalRecords"
  ]
}
get_requestMetadata(**kwargs)

Get list of request metadata

GET /oai/request-metadata

Parameters

**kwargs (properties) – Keyword Arguments

Keyword Arguments
  • 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

  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Request metadata collection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "requestMetadataCollection": {
      "description": "list of request metadata",
      "type": "array",
      "id": "requestMetadataCollection",
      "items": {
        "javaType": "org.folio.rest.jaxrs.model.RequestMetadata",
        "type": "object",
        "$ref": "requestMetadata.json"
      }
    },
    "totalRecords": {
      "type": "integer",
      "description": "Total number of records"
    }
  },
  "required": [
    "requestMetadataCollection",
    "totalRecords"
  ]
}
get_skippedInstances(requestId: str, **kwargs)

Get list of skipped instances UUIDs

GET /oai/request-metadata/{requestId}/skipped-instances

Parameters
  • requestId (str) –

  • **kwargs (properties) – Keyword Arguments

Keyword Arguments
  • 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

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "UUID collection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "uuidCollection": {
      "description": "list of UUIDs",
      "type": "array",
      "id": "uuidCollection",
      "items": {
        "type": "object",
        "$ref": "../common/uuid.json"
      }
    },
    "totalRecords": {
      "type": "integer",
      "description": "Total number of records"
    }
  },
  "required": [
    "uuidCollection",
    "totalRecords"
  ]
}
get_suppressedFromDiscoveryInstances(requestId: str, **kwargs)

Get list of suppressed from discovery instances UUIDs

GET /oai/request-metadata/{requestId}/suppressed-from-discovery-instances

Parameters
  • requestId (str) –

  • **kwargs (properties) – Keyword Arguments

Keyword Arguments
  • 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

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "UUID collection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "uuidCollection": {
      "description": "list of UUIDs",
      "type": "array",
      "id": "uuidCollection",
      "items": {
        "type": "object",
        "$ref": "../common/uuid.json"
      }
    },
    "totalRecords": {
      "type": "integer",
      "description": "Total number of records"
    }
  },
  "required": [
    "uuidCollection",
    "totalRecords"
  ]
}