foliolib.folio.api.dataExport.DataExportMappingProfiles

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

Bases: foliolib.folio.FolioApi

Data export Mapping Profile API

APIs for managing Mapping Profiles

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_mappingProfile(mappingProfilesId)

Delete mappingProfile item with given {mappingProfileId}

get_mappingProfile(mappingProfilesId)

Retrieve mappingProfile item with given {mappingProfileId}

get_mappingProfiles(**kwargs)

Retrieve a list of mappingProfile items.

modify_mappingProfile(mappingProfilesId, ...)

Update mappingProfile item with given {mappingProfileId}

set_mappingProfile(mappingProfile)

Create a new mappingProfile item.

delete_mappingProfile(mappingProfilesId: str)

Delete mappingProfile item with given {mappingProfileId}

DELETE /data-export/mapping-profiles/{mappingProfilesId}

Parameters

mappingProfilesId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_mappingProfile(mappingProfilesId: str)

Retrieve mappingProfile item with given {mappingProfileId}

GET /data-export/mapping-profiles/{mappingProfilesId}

Parameters

mappingProfilesId (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": "Mapping Profile schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "Unique identifier",
      "$ref": "../../raml-util/schemas/uuid.schema"
    },
    "name": {
      "description": "Mapping Profile name",
      "type": "string"
    },
    "default": {
      "description": "Is default mapping profile",
      "type": "boolean",
      "default": false,
      "readonly": true
    },
    "description": {
      "description": "Mapping Profile description",
      "type": "string"
    },
    "recordTypes": {
      "description": "Mapping Profile records type",
      "type": "array",
      "items": {
        "type": "string",
        "$ref": "recordTypes.json"
      }
    },
    "transformations": {
      "description": "List of mapping profile transformations",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "transformations.json"
      }
    },
    "userInfo": {
      "description": "First name, last name and username of the user, who updated the Mapping Profile",
      "type": "object",
      "$ref": "userInfo.json"
    },
    "outputFormat": {
      "description": "Mapping Profile output format",
      "type": "string",
      "enum": [
        "MARC"
      ]
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name",
    "recordTypes"
  ]
}
get_mappingProfiles(**kwargs)

Retrieve a list of mappingProfile items.

GET /data-export/mapping-profiles

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

  • 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

    • status=SUCCESS

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of Mapping Profiles",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mappingProfiles": {
      "description": "List of Mapping Profiles",
      "type": "array",
      "id": "mappingProfileList",
      "items": {
        "type": "object",
        "$ref": "mappingProfile.json"
      }
    },
    "totalRecords": {
      "description": "Total number of Mapping Profiles",
      "type": "integer"
    }
  },
  "required": [
    "mappingProfiles",
    "totalRecords"
  ]
}
modify_mappingProfile(mappingProfilesId: str, mappingProfile: dict)

Update mappingProfile item with given {mappingProfileId}

PUT /data-export/mapping-profiles/{mappingProfilesId}

Parameters
  • mappingProfilesId (str) –

  • mappingProfile (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Mapping Profile schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "Unique identifier",
      "$ref": "../../raml-util/schemas/uuid.schema"
    },
    "name": {
      "description": "Mapping Profile name",
      "type": "string"
    },
    "default": {
      "description": "Is default mapping profile",
      "type": "boolean",
      "default": false,
      "readonly": true
    },
    "description": {
      "description": "Mapping Profile description",
      "type": "string"
    },
    "recordTypes": {
      "description": "Mapping Profile records type",
      "type": "array",
      "items": {
        "type": "string",
        "$ref": "recordTypes.json"
      }
    },
    "transformations": {
      "description": "List of mapping profile transformations",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "transformations.json"
      }
    },
    "userInfo": {
      "description": "First name, last name and username of the user, who updated the Mapping Profile",
      "type": "object",
      "$ref": "userInfo.json"
    },
    "outputFormat": {
      "description": "Mapping Profile output format",
      "type": "string",
      "enum": [
        "MARC"
      ]
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name",
    "recordTypes"
  ]
}
set_mappingProfile(mappingProfile: dict)

Create a new mappingProfile item.

POST /data-export/mapping-profiles

Parameters

mappingProfile (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created mappingProfile item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Mapping Profile schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "Unique identifier",
      "$ref": "../../raml-util/schemas/uuid.schema"
    },
    "name": {
      "description": "Mapping Profile name",
      "type": "string"
    },
    "default": {
      "description": "Is default mapping profile",
      "type": "boolean",
      "default": false,
      "readonly": true
    },
    "description": {
      "description": "Mapping Profile description",
      "type": "string"
    },
    "recordTypes": {
      "description": "Mapping Profile records type",
      "type": "array",
      "items": {
        "type": "string",
        "$ref": "recordTypes.json"
      }
    },
    "transformations": {
      "description": "List of mapping profile transformations",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "transformations.json"
      }
    },
    "userInfo": {
      "description": "First name, last name and username of the user, who updated the Mapping Profile",
      "type": "object",
      "$ref": "userInfo.json"
    },
    "outputFormat": {
      "description": "Mapping Profile output format",
      "type": "string",
      "enum": [
        "MARC"
      ]
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name",
    "recordTypes"
  ]
}