1e72e59030
To test: 1. Apply patch 2. Set RESTBasicAuth preference to true 3. Get the id of an authority 4. Make a GET request to /api/v1/authorities/{authid} with one of the following content type header - application/json - application/marcxml+xml - application/marc-in-json - application/marc - text/plain 5. Check that you get the authority in the corresponding format 6. Sign off Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
---
|
|
"/authorities/{authority_id}":
|
|
get:
|
|
x-mojo-to: Authorities#get
|
|
operationId: getAuthority
|
|
tags:
|
|
- authorities
|
|
summary: Get authority
|
|
parameters:
|
|
- $ref: "../swagger.yaml#/parameters/authority_id_pp"
|
|
produces:
|
|
- application/json
|
|
- application/marcxml+xml
|
|
- application/marc-in-json
|
|
- application/marc
|
|
- text/plain
|
|
responses:
|
|
"200":
|
|
description: An authority
|
|
"401":
|
|
description: Authentication required
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"403":
|
|
description: Access forbidden
|
|
schema:
|
|
$ref: "../swagger.yaml#/definitions/error"
|
|
"404":
|
|
description: Authority 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"
|