source: ProjectBuilder/devel/pb-server/api.yml@ 2328

Last change on this file since 2328 was 2328, checked in by Bruno Cornec, 7 years ago

First validated API made (thanks to Jan Henning Thorsen for his help !)

File size: 3.5 KB
Line 
1---
2swagger: '2.0'
3info:
4 title: Project-Builder.org
5 description: PBSUMMARY
6 license:
7 name: General Public License 3.0
8 url: http://www.gnu.org/
9 #termsOfService: 'http://www.example.com/terms'
10 contact:
11 name: API Support
12 url: 'http://www.project-builder.org/support'
13 #email: support@example.com
14 version: 'PBAPIVER'
15host: localhost
16basePath: /api/vPBAPIVER
17schemes:
18 - http
19consumes:
20 - application/json
21 - application/yaml
22produces:
23 - application/json
24 - application/yaml
25# Global parameters
26paths:
27 /doc:
28 get:
29 summary: API Documentation
30 operationId: docPb
31 tags:
32 - pb
33 responses:
34 '200':
35 description: Expected response to a valid request
36 schema:
37 $ref: '#/definitions/Conf'
38 default:
39 description: Unexpected error
40 schema:
41 $ref: '#/definitions/Error'
42 /prj:
43 get:
44 summary: List all projects
45 operationId: listPrj
46 tags:
47 - prj
48 responses:
49 '200':
50 description: List of all projects managed by project-builder.org
51 schema:
52 $ref: '#/definitions/Prj'
53 default:
54 description: Unexpected error
55 schema:
56 $ref: '#/definitions/Error'
57 put:
58 summary: Create a new project
59 operationId: newPrj
60 tags:
61 - prj
62 parameters:
63 - name: name
64 in: body
65 description: Add project by name
66 required: true
67 schema:
68 $ref: '#/definitions/Prj'
69 responses:
70 '200':
71 description: Expected response to a valid request
72 schema:
73 $ref: '#/definitions/Prj'
74 '409':
75 description: Null response
76 schema:
77 $ref: '#/definitions/Error'
78 default:
79 description: Unexpected error
80 schema:
81 $ref: '#/definitions/Error'
82 /conf:
83 get:
84 summary: List all configuration parameters for a specific project
85 operationId: listConf
86 tags:
87 - conf
88 parameters:
89 - $ref: '#/parameters/prjName'
90 responses:
91 '200':
92 description: Expected response to a valid request
93 schema:
94 items:
95 $ref: '#/definitions/Conf'
96 default:
97 description: Unexpected error
98 schema:
99 $ref: '#/definitions/Error'
100 '/conf/{confname}':
101 get:
102 operationId: showConf
103 summary: Get a configuration item
104 tags:
105 - conf
106 parameters:
107 - name: confname
108 in: path
109 type: string
110 required: true
111 description: The name of the configuration item that will be queried
112 - $ref: '#/parameters/prjName'
113 responses:
114 '200':
115 description: Expected response to a valid request
116 schema:
117 $ref: '#/definitions/Conf'
118 default:
119 description: Unexpected error
120 schema:
121 $ref: '#/definitions/Error'
122parameters:
123 prjName:
124 required: true
125 name: pbproj
126 in: body
127 description: The name of the project that will be queried
128 schema:
129 type: string
130 default: 'pb'
131definitions:
132 Prj:
133 required:
134 - name
135 properties:
136 name:
137 type: string
138 tag:
139 type: string
140 Conf:
141 required:
142 - name
143 properties:
144 name:
145 type: string
146 tag:
147 type: string
148 Error:
149 required:
150 - code
151 - message
152 properties:
153 code:
154 type: integer
155 format: int32
156 message:
157 type: string
Note: See TracBrowser for help on using the repository browser.