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

(-)a/api/v1/swagger/definitions/background_job.yaml (+58 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  background_job_id:
5
    type: integer
6
    description: internally assigned background_job identifier
7
    readOnly: true
8
  status:
9
    description: background_job status
10
    type:
11
      - string
12
      - "null"
13
  progress:
14
    description: background_job progress
15
    type:
16
      - string
17
      - "null"
18
  size:
19
    description: background_job size
20
    type:
21
      - string
22
      - "null"
23
  patron_id:
24
    description: background_job enqueuer
25
    type:
26
      - string
27
      - "null"
28
  type:
29
    description: background_job type
30
    type:
31
      - string
32
      - "null"
33
  queue:
34
    description: background_job queue
35
    type:
36
      - string
37
      - "null"
38
  data:
39
    description: background_job data
40
    type:
41
      - string
42
      - "null"
43
  enqueued_on:
44
    description: background_job enqueue date
45
    type:
46
      - string
47
      - "null"
48
  started_on:
49
    description: background_job start date
50
    type:
51
      - string
52
      - "null"
53
  ended_on:
54
    description: background_job end date
55
    type:
56
      - string
57
      - "null"
58
additionalProperties: false
(-)a/api/v1/swagger/paths/background_jobs.yaml (+123 lines)
Line 0 Link Here
1
---
2
/background_jobs:
3
  get:
4
    x-mojo-to: BackgroundJobs#list
5
    operationId: listBackgroundJobs
6
    tags:
7
      - background_jobs
8
    summary: List background jobs
9
    produces:
10
      - application/json
11
    parameters:
12
      - name: status
13
        in: query
14
        description: Case insensative search on job status
15
        required: false
16
        type: string
17
      - name: progress
18
        in: query
19
        description: Case insensative search on job progress
20
        required: false
21
        type: string
22
      - name: size
23
        in: query
24
        description: Case insensative search on job size
25
        required: false
26
        type: string
27
      - name: patron_id
28
        in: query
29
        description: Case insensative search on job enqueuer id
30
        required: false
31
        type: string
32
      - name: tye
33
        in: query
34
        description: Case insensative search on job type
35
        required: false
36
        type: string
37
      - name: queue
38
        in: query
39
        description: Case insensative search on job queue
40
        required: false
41
        type: string
42
      - name: enqueued_on
43
        in: query
44
        description: Case insensative search on job enqueue date
45
        required: false
46
        type: string
47
      - name: started_on
48
        in: query
49
        description: Case insensative search on job start date
50
        required: false
51
        type: string
52
      - name: ended_on
53
        in: query
54
        description: Case insensative search on job end date
55
        required: false
56
        type: string
57
      - $ref: "../swagger.yaml#/parameters/match"
58
      - $ref: "../swagger.yaml#/parameters/order_by"
59
      - $ref: "../swagger.yaml#/parameters/page"
60
      - $ref: "../swagger.yaml#/parameters/per_page"
61
      - $ref: "../swagger.yaml#/parameters/q_param"
62
      - $ref: "../swagger.yaml#/parameters/q_body"
63
      - $ref: "../swagger.yaml#/parameters/q_header"
64
      - $ref: "../swagger.yaml#/parameters/request_id_header"
65
    responses:
66
      "200":
67
        description: A list of jobs
68
        schema:
69
          type: array
70
          items:
71
            $ref: "../swagger.yaml#/definitions/background_job"
72
      "403":
73
        description: Access forbidden
74
        schema:
75
          $ref: "../swagger.yaml#/definitions/error"
76
      "500":
77
        description: |
78
          Internal server error. Possible `error_code` attribute values:
79
80
          * `internal_server_error`
81
        schema:
82
          $ref: "../swagger.yaml#/definitions/error"
83
      "503":
84
        description: Under maintenance
85
        schema:
86
          $ref: "../swagger.yaml#/definitions/error"
87
    x-koha-authorization:
88
      permissions:
89
        catalogue: "1"
90
"/background_jobs/{background_job_id}":
91
  get:
92
    x-mojo-to: BackgroundJobs#get
93
    operationId: getBackgroundJob
94
    tags:
95
      - background_job
96
    summary: Get background job
97
    parameters:
98
      - $ref: "../swagger.yaml#/parameters/background_job_id_pp"
99
    produces:
100
      - application/json
101
    responses:
102
      "200":
103
        description: A background job
104
        schema:
105
          $ref: "../swagger.yaml#/definitions/background_job"
106
      "404":
107
        description: Background job not found
108
        schema:
109
          $ref: "../swagger.yaml#/definitions/error"
110
      "500":
111
        description: |
112
          Internal server error. Possible `error_code` attribute values:
113
114
          * `internal_server_error`
115
        schema:
116
          $ref: "../swagger.yaml#/definitions/error"
117
      "503":
118
        description: Under maintenance
119
        schema:
120
          $ref: "../swagger.yaml#/definitions/error"
121
    x-koha-authorization:
122
      permissions:
123
        catalogue: "1"
(-)a/api/v1/swagger/swagger.yaml (-1 / +12 lines)
Lines 8-13 definitions: Link Here
8
    $ref: ./definitions/advancededitormacro.yaml
8
    $ref: ./definitions/advancededitormacro.yaml
9
  allows_renewal:
9
  allows_renewal:
10
    $ref: ./definitions/allows_renewal.yaml
10
    $ref: ./definitions/allows_renewal.yaml
11
  background_job:
12
    $ref: ./definitions/background_job.yaml
11
  basket:
13
  basket:
12
    $ref: ./definitions/basket.yaml
14
    $ref: ./definitions/basket.yaml
13
  cashup:
15
  cashup:
Lines 93-98 paths: Link Here
93
    $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}"
95
    $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}"
94
  "/article_requests/{article_request_id}":
96
  "/article_requests/{article_request_id}":
95
    $ref: "./paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
97
    $ref: "./paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
98
  /background_jobs:
99
    $ref: ./paths/background_jobs.yaml#/~1background_jobs
100
  "/background_jobs/{background_job_id}":
101
    $ref: "./paths/background_jobs.yaml#/~1background_jobs~1{background_job_id}"
96
  "/biblios/{biblio_id}":
102
  "/biblios/{biblio_id}":
97
    $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}"
103
    $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}"
98
  "/biblios/{biblio_id}/checkouts":
104
  "/biblios/{biblio_id}/checkouts":
Lines 228-233 parameters: Link Here
228
    name: advancededitormacro_id
234
    name: advancededitormacro_id
229
    required: true
235
    required: true
230
    type: integer
236
    type: integer
237
  background_job_id_pp:
238
    description: Job internal identifier
239
    in: path
240
    name: background_job_id
241
    required: true
242
    type: integer
231
  biblio_id_pp:
243
  biblio_id_pp:
232
    description: Record internal identifier
244
    description: Record internal identifier
233
    in: path
245
    in: path
234
- 

Return to bug 30982