210 lines
6.0 KiB
YAML
210 lines
6.0 KiB
YAML
---
|
|
"/deleted/biblios":
|
|
get:
|
|
x-mojo-to: DeletedBiblios#list
|
|
operationId: listDeletedBiblios
|
|
tags:
|
|
- biblios
|
|
summary: List deleted biblios
|
|
parameters:
|
|
- $ref: "../swagger.yaml#/parameters/page"
|
|
- $ref: "../swagger.yaml#/parameters/per_page"
|
|
- $ref: "../swagger.yaml#/parameters/match"
|
|
- $ref: "../swagger.yaml#/parameters/order_by"
|
|
- $ref: "../swagger.yaml#/parameters/q_param"
|
|
- $ref: "../swagger.yaml#/parameters/q_body"
|
|
- $ref: "../swagger.yaml#/parameters/request_id_header"
|
|
- name: x-koha-embed
|
|
in: header
|
|
required: false
|
|
description: Embed list sent as a request header
|
|
type: array
|
|
items:
|
|
type: string
|
|
enum:
|
|
- items
|
|
produces:
|
|
- application/json
|
|
- application/marcxml+xml
|
|
- application/marc-in-json
|
|
- application/marc
|
|
- text/plain
|
|
responses:
|
|
"200":
|
|
description: A list of deleted biblios
|
|
"400":
|
|
description: |
|
|
Bad request. Possible `error_code` attribute values:
|
|
|
|
* `invalid_query`
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"401":
|
|
description: Authentication required
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"403":
|
|
description: Access forbidden
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"404":
|
|
description: Bibliographic record not found
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"406":
|
|
description: Not acceptable
|
|
schema:
|
|
type: array
|
|
description: Accepted content-types
|
|
items:
|
|
type: string
|
|
"500":
|
|
description: |
|
|
Internal server error. Possible `error_code` attribute values:
|
|
|
|
* `internal_server_error`
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"503":
|
|
description: Under maintenance
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
x-koha-authorization:
|
|
permissions:
|
|
catalogue: "1"
|
|
"/deleted/biblios/{biblio_id}":
|
|
get:
|
|
x-mojo-to: DeletedBiblios#get
|
|
operationId: getDeletedBiblio
|
|
tags:
|
|
- biblios
|
|
summary: Get deleted biblio
|
|
parameters:
|
|
- $ref: "../swagger.yaml#/parameters/biblio_id_pp"
|
|
produces:
|
|
- application/json
|
|
- application/marcxml+xml
|
|
- application/marc-in-json
|
|
- application/marc
|
|
- text/plain
|
|
responses:
|
|
"200":
|
|
description: A deleted biblio
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"401":
|
|
description: Authentication required
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"403":
|
|
description: Access forbidden
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"404":
|
|
description: Bibliographic record not found
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"406":
|
|
description: Not acceptable
|
|
schema:
|
|
type: array
|
|
description: Accepted content-types
|
|
items:
|
|
type: string
|
|
"500":
|
|
description: |
|
|
Internal server error. Possible `error_code` attribute values:
|
|
|
|
* `internal_server_error`
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"503":
|
|
description: Under maintenance
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
x-koha-authorization:
|
|
permissions:
|
|
catalogue: "1"
|
|
put:
|
|
x-mojo-to: DeletedBiblios#restore
|
|
operationId: restoreDeletedBiblio
|
|
tags:
|
|
- biblios
|
|
summary: Restore deleted biblio
|
|
parameters:
|
|
- $ref: "../swagger.yaml#/parameters/biblio_id_pp"
|
|
- name: body
|
|
in: body
|
|
description: Restore options for items
|
|
required: false
|
|
schema:
|
|
type: object
|
|
properties:
|
|
item_ids:
|
|
type: array
|
|
description: Array of item IDs to restore with the biblio
|
|
items:
|
|
type: integer
|
|
restore_all:
|
|
type: boolean
|
|
description: Restore all items the user has permission to edit
|
|
additionalProperties: false
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Biblio restored successfully
|
|
schema:
|
|
type: object
|
|
properties:
|
|
biblio_id:
|
|
type: integer
|
|
description: The ID of the restored biblio
|
|
restored_items:
|
|
type: array
|
|
description: List of item IDs that were successfully restored
|
|
items:
|
|
type: integer
|
|
skipped_items:
|
|
type: array
|
|
description: List of item IDs that were skipped during restoration due to insufficient permissions
|
|
items:
|
|
type: integer
|
|
required:
|
|
- biblio_id
|
|
additionalProperties: false
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"401":
|
|
description: Authentication required
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"403":
|
|
description: Access forbidden
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"404":
|
|
description: Deleted bibliographic record not found
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"500":
|
|
description: |
|
|
Internal server error. Possible `error_code` attribute values:
|
|
|
|
* `internal_server_error`
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"503":
|
|
description: Under maintenance
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
x-koha-authorization:
|
|
permissions:
|
|
editcatalogue: records_restore
|