Bug 32030: ERM - Agreement documents (FIXED)
[koha-ffzg.git] / api / v1 / swagger / swagger.yaml
index 0af9371..0bb636e 100644 (file)
@@ -1,5 +1,5 @@
 ---
-swagger: 2.0
+swagger: "2.0"
 basePath: /api/v1
 definitions:
   account_line:
@@ -10,6 +10,8 @@ definitions:
     $ref: ./definitions/allows_renewal.yaml
   basket:
     $ref: ./definitions/basket.yaml
+  bundle_link:
+    $ref: ./definitions/bundle_link.yaml
   cashup:
     $ref: ./definitions/cashup.yaml
   checkout:
@@ -20,6 +22,16 @@ definitions:
     $ref: ./definitions/circ-rule-kind.yaml
   city:
     $ref: ./definitions/city.yaml
+  erm_agreement:
+    $ref: ./definitions/erm_agreement.yaml
+  erm_eholdings_title:
+    $ref: ./definitions/erm_eholdings_title.yaml
+  erm_eholdings_package:
+    $ref: ./definitions/erm_eholdings_package.yaml
+  erm_eholdings_resource:
+    $ref: ./definitions/erm_eholdings_resource.yaml
+  erm_license:
+    $ref: ./definitions/erm_license.yaml
   error:
     $ref: ./definitions/error.yaml
   fund:
@@ -36,10 +48,16 @@ definitions:
     $ref: ./definitions/import_batch_profile.yaml
   import_batch_profiles:
     $ref: ./definitions/import_batch_profiles.yaml
+  import_record_match:
+    $ref: ./definitions/import_record_match.yaml
   invoice:
     $ref: ./definitions/invoice.yaml
   item:
     $ref: ./definitions/item.yaml
+  item_group:
+    $ref: ./definitions/item_group.yaml
+  job:
+    $ref: ./definitions/job.yaml
   library:
     $ref: ./definitions/library.yaml
   order:
@@ -54,8 +72,14 @@ definitions:
     $ref: ./definitions/patron_extended_attribute.yaml
   quote:
     $ref: ./definitions/quote.yaml
+  renewal:
+    $ref: ./definitions/renewal.yaml
+  renewals:
+    $ref: ./definitions/renewals.yaml
   return_claim:
     $ref: ./definitions/return_claim.yaml
+  search_filter:
+    $ref: ./definitions/search_filter.yaml
   smtp_server:
     $ref: ./definitions/smtp_server.yaml
   suggestion:
@@ -85,12 +109,22 @@ paths:
     $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros
   /advanced_editor/macros/shared:
     $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared
+  /search_filters:
+    $ref: ./paths/search_filters.yaml#/~1search_filters
+  "/search_filters/{search_filter_id}":
+    $ref: "./paths/search_filters.yaml#/~1search_filters~1{search_filter_id}"
   "/advanced_editor/macros/shared/{advancededitormacro_id}":
     $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}"
   "/advanced_editor/macros/{advancededitormacro_id}":
     $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}"
   "/article_requests/{article_request_id}":
     $ref: "./paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
+  /auth/otp/token_delivery:
+    $ref: paths/auth.yaml#/~1auth~1otp~1token_delivery
+  /auth/two-factor/registration:
+    $ref: paths/auth.yaml#/~1auth~1two-factor~1registration
+  /auth/two-factor/registration/verification:
+    $ref: paths/auth.yaml#/~1auth~1two-factor~1registration~1verification
   "/biblios/{biblio_id}":
     $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}"
   "/biblios/{biblio_id}/checkouts":
@@ -99,6 +133,14 @@ paths:
     $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1items"
   "/biblios/{biblio_id}/pickup_locations":
     $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations"
+  "/biblios/{biblio_id}/item_groups":
+    $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups"
+  "/biblios/{biblio_id}/item_groups/{item_group_id}":
+    $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}"
+  "/biblios/{biblio_id}/item_groups/{item_group_id}/items":
+    $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items"
+  "/biblios/{biblio_id}/item_groups/{item_group_id}/items/{item_id}":
+    $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items~1{item_id}"
   "/cash_registers/{cash_register_id}/cashups":
     $ref: "./paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups"
   "/cashups/{cashup_id}":
@@ -109,6 +151,8 @@ paths:
     $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}"
   "/checkouts/{checkout_id}/allows_renewal":
     $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal"
+  "/checkouts/{checkout_id}/renewals":
+    $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewals"
   "/checkouts/{checkout_id}/renewal":
     $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal"
   /circulation-rules/kinds:
@@ -123,6 +167,34 @@ paths:
     $ref: ./paths/config_smtp_servers.yaml#/~1config~1smtp_servers
   "/config/smtp_servers/{smtp_server_id}":
     $ref: "./paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}"
+  /erm/agreements:
+    $ref: ./paths/erm_agreements.yaml#/~1erm~1agreements
+  "/erm/agreements/{agreement_id}":
+    $ref: "./paths/erm_agreements.yaml#/~1erm~1agreements~1{agreement_id}"
+  "/erm/agreements/{agreement_id}/documents/{document_id}/file/content":
+    $ref: "./paths/erm_documents.yaml#/~1erm~1agreements~1{agreement_id}~1documents~1{document_id}~1file~1content"
+  "/erm/eholdings/{provider}/titles":
+    $ref: ./paths/erm_eholdings_titles.yaml#/~1erm~1eholdings~1{provider}~1titles
+  "/erm/eholdings/{provider}/titles/{title_id}":
+    $ref: "./paths/erm_eholdings_titles.yaml#/~1erm~1eholdings~1{provider}~1titles~1{title_id}"
+  "/erm/eholdings/{provider}/titles/{title_id}/resources":
+    $ref: "./paths/erm_eholdings_titles_resources.yaml#/~1erm~1eholdings~1{provider}~1titles~1{title_id}~1resources"
+  "/erm/eholdings/{provider}/packages":
+    $ref: "./paths/erm_eholdings_packages.yaml#/~1erm~1eholdings~1{provider}~1packages"
+  "/erm/eholdings/{provider}/resources":
+    $ref: "./paths/erm_eholdings_resources.yaml#/~1erm~1eholdings~1{provider}~1resources"
+  "/erm/eholdings/{provider}/resources/{resource_id}":
+    $ref: "./paths/erm_eholdings_resources.yaml#/~1erm~1eholdings~1{provider}~1resources~1{resource_id}"
+  "/erm/eholdings/{provider}/packages/{package_id}":
+    $ref: "./paths/erm_eholdings_packages.yaml#/~1erm~1eholdings~1{provider}~1packages~1{package_id}"
+  "/erm/eholdings/{provider}/packages/{package_id}/resources":
+    $ref: "./paths/erm_eholdings_packages_resources.yaml#/~1erm~1eholdings~1{provider}~1packages~1{package_id}~1resources"
+  /erm/licenses:
+    $ref: ./paths/erm_licenses.yaml#/~1erm~1licenses
+  "/erm/licenses/{license_id}":
+    $ref: "./paths/erm_licenses.yaml#/~1erm~1licenses~1{license_id}"
+  /erm/users:
+    $ref: ./paths/erm_users.yaml#/~1erm~1users
   /holds:
     $ref: ./paths/holds.yaml#/~1holds
   "/holds/{hold_id}":
@@ -141,6 +213,8 @@ paths:
     $ref: "./paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id}"
   /illrequests:
     $ref: ./paths/illrequests.yaml#/~1illrequests
+  "/import_batches/{import_batch_id}/records/{import_record_id}/matches/chosen":
+    $ref: "./paths/import_batches.yaml#/~1import_batches~1{import_batch_id}~1records~1{import_record_id}~1matches~1chosen"
   /import_batch_profiles:
     $ref: ./paths/import_batch_profiles.yaml#/~1import_batch_profiles
   "/import_batch_profiles/{import_batch_profile_id}":
@@ -149,8 +223,16 @@ paths:
     $ref: ./paths/items.yaml#/~1items
   "/items/{item_id}":
     $ref: "./paths/items.yaml#/~1items~1{item_id}"
+  "/items/{item_id}/bundled_items":
+    $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items
+  "/items/{item_id}/bundled_items/{bundled_item_id}":
+    $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items~1{bundled_item_id}
   "/items/{item_id}/pickup_locations":
     $ref: "./paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
+  /jobs:
+    $ref: ./paths/jobs.yaml#/~1jobs
+  "/jobs/{job_id}":
+    $ref: "./paths/jobs.yaml#/~1jobs~1{job_id}"
   /libraries:
     $ref: ./paths/libraries.yaml#/~1libraries
   "/libraries/{library_id}":
@@ -173,10 +255,14 @@ paths:
     $ref: "./paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds"
   "/patrons/{patron_id}/password":
     $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
+  "/patrons/{patron_id}/password/expiration_date":
+    $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date"
   "/public/biblios/{biblio_id}":
     $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
   "/public/biblios/{biblio_id}/items":
     $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items"
+  "/public/biblios/{biblio_id}/ratings":
+    $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1ratings"
   /public/libraries:
     $ref: ./paths/libraries.yaml#/~1public~1libraries
   "/public/libraries/{library_id}":
@@ -222,12 +308,30 @@ parameters:
     name: advancededitormacro_id
     required: true
     type: integer
+  agreement_id_pp:
+    description: Agreement internal identifier
+    in: path
+    name: agreement_id
+    required: true
+    type: integer
+  agreement_period_id_pp:
+    description: Agreement period internal identifier
+    in: path
+    name: agreement_period_id
+    required: true
+    type: integer
   biblio_id_pp:
     description: Record internal identifier
     in: path
     name: biblio_id
     required: true
     type: integer
+  candidate_match_id_pp:
+    description: Internal import record match identifier
+    in: path
+    name: candidate_match_id
+    required: true
+    type: integer
   cash_register_id_pp:
     description: Cash register internal identifier
     in: path
@@ -258,6 +362,24 @@ parameters:
     name: club_id
     required: true
     type: integer
+  eholdings_title_id_pp:
+    description: Title internal identifier
+    in: path
+    name: title_id
+    required: true
+    type: integer
+  eholdings_package_id_pp:
+    description: Package internal identifier
+    in: path
+    name: package_id
+    required: true
+    type: string
+  eholdings_resource_id_pp:
+    description: Resource internal identifier
+    in: path
+    name: resource_id
+    required: true
+    type: string
   fund_id_pp:
     description: Fund id
     in: path
@@ -276,18 +398,36 @@ parameters:
     name: import_batch_profile_id
     required: true
     type: integer
+  import_record_id_pp:
+    description: Internal import record identifier
+    in: path
+    name: import_record_id
+    required: true
+    type: integer
   item_id_pp:
     description: Internal item identifier
     in: path
     name: item_id
     required: true
     type: integer
+  job_id_pp:
+    description: Job internal identifier
+    in: path
+    name: job_id
+    required: true
+    type: integer
   library_id_pp:
     description: Internal library identifier
     in: path
     name: library_id
     required: true
     type: string
+  license_id_pp:
+    description: License internal identifier
+    in: path
+    name: license_id
+    required: true
+    type: integer
   match:
     description: Matching criteria
     enum:
@@ -371,6 +511,12 @@ parameters:
     name: x-koha-request-id
     required: false
     type: integer
+  search_filter_id_pp:
+    name: search_filter_id
+    in: path
+    description: Search filter internal identifier
+    required: true
+    type: integer
   seen_pp:
     description: Item was seen flag
     in: query
@@ -403,7 +549,7 @@ parameters:
     type: integer
 info:
   title: Koha REST API
-  version: 1
+  version: "1"
   license:
     name: "GPL v3,"
     url: http://www.gnu.org/licenses/gpl.txt
@@ -463,6 +609,9 @@ info:
     "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
     results with both field1 containing value2 AND field2 containing value2 for example.
 
+    Additionally, if you are requesting related data be embedded into the response one can query
+    on the related data using dot notation in the field names.
+
     ### Examples
 
     The following request would return any patron with firstname "Henry" and lastname "Acevedo";
@@ -473,21 +622,39 @@ info:
 
     `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": { "-like": "Ace%" }"`
 
-    The following request would return any patron whilse lastname is "Acevedo" OR "Bernardo"
+    The following request would return any patron whose lastname is "Acevedo" OR "Bernardo"
 
     `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": [ "Acevedo", "Bernardo" ] }"`
 
+    The following request embeds the related patron extended attributes data and filters on it.
+
+    `curl -u koha:koha =--request GET 'http://127.0.0.1:8081/api/v1/patrons/' --header 'x-koha-embed: extended_attributes' --data-raw '{ "extended_attributes.code": "internet", "extended_attributes.attribute": "1" }'`
+
     ## Special headers
 
+    ### x-koha-embed
+
+    This optional header allows the api consumer to request additional related data
+    to be returned in the api response.  It also allows for cross referencing in the
+    queries as described above. It accepts a comma delimited list of relation names.
+
+    Relations may on occasion also support dot delimited nesting to allow traversal.
+
     ### x-koha-library
 
     This optional header should be passed to give your api request a library
     context; If it is not included in the request, then the request context
     will default to using your api comsumer"s assigned home library.
 tags:
+  - description: "Handle two factor authentication flows\n"
+    name: 2fa
+    x-displayName: Two factor authentication
   - description: "Manage article requests\n"
     name: article_requests
     x-displayName: Article requests
+  - description: "Manage baskets for the acquisitions module\n"
+    name: baskets
+    x-displayName: Baskets
   - description: "Manage bibliographic records\n"
     name: biblios
     x-displayName: Biblios
@@ -518,9 +685,18 @@ tags:
   - description: "Manage ILL requests\n"
     name: illrequests
     x-displayName: ILL requests
+  - description: "Manage import batches\n"
+    name: import_batches
+    x-display-name: Import batches
+  - description: "Manage item groups\n"
+    name: item_groups
+    x-displayName: Item groups
   - description: "Manage items\n"
     name: items
     x-displayName: Items
+  - description: "Manage jobs\n"
+    name: jobs
+    x-displayName: Jobs
   - description: "Manage libraries\n"
     name: libraries
     x-displayName: Libraries