Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | /** |
4 | * @apiDefine EntityError Error 422 |
5 | * |
6 | * @apiError (Error 422) {json} Unprocessable Entity Something wrong with parameters. |
7 | * |
8 | * @apiErrorExample {json} 422: |
9 | * HTTP/1.1 422 Unprocessable Entity |
10 | * { |
11 | * "error": "error description" |
12 | * } |
13 | */ |
14 | |
15 | /** |
16 | * @apiDefine UserId Request-Header |
17 | * |
18 | * @apiHeader (UserId) {Integer} X-Qwamplify-user-id User-id. |
19 | * |
20 | * @apiHeaderExample {json} Header (Example) : |
21 | * { |
22 | * "X-Qwamplify-user-id" : 1 |
23 | * } |
24 | */ |
25 | |
26 | |
27 | |
28 | /******************** DOMAIN *********************/ |
29 | |
30 | /** |
31 | * @api {get} http://service_ovh/api/ovh/domain 1.1 Get All Domains |
32 | * @apiVersion 1.0.0 |
33 | * @apiName GetAllDomains |
34 | * @apiGroup 1.Domain |
35 | * @apiDescription Get all ovh domains zones. |
36 | * @apiPermission ovh_domain_view |
37 | * |
38 | * @apiUse UserId |
39 | * |
40 | * @apiSuccessExample Response-Data (example): |
41 | * HTTP/1.1 200 Ok |
42 | * [ |
43 | * "domain1", |
44 | * "domain2", |
45 | * ... |
46 | * ] |
47 | * |
48 | * @apiUse EntityError |
49 | */ |
50 | |
51 | /** |
52 | * @api {get} http://service_ovh/api/ovh/{domain_name}/records 1.2 Get All records |
53 | * @apiVersion 1.0.0 |
54 | * @apiName GetAllDomainsRecords |
55 | * @apiGroup 1.Domain |
56 | * @apiDescription Get all ovh domain's records. |
57 | * @apiPermission ovh_domain_view |
58 | * |
59 | * @apiUse UserId |
60 | * |
61 | * @apiParam (URL) {String} domain_name domain name. |
62 | * |
63 | * |
64 | * @apiSuccessExample Response-Data (example): |
65 | * HTTP/1.1 200 Ok |
66 | * { |
67 | * "123456789": { |
68 | * "target": "nsxxxxxxx", |
69 | * "ttl": "86400", |
70 | * "zone": "domain_name", |
71 | * "fieldType": "A", |
72 | * "id": 123456789, |
73 | * "subDomain": "xxxxxxx" |
74 | * }, |
75 | * ... |
76 | * } |
77 | * |
78 | * @apiUse EntityError |
79 | */ |
80 | |
81 | /** |
82 | * @api {get} http://service_ovh/api/ovh/{domain_name}/records/{id} 1.3 Get One record |
83 | * @apiVersion 1.0.0 |
84 | * @apiName GetOneDomainsRecord |
85 | * @apiGroup 1.Domain |
86 | * @apiDescription Get one ovh domain's record. |
87 | * @apiPermission ovh_domain_view |
88 | * |
89 | * @apiUse UserId |
90 | * |
91 | * @apiParam (URL) {String} domain_name domain name. |
92 | * @apiParam (URL) {String} id id of domain's record. |
93 | * |
94 | * |
95 | * @apiSuccessExample Response-Data (example): |
96 | * HTTP/1.1 200 Ok |
97 | * { |
98 | * "target": "nsxxxxxxx", |
99 | * "ttl": "86400", |
100 | * "zone": "domain_name", |
101 | * "fieldType": "A", |
102 | * "id": 123456789, |
103 | * "subDomain": "xxxxxxx" |
104 | * } |
105 | * |
106 | * @apiUse EntityError |
107 | */ |
108 | |
109 | |
110 | /** |
111 | * @api {post} http://service_ovh/api/ovh/{domain_name}/records 1.4 Create One record |
112 | * @apiVersion 1.0.0 |
113 | * @apiName CreateOneDomainsRecord |
114 | * @apiGroup 1.Domain |
115 | * @apiDescription Create one ovh domain's record. |
116 | * @apiPermission ovh_domain_view && ovh_domain_edit |
117 | * |
118 | * @apiUse UserId |
119 | * |
120 | * @apiParam (URL) {String} domain_name domain name. |
121 | * |
122 | * @apiParam (POST) {String} fieldType FieldType (ex: A, AAAA, NS, CNAME, ...) |
123 | * @apiParam (POST) {String} subDomain subdomain to add |
124 | * @apiParam (POST) {String} target IP of server target |
125 | * @apiParam (POST) {String} ttl TTL |
126 | * |
127 | * |
128 | * @apiSuccessExample Response-Data (example): |
129 | * HTTP/1.1 200 Ok |
130 | * { |
131 | * "status": "ok" |
132 | * } |
133 | * |
134 | * @apiUse EntityError |
135 | */ |
136 | |
137 | /** |
138 | * @api {put} http://service_ovh/api/ovh/{domain_name}/records/{id} 1.4 Update One record |
139 | * @apiVersion 1.0.0 |
140 | * @apiName UpdateOneDomainsRecord |
141 | * @apiGroup 1.Domain |
142 | * @apiDescription Update one ovh domain's record. |
143 | * @apiPermission ovh_domain_view && ovh_domain_edit |
144 | * |
145 | * @apiUse UserId |
146 | * |
147 | * @apiParam (URL) {String} domain_name domain name. |
148 | * @apiParam (URL) {String} id id of domain's record. |
149 | * |
150 | * @apiParam (POST) {String} fieldType FieldType (ex: A, AAAA, NS, CNAME, ...) |
151 | * @apiParam (POST) {String} subDomain subdomain to add |
152 | * @apiParam (POST) {String} target IP of server target |
153 | * @apiParam (POST) {String} ttl TTL |
154 | * |
155 | * |
156 | * @apiSuccessExample Response-Data (example): |
157 | * HTTP/1.1 200 Ok |
158 | * { |
159 | * "status": "ok" |
160 | * } |
161 | * |
162 | * @apiUse EntityError |
163 | */ |
164 | |
165 | /** |
166 | * @api {delete} http://service_ovh/api/ovh/{domain_name}/records/{id} 1.5 Remove One record |
167 | * @apiVersion 1.0.0 |
168 | * @apiName RemoveOneDomainsRecord |
169 | * @apiGroup 1.Domain |
170 | * @apiDescription Remove one ovh domain's record. |
171 | * @apiPermission ovh_domain_view && ovh_domain_edit |
172 | * |
173 | * @apiUse UserId |
174 | * |
175 | * @apiParam (URL) {String} domain_name domain name. |
176 | * @apiParam (URL) {String} id id of domain's record. |
177 | * |
178 | * @apiSuccessExample Response-Data (example): |
179 | * HTTP/1.1 200 Ok |
180 | * { |
181 | * "status": "ok" |
182 | * } |
183 | * |
184 | * @apiUse EntityError |
185 | */ |