Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

118 lines
3.3 KiB

---
"/patrons/{patron_id}/password":
post:
x-mojo-to: Patrons::Password#set
operationId: setPatronPassword
tags:
- patrons
summary: Set password for a patron
parameters:
- $ref: "../swagger.yaml#/parameters/patron_id_pp"
- name: body
in: body
description: A JSON object containing password information
schema:
type: object
properties:
password:
description: New password (plain text)
type: string
password_2:
description: Repeated new password (plain text)
type: string
required:
- password
- password_2
additionalProperties: false
produces:
- application/json
responses:
"200":
description: Password changed
"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: Patron 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:
borrowers: "1"
"/patrons/{patron_id}/password/expiration_date":
put:
x-mojo-to: Patrons::Password::Expiration#set
operationId: setPatronPasswordExpiration
tags:
- patrons
summary: Set password expiration for a patron
parameters:
- $ref: ../swagger.yaml#/parameters/patron_id_pp
- name: body
in: body
description: A JSON object containing password expiration date
schema:
type: object
properties:
expiration_date:
description: Date to expire password
type: string
format: date
required:
- expiration_date
additionalProperties: false
produces:
- application/json
responses:
"200":
description: Password expiration changed
"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: Patron 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:
superlibrarian: "1"