a375700d0e21e47703373bc0f77bcf705aa57fff
[icn.git] / cmd / bpa-restapi-agent / docs / swagger.yaml
1 ---
2 swagger: "2.0"
3 info:
4   description: "Addresses deployment of workloads in the edge"
5   version: "1.0.0"
6   title: "ICN application"
7 schemes:
8 - "http"
9 consumes:
10 - "application/json"
11 produces:
12 - "application/json"
13 paths:
14   /:
15     get:
16       tags:
17       - "container_images"
18       operationId: "find_images"
19       parameters:
20       - name: "since"
21         in: "query"
22         required: false
23         type: "integer"
24         format: "int64"
25         x-exportParamName: "Since"
26         x-optionalDataType: "Int64"
27       - name: "limit"
28         in: "query"
29         required: false
30         type: "integer"
31         default: 20
32         format: "int32"
33         x-exportParamName: "Limit"
34         x-optionalDataType: "Int32"
35       responses:
36         200:
37           description: "list the ICN operations"
38           schema:
39             type: "array"
40             items:
41               $ref: "#/definitions/Request"
42         default:
43           description: "generic error response"
44           schema:
45             $ref: "#/definitions/error"
46     post:
47       tags:
48       - "container_images"
49       operationId: "addContainer"
50       parameters:
51       - in: "body"
52         name: "body"
53         required: false
54         schema:
55           $ref: "#/definitions/Request"
56         x-exportParamName: "Body"
57       responses:
58         201:
59           description: "Created"
60           schema:
61             $ref: "#/definitions/Request"
62         default:
63           description: "error"
64           schema:
65             $ref: "#/definitions/error"
66   /{id}:
67     put:
68       tags:
69       - "container_images"
70       operationId: "updateImage"
71       parameters:
72       - name: "id"
73         in: "path"
74         required: true
75         type: "integer"
76         format: "int64"
77         x-exportParamName: "Id"
78       - in: "body"
79         name: "body"
80         required: false
81         schema:
82           $ref: "#/definitions/Request"
83         x-exportParamName: "Body"
84       responses:
85         200:
86           description: "OK"
87           schema:
88             $ref: "#/definitions/Request"
89         default:
90           description: "error"
91           schema:
92             $ref: "#/definitions/error"
93     delete:
94       tags:
95       - "container_images"
96       operationId: "destroyImage"
97       parameters:
98       - name: "id"
99         in: "path"
100         required: true
101         type: "integer"
102         format: "int64"
103         x-exportParamName: "Id"
104       responses:
105         204:
106           description: "Deleted"
107         default:
108           description: "error"
109           schema:
110             $ref: "#/definitions/error"
111 definitions:
112   Request:
113     type: "object"
114     properties:
115       image_id:
116         type: "string"
117       repo:
118         type: "string"
119       tag:
120         type: "string"
121       installed:
122         type: "boolean"
123     example:
124       installed: true
125       repo: "repo"
126       tag: "tag"
127       image_id: "image_id"
128   error:
129     type: "object"
130     required:
131     - "message"
132     properties:
133       code:
134         type: "integer"
135         format: "int64"
136       message:
137         type: "string"