View | Details | Raw Unified | Return to bug 36329
Collapse All | Expand All

(-)a/api/v1/swagger/paths/transfer_limits.yaml (-11 / +13 lines)
Lines 5-11 Link Here
5
    description: This resource returns a list of existing transfer limits.
5
    description: This resource returns a list of existing transfer limits.
6
    summary: List transfer limits
6
    summary: List transfer limits
7
    tags:
7
    tags:
8
      - transfer
8
      - transfer_limits
9
    parameters:
9
    parameters:
10
      - name: to_library_id
10
      - name: to_library_id
11
        in: query
11
        in: query
Lines 75-81 Link Here
75
    description: This resource accepts a new transfer limit and creates it if it does not
75
    description: This resource accepts a new transfer limit and creates it if it does not
76
      already exist.
76
      already exist.
77
    tags:
77
    tags:
78
      - transfer
78
      - transfer_limits
79
    summary: Add a transfer limit
79
    summary: Add a transfer limit
80
    parameters:
80
    parameters:
81
      - name: body
81
      - name: body
Lines 127-133 Link Here
127
    operationId: deleteTransferLimit
127
    operationId: deleteTransferLimit
128
    description: This resource deletes a transfer limit for the given limit id
128
    description: This resource deletes a transfer limit for the given limit id
129
    tags:
129
    tags:
130
      - transfer
130
      - transfer_limits
131
    summary: Delete transfer limit
131
    summary: Delete transfer limit
132
    parameters:
132
    parameters:
133
      - $ref: "../swagger.yaml#/parameters/transfer_limit_id_pp"
133
      - $ref: "../swagger.yaml#/parameters/transfer_limit_id_pp"
Lines 172-177 Link Here
172
172
173
      This resource batch creates new transfer limits based on the given data.
173
      This resource batch creates new transfer limits based on the given data.
174
174
175
      Transfer limits can be defined based on `collection_code` or `item_type`. The endpoint
176
      only accepts one at a time, and which one is used will depend on the value of the
177
      `BranchTransferLimitsType` system preference.
178
175
      For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in
179
      For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in
176
      new transfer limits for `BOOK`s will be created, with one transfer limit each for all the
180
      new transfer limits for `BOOK`s will be created, with one transfer limit each for all the
177
      branches defined in Koha. Given 4 branches, 3 limits would be created:
181
      branches defined in Koha. Given 4 branches, 3 limits would be created:
Lines 184-196 Link Here
184
      The body of the query would look like
188
      The body of the query would look like
185
189
186
      ```
190
      ```
187
188
      {
191
      {
189
          'to_library_id': 'BranchA',
192
          'to_library_id': 'BranchA',
190
          'item_type': 'BOOK'
193
          'item_type': 'BOOK'
191
194
192
      }
195
      }
193
194
      ```
196
      ```
195
197
196
      As another example, imagine we have an itemtype that is never supposed to be transferred to another library.
198
      As another example, imagine we have an itemtype that is never supposed to be transferred to another library.
Lines 199-212 Link Here
199
      library. The body of the query would look like
201
      library. The body of the query would look like
200
202
201
      ```
203
      ```
202
203
      {
204
      {
204
          'item_type': 'LOCAL_ONLY'
205
          'item_type': 'LOCAL_ONLY'
205
      }
206
      }
206
207
      ```
207
      ```
208
    tags:
208
    tags:
209
      - transfer
209
      - transfer_limits
210
    summary: Batch add transfer limits
210
    summary: Batch add transfer limits
211
    parameters:
211
    parameters:
212
      - name: body
212
      - name: body
Lines 255-260 Link Here
255
        description: Access forbidden
255
        description: Access forbidden
256
        schema:
256
        schema:
257
          $ref: "../swagger.yaml#/definitions/error"
257
          $ref: "../swagger.yaml#/definitions/error"
258
      "409":
259
        description: Conflict in creating resource
260
        schema:
261
          $ref: "../swagger.yaml#/definitions/error"
258
      "500":
262
      "500":
259
        description: |
263
        description: |
260
          Internal server error. Possible `error_code` attribute values:
264
          Internal server error. Possible `error_code` attribute values:
Lines 276-282 Link Here
276
      version](#op-post-transfer_limits-batch), except it deletes transfer in
280
      version](#op-post-transfer_limits-batch), except it deletes transfer in
277
      batch rather than creating them.
281
      batch rather than creating them.
278
    tags:
282
    tags:
279
      - transfer
283
      - transfer_limits
280
    summary: Batch delete transfer limits
284
    summary: Batch delete transfer limits
281
    parameters:
285
    parameters:
282
      - name: body
286
      - name: body
Lines 309-316 Link Here
309
    responses:
313
    responses:
310
      "204":
314
      "204":
311
        description: Transfer limits deleted
315
        description: Transfer limits deleted
312
        schema:
313
          type: string
314
      "401":
316
      "401":
315
        description: Authentication required
317
        description: Authentication required
316
        schema:
318
        schema:
(-)a/api/v1/swagger/swagger.yaml (-2 / +1 lines)
Lines 1166-1172 tags: Link Here
1166
    name: tickets
1166
    name: tickets
1167
    x-displayName: Tickets
1167
    x-displayName: Tickets
1168
  - description: "Manage transfer limits\n"
1168
  - description: "Manage transfer limits\n"
1169
    name: transfer
1169
    name: transfer_limits
1170
    x-displayName: Transfer limits
1170
    x-displayName: Transfer limits
1171
  - description: "Handle two factor authentication flows\n"
1171
  - description: "Handle two factor authentication flows\n"
1172
    name: 2fa
1172
    name: 2fa
1173
- 

Return to bug 36329