foliolib.folio.api.consortiaKeycloak.SharingInstances
- class foliolib.folio.api.consortiaKeycloak.SharingInstances(tenant: str)
Bases:
foliolib.folio.FolioApiSharing instance and setting integration API
Sharing instance and setting integration API
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
getsharinginstancebyid(consortiumId, actionId)GET /consortia/{consortiumId}/sharing/instances/{actionId}getsharinginstances(consortiumId, **kwargs)Sharing instances
startsharinginstance(consortiumId, ...)POST /consortia/{consortiumId}/sharing/instances- getsharinginstancebyid(consortiumId, actionId)
GET /consortia/{consortiumId}/sharing/instances/{actionId}- Parameters
consortiumId (str) –
actionId (str) –
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Resource not found
OkapiRequestFatalError – Internal server error
Schema
{ "description": "A JSON schema for the Sharing Instance", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "instanceIdentifier": { "type": "string", "format": "uuid" }, "sourceTenantId": { "type": "string" }, "targetTenantId": { "type": "string" }, "status": { "type": "string", "enum": [ "IN_PROGRESS", "COMPLETE", "ERROR" ] }, "error": { "type": "string" }, "metadata": { "type": "object", "title": "Metadata", "description": "Metadata about creation and changes to records", "properties": { "createdDate": { "type": "string", "description": "Date and time when the record was created" }, "createdByUserId": { "type": "string", "format": "uuid" }, "createdByUsername": { "type": "string", "description": "Username of the user who created the record (when available)" }, "createdBy": { "type": "object", "description": "User Display Information", "properties": { "lastName": { "type": "string", "readOnly": true, "description": "Last name of the user" }, "firstName": { "type": "string", "readOnly": true, "description": "First name of the user" }, "middleName": { "type": "string", "readOnly": true, "description": "Middle name or initial of the user" } }, "example": { "lastName": "Doe", "firstName": "John", "middleName": "X." } }, "updatedDate": { "type": "string", "description": "Date and time when the record was last updated" }, "updatedByUserId": { "type": "string", "format": "uuid" }, "updatedByUsername": { "type": "string", "description": "Username of the user who updated the record (when available)" }, "updatedBy": { "type": "object", "description": "User Display Information", "properties": { "lastName": { "type": "string", "readOnly": true, "description": "Last name of the user" }, "firstName": { "type": "string", "readOnly": true, "description": "First name of the user" }, "middleName": { "type": "string", "readOnly": true, "description": "Middle name or initial of the user" } }, "example": { "lastName": "Doe", "firstName": "John", "middleName": "X." } } }, "required": [ "createdDate" ] } }, "additionalProperties": false, "required": [ "instanceIdentifier", "sourceTenantId", "targetTenantId" ] }
- getsharinginstances(consortiumId, **kwargs)
Sharing instances
GET /consortia/{consortiumId}/sharing/instances- Parameters
consortiumId (str) –
- Keyword Arguments
instanceIdentifier (str) –
sourceTenantId (str) – The ID of the source tenant
targetTenantId (str) – The ID of the target tenant
status (str) –
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0, maximum: 2147483647)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Resource not found
OkapiRequestFatalError – Internal server error
Schema
{ "description": "A JSON schema for the Sharing Instances Collection", "type": "object", "properties": { "sharingInstances": { "type": "array", "description": "The list of sharing instances", "items": { "description": "A JSON schema for the Sharing Instance", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "instanceIdentifier": { "type": "string", "format": "uuid" }, "sourceTenantId": { "type": "string" }, "targetTenantId": { "type": "string" }, "status": { "type": "string", "enum": [ "IN_PROGRESS", "COMPLETE", "ERROR" ] }, "error": { "type": "string" }, "metadata": { "type": "object", "title": "Metadata", "description": "Metadata about creation and changes to records", "properties": { "createdDate": { "type": "string", "description": "Date and time when the record was created" }, "createdByUserId": { "type": "string", "format": "uuid" }, "createdByUsername": { "type": "string", "description": "Username of the user who created the record (when available)" }, "createdBy": { "type": "object", "description": "User Display Information", "properties": { "lastName": { "type": "string", "readOnly": true, "description": "Last name of the user" }, "firstName": { "type": "string", "readOnly": true, "description": "First name of the user" }, "middleName": { "type": "string", "readOnly": true, "description": "Middle name or initial of the user" } }, "example": { "lastName": "Doe", "firstName": "John", "middleName": "X." } }, "updatedDate": { "type": "string", "description": "Date and time when the record was last updated" }, "updatedByUserId": { "type": "string", "format": "uuid" }, "updatedByUsername": { "type": "string", "description": "Username of the user who updated the record (when available)" }, "updatedBy": { "type": "object", "description": "User Display Information", "properties": { "lastName": { "type": "string", "readOnly": true, "description": "Last name of the user" }, "firstName": { "type": "string", "readOnly": true, "description": "First name of the user" }, "middleName": { "type": "string", "readOnly": true, "description": "Middle name or initial of the user" } }, "example": { "lastName": "Doe", "firstName": "John", "middleName": "X." } } }, "required": [ "createdDate" ] } }, "additionalProperties": false, "required": [ "instanceIdentifier", "sourceTenantId", "targetTenantId" ] } }, "totalRecords": { "type": "integer" } }, "additionalProperties": false, "required": [ "sharingInstances", "totalRecords" ] }
- startsharinginstance(consortiumId, sharingInstance)
POST /consortia/{consortiumId}/sharing/instances- Parameters
consortiumId (str) –
sharingInstance (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Resource not found
OkapiRequestConflict – Validation errors
OkapiRequestUnprocessableEntity – Validation errors
OkapiRequestFatalError – Internal server error
Schema
{ "description": "A JSON schema for the Sharing Instance", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "instanceIdentifier": { "type": "string", "format": "uuid" }, "sourceTenantId": { "type": "string" }, "targetTenantId": { "type": "string" }, "status": { "type": "string", "enum": [ "IN_PROGRESS", "COMPLETE", "ERROR" ] }, "error": { "type": "string" }, "metadata": { "type": "object", "title": "Metadata", "description": "Metadata about creation and changes to records", "properties": { "createdDate": { "type": "string", "description": "Date and time when the record was created" }, "createdByUserId": { "type": "string", "format": "uuid" }, "createdByUsername": { "type": "string", "description": "Username of the user who created the record (when available)" }, "createdBy": { "type": "object", "description": "User Display Information", "properties": { "lastName": { "type": "string", "readOnly": true, "description": "Last name of the user" }, "firstName": { "type": "string", "readOnly": true, "description": "First name of the user" }, "middleName": { "type": "string", "readOnly": true, "description": "Middle name or initial of the user" } }, "example": { "lastName": "Doe", "firstName": "John", "middleName": "X." } }, "updatedDate": { "type": "string", "description": "Date and time when the record was last updated" }, "updatedByUserId": { "type": "string", "format": "uuid" }, "updatedByUsername": { "type": "string", "description": "Username of the user who updated the record (when available)" }, "updatedBy": { "type": "object", "description": "User Display Information", "properties": { "lastName": { "type": "string", "readOnly": true, "description": "Last name of the user" }, "firstName": { "type": "string", "readOnly": true, "description": "First name of the user" }, "middleName": { "type": "string", "readOnly": true, "description": "Middle name or initial of the user" } }, "example": { "lastName": "Doe", "firstName": "John", "middleName": "X." } } }, "required": [ "createdDate" ] } }, "additionalProperties": false, "required": [ "instanceIdentifier", "sourceTenantId", "targetTenantId" ] }