-
Notifications
You must be signed in to change notification settings - Fork 2
/
swagger.yaml
1542 lines (1495 loc) · 45.3 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
swagger: "2.0"
info:
version: "1.4.1"
title: "🏹 Archer"
contact:
name: SAP SE / Converged Cloud
url: https://sap.com
license:
name: "Apache 2.0"
url: "https://www.apache.org/licenses/LICENSE-2.0.html"
x-logo:
url: "https://avatars.githubusercontent.com/u/4242847"
backgroundColor: "#FFFFFF"
altText: "Archer logo"
description: |
# Documentation
Archer is an API service that can privately connect services from one private [OpenStack Network](https://docs.openstack.org/neutron/latest/admin/intro-os-networking.html) to another. Consumers can select a *service* from a service catalog and **inject** it to their network, which means making this *service* available via a private ip address.
Archer implements an *OpenStack* like API and integrates with *OpenStack Keystone* and *OpenStack Neutron*.
### Architecture
There are two types of resources: **services** and **endpoints**
* **Services** are private or public services that are manually configured in *Archer*. They can be accessed by creating an endpoint.
* **Service endpoints**, or short **endpoints**, are IP endpoints in a local network used to transparently access services residing in different private networks.
### Features
* Multi-tenant capable via OpenStack Identity service
* OpenStack `policy.json` access policy support
* Prometheus Exporter
* Rate limiting
### Supported Backends
* F5 BigIP
### Requirements
* PostgreSQL Database
## API properties
This section describes properties of the Archer API. It uses a ReSTful HTTP API.
#### Request format
The Archer API only accepts requests with the JSON data serialization format. The Content-Type header for POST requests is always expected to be `application/json`.
#### Response format
The Archer API always response with JSON data serialization format. The Content-Type header is always `Content-Type: application/json`.
#### Authentication and authorization
The **Archer API** uses the OpenStack Identity service as the default authentication service. When Keystone is enabled, users that submit requests to the OpenStack Networking service must provide an authentication token in `X-Auth-Token` request header.
You obtain the token by authenticating to the Keystone endpoint.
When Keystone is enabled, the `project_id` attribute is not required in create requests because the project ID is derived from the authentication token.
#### Pagination
To reduce load on the service, list operations will return a maximum number of items at a time. To navigate the collection, the parameters limit, marker and page_reverse can be set in the URI. For example:
```
?limit=100&marker=1234&page_reverse=False
```
The `marker` parameter is the ID of the last item in the previous list. The `limit` parameter sets the page size. The `page_reverse` parameter sets the page direction.
These parameters are optional.
If the client requests a limit beyond the maximum limit configured by the deployment, the server returns the maximum limit number of items.
For convenience, list responses contain atom **next** links and **previous** links. The last page in the list requested with `page_reverse=False` will not contain **next** link, and the last page in the list requested with `page_reverse=True` will not contain **previous** link.
To determine if pagination is supported, a user can check whether the `pagination` capability is available through the Archer API detail endpoint.
#### Sorting
You can use the `sort` parameter to sort the results of list operations.
The sort parameter contains a comma-separated list of sort keys, in order of the sort priority. Each sort key can be optionally prepended with a minus **-** character to reverse default sort direction (ascending).
For example:
```
?sort=key1,-key2,key3
```
**key1** is the first key (ascending order), **key2** is the second key (descending order) and **key3** is the third key in ascending order.
To determine if sorting is supported, a user can check whether the `sort` capability is available through the Archer API detail endpoint.
#### Filtering by tags
Most resources (e.g. service and endpoint) support adding tags to the resource attributes. Archer supports advanced filtering using these tags for list operations. The following tag filters are supported by the Archer API:
* `tags` - Return the list of entities that have this tag or tags.
* `tags-any` - Return the list of entities that have one or more of the given tags.
* `not-tags` - Return the list of entities that do not have one or more of the given tags.
* `not-tags-any` - Return the list of entities that do not have at least one of the given tags.
Each tag supports a maximum amount of 64 characters.
For example to get a list of resources having both, **red** and **blue** tags:
```
?tags=red,blue
```
To get a list of resourcing having either, **red** or **blue** tags:
```
?tags-any=red,blue
```
Tag filters can also be combined in the same request:
```
?tags=red,blue&tags-any=green,orange
```
#### Response Codes (Faults)
| Code | Description |
| ----- | ----------------- |
| 400 | Validation Error |
| 401 | Unauthorized |
| 403 | Policy does not allow current user to do this <br> The project is over quota for the request |
| 404 | Not Found <br> Resource not found |
| 409 | Conflict |
| 422 | Unprocessable Entity |
| 429 | You have reached maximum request limit |
| 500 | Internal server error |
## Endpoint identification
Archer supports the Proxy Protocol v2 for endpoint identification.
The Proxy Protocol is a widely used protocol for passing client connection information through a load balancer to the backend server. It is used to identify the original client IP address and port number. The Proxy Protocol v2 is a binary protocol that is more efficient than the original text-based Proxy Protocol v1.
The proxy protocol header also includes the ID of the endpoint. This information is encoded using a custom Type-Length-Value (TLV) vector as follows.
| Field | Length (Octets) | Description |
| ----- | --------------- | -------------------------------------------------------------- |
| Type | 1 | PP2_TYPE_SAPCC (0xEC) |
| Length| 2 | Length of the value (UUIDv4 is always 36 byte as ASCII string) |
| Value | 36 | ASCII UUID of the endpoint |
externalDocs:
description: GitHub
url: https://github.com/sapcc/archer
consumes:
- application/json
produces:
- application/json
tags:
- name: Version
description: |
### Version API
Lists information of enabled Archer capabilities.
- name: Service
description: |
### Services
Services are for publishing TCP/UDP services using internal IP addresses in your private network.
- name: Endpoint
description: |
### Endpoints
Endpoints are for accessing existing Services using internal IP addresses in your private network.
- name: RBAC
x-go-name: rbac
description: |
### RBAC Policies
RBAC Policies are used to provide service visibility to specific project or domains.
- name: Quota
description: |
### Quota Operations
Administrative API for listing and setting quotas for services and endpoints.
schemes:
- "https"
- "http"
security:
- "X-Auth-Token": []
- {}
securityDefinitions:
"X-Auth-Token":
type: "apiKey"
description: |
The **Archer API** uses the OpenStack Identity service as the default authentication service. When Keystone is enabled, users that submit requests to the OpenStack Networking service must provide an authentication token in `X-Auth-Token` request header.
You obtain the token by authenticating to the Keystone endpoint.
name: "X-Auth-Token"
in: "header"
paths:
/:
get:
security: []
tags:
- Version
summary: Shows details for Archer API
responses:
200:
description: Version
schema:
$ref: "#/definitions/Version"
/service:
get:
tags:
- Service
summary: List services
x-policy: service:read
parameters:
- $ref: '#/parameters/marker'
- $ref: '#/parameters/limit'
- $ref: '#/parameters/sort'
- $ref: '#/parameters/page_reverse'
- $ref: '#/parameters/tags'
- $ref: '#/parameters/tags-any'
- $ref: '#/parameters/not-tags'
- $ref: '#/parameters/not-tags-any'
- $ref: '#/parameters/project_id'
responses:
200:
description: An array of services.
schema:
type: object
properties:
links:
x-omitempty: true
type: array
items:
$ref: '#/definitions/Link'
items:
type: array
items:
$ref: "#/definitions/Service"
400:
description: Bad request
schema:
$ref: "#/definitions/Error"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
post:
tags:
- Service
summary: Add a new service to the catalog
x-policy: service:create
parameters:
- in: body
name: body
description: Service object that needs to be added to the catalog
required: true
schema:
$ref: "#/definitions/Service"
responses:
201:
description: Service
schema:
$ref: "#/definitions/Service"
headers:
X-Target-Id:
type: string
format: uuid
description: "The UUID of the created resource"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
schema:
$ref: "#/definitions/Error"
409:
description: Duplicate entry
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/service/{service_id}:
parameters:
- in: path
name: service_id
required: true
type: string
format: uuid
description: The UUID of the service
get:
tags:
- Service
summary: Show details of an service
x-policy: service:read
responses:
200:
description: Service
schema:
$ref: "#/definitions/Service"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
put:
tags:
- Service
summary: Update an existing service
x-policy: service:update
parameters:
- in: body
name: body
description: Service object that needs to be updated
required: true
schema:
$ref: "#/definitions/ServiceUpdatable"
responses:
200:
description: Service
schema:
$ref: "#/definitions/Service"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
409:
description: Duplicate entry
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
delete:
tags:
- Service
summary: Remove service from catalog
x-policy: service:delete
description: |
Deletes this service. There **must** be no active associated endpoint for successfully deleting the service.
Active endpoints can be rejected by the service owner via the `/service/{service_id}/reject_endpoints` API.
responses:
202:
description: Delete request successfully accepted.
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
409:
description: In use.
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/service/{service_id}/endpoints:
parameters:
- in: path
name: service_id
required: true
type: string
format: uuid
description: The UUID of the service
get:
tags:
- Service
summary: List service endpoints consumers
x-policy: service-endpoint:read
description: |
Provides a list of service consumers (endpoints).
This list can be used to accept or reject requests, or disable active endpoints.
Rejected endpoints will be cleaned up after a specific time.
parameters:
- $ref: '#/parameters/marker'
- $ref: '#/parameters/limit'
- $ref: '#/parameters/sort'
- $ref: '#/parameters/page_reverse'
responses:
200:
description: An array of service endpoint consumers.
schema:
type: object
properties:
links:
x-omitempty: true
type: array
items:
$ref: '#/definitions/Link'
items:
type: array
items:
$ref: "#/definitions/EndpointConsumer"
400:
description: Bad request
schema:
$ref: "#/definitions/Error"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/service/{service_id}/accept_endpoints:
parameters:
- in: path
name: service_id
required: true
type: string
format: uuid
description: The UUID of the service
put:
summary: Accept endpoints
x-policy: service-endpoint:accept
description: |
Specify a list of endpoint consumers (`endpoint_ids` and/or `project_ids`) whose endpoints should be accepted.
* Existing active endpoints will be untouched.
* Rejected endpoints will be accepted.
* Pending endpoints will be accepted.
tags:
- Service
parameters:
- in: body
name: body
description: Service object that needs to be updated
required: true
schema:
$ref: "#/definitions/EndpointConsumerList"
responses:
200:
description: Ok
schema:
type: array
items:
$ref: "#/definitions/EndpointConsumer"
400:
description: Must declare at least one, endpoint_id(s) or project_id(s)
schema:
$ref: "#/definitions/Error"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
schema:
$ref: "#/definitions/Error"
404:
description: Not Found
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/service/{service_id}/reject_endpoints:
parameters:
- in: path
name: service_id
required: true
type: string
format: uuid
description: The UUID of the service
put:
summary: Reject endpoints
x-policy: service-endpoint:reject
description: |
Specify a list of consumers (`endpoint_ids` and/or `project_ids`) whose endpoints should be rejected.
* Existing active endpoints will be rejected.
* Rejected endpoints will be untouched.
* Pending endpoints will be rejected.
tags:
- Service
parameters:
- in: body
name: body
description: Service object that needs to be updated
required: true
schema:
$ref: "#/definitions/EndpointConsumerList"
responses:
200:
description: Ok
schema:
type: array
items:
$ref: "#/definitions/EndpointConsumer"
400:
description: Must declare at least one, endpoint_id(s) or project_id(s)
schema:
$ref: "#/definitions/Error"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
schema:
$ref: "#/definitions/Error"
404:
description: Not Found
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/endpoint:
get:
tags:
- Endpoint
summary: List existing service endpoints
x-policy: endpoint:read
parameters:
- $ref: '#/parameters/marker'
- $ref: '#/parameters/limit'
- $ref: '#/parameters/sort'
- $ref: '#/parameters/page_reverse'
- $ref: '#/parameters/tags'
- $ref: '#/parameters/tags-any'
- $ref: '#/parameters/not-tags'
- $ref: '#/parameters/not-tags-any'
- $ref: '#/parameters/project_id'
responses:
200:
description: An array of endpoints.
schema:
type: object
properties:
links:
x-omitempty: true
type: array
items:
$ref: '#/definitions/Link'
items:
type: array
items:
$ref: "#/definitions/Endpoint"
400:
description: Bad request
schema:
$ref: "#/definitions/Error"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
post:
tags:
- Endpoint
summary: Create endpoint for accessing a service
x-policy: endpoint:create
parameters:
- in: body
name: body
description: Service and target network to inject. Only one of `target_network`, `target_subnet` or `target_port` must be specified.
required: true
schema:
$ref: "#/definitions/Endpoint"
responses:
201:
description: Endpoint
schema:
$ref: "#/definitions/Endpoint"
headers:
X-Target-Id:
type: string
format: uuid
description: "The UUID of the created resource"
400:
description: Bad request
schema:
$ref: "#/definitions/Error"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/endpoint/{endpoint_id}:
parameters:
- in: path
name: endpoint_id
required: true
type: string
format: uuid
description: The UUID of the endpoint
get:
tags:
- Endpoint
summary: Show existing service endpoint
x-policy: endpoint:read
responses:
200:
description: An endpoint detail.
schema:
$ref: "#/definitions/Endpoint"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
schema:
$ref: "#/definitions/Error"
404:
description: Not Found
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
put:
tags:
- Endpoint
summary: Update an existing endpoint
x-policy: endpoint:update
parameters:
- in: body
name: body
description: Endpoint object that needs to be updated
required: true
schema:
type: object
properties:
tags:
type: array
description: The list of tags on the resource.
x-nullable: true
items:
type: string
maxLength: 64
name:
type: string
description: Name of the endpoint.
example: Example endpoint.
maxLength: 64
x-nullable: true
description:
type: string
description: Description of the endpoint.
example: An example of an endpoint.
maxLength: 255
x-nullable: true
responses:
200:
description: Endpoint
schema:
$ref: "#/definitions/Endpoint"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
schema:
$ref: "#/definitions/Error"
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
delete:
tags:
- Endpoint
summary: Remove an existing endpoint
x-policy: endpoint:delete
responses:
202:
description: Delete request successfully accepted.
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
schema:
$ref: "#/definitions/Error"
404:
description: Not Found
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/rbac-policies:
get:
tags:
- RBAC
summary: List RBAC policies
x-policy: rbac-policy:read
parameters:
- $ref: '#/parameters/marker'
- $ref: '#/parameters/limit'
- $ref: '#/parameters/sort'
- $ref: '#/parameters/page_reverse'
responses:
200:
description: A JSON array of rbac policies
schema:
type: object
properties:
links:
x-omitempty: true
type: array
items:
$ref: '#/definitions/Link'
items:
type: array
items:
$ref: "#/definitions/RBACPolicy"
400:
description: Bad request
schema:
$ref: "#/definitions/Error"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
post:
tags:
- RBAC
summary: Create RBAC policy
x-policy: rbac-policy:create
parameters:
- in: body
name: body
description: RBAC Policy
required: true
schema:
$ref: "#/definitions/RBACPolicy"
responses:
201:
description: RBAC policy
schema:
$ref: '#/definitions/RBACPolicy'
headers:
X-Target-Id:
type: string
format: uuid
description: "The UUID of the created resource"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
404:
description: service_id not found
409:
description: Duplicate RBAC Policy
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/rbac-policies/{rbac_policy_id}:
parameters:
- in: path
name: rbac_policy_id
required: true
type: string
format: uuid
description: The UUID of the RBAC policy.
get:
tags:
- RBAC
summary: Show details of an RBAC policy
x-policy: rbac-policy:read
responses:
200:
description: RBAC Policy
schema:
$ref: '#/definitions/RBACPolicy'
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
put:
tags:
- RBAC
summary: Update an existing RBAC policy
x-policy: rbac-policy:update
parameters:
- in: body
name: body
description: RBAC policy resource that needs to be updated
required: true
schema:
$ref: "#/definitions/RBACPolicyCommon"
responses:
200:
description: RBAC Policy
schema:
$ref: "#/definitions/RBACPolicy"
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
409:
description: Duplicate RBAC Policy
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
delete:
tags:
- RBAC
summary: Delete RBAC policy
x-policy: rbac-policy:delete
responses:
204:
description: RBAC policy successfully deleted.
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/quotas:
parameters:
- in: query
name: project_id
type: string
description: The ID of the project to query.
minLength: 32
maxLength: 32
get:
tags:
- Quota
summary: List Quotas
x-policy: quota:read
responses:
200:
description: A JSON array of quotas
schema:
type: object
properties:
quotas:
type: array
items:
allOf:
- $ref: '#/definitions/Quota'
- $ref: '#/definitions/QuotaUsage'
- type: object
properties:
project_id:
$ref: "#/definitions/Project"
links:
x-omitempty: true
type: array
items:
$ref: '#/definitions/Link'
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
404:
description: Not Found
schema:
$ref: "#/definitions/Error"
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/quotas/defaults:
get:
tags:
- Quota
summary: Show Quota Defaults
x-policy: quota:read-defaults
responses:
200:
description: Show the quota defaults configured for new projects.
schema:
type: object
properties:
quota:
$ref: '#/definitions/Quota'
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
/quotas/{project_id}:
parameters:
- in: path
name: project_id
required: true
type: string
description: The ID of the project to query.
get:
tags:
- Quota
summary: Show Quota detail
x-policy: quota:read
responses:
200:
description: Shows the details of a specific monitor.
schema:
allOf:
- $ref: '#/definitions/Quota'
- $ref: '#/definitions/QuotaUsage'
401:
description: Unauthorized
schema:
$ref: "#/definitions/Error"
403:
description: Forbidden
422:
description: Unprocessable Content
schema:
$ref: "#/definitions/Error"
put:
tags:
- Quota
summary: Update Quota
x-policy: quota:update
parameters:
- in: body
name: body
required: true
schema:
$ref: '#/definitions/Quota'