-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
837 lines (830 loc) · 27.4 KB
/
openapi.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
openapi: 3.0.3
info:
title: Visier Profile Management APIs
description: Visier APIs for managing the profiles assigned to users
version: 22222222.99201.1256
license:
name: Apache License, Version 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
x-api-status-urls: false
servers:
- url: https://{vanity-name}.api.visier.io
variables:
vanity-name:
default: vanity
tags:
- name: ProfileManagement
paths:
/v1/admin/profiles:
get:
tags:
- ProfileManagement
summary: Retrieve a list of all profiles
operationId: ProfileManagement_GetAllProfiles
description: >-
This API allows you to get a list of all available profiles. For
administrating tenants,
this retrieves all administrating tenant profiles.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProfilesGetAPIResponseDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/profiles/accessible-tenants:
get:
tags:
- ProfileManagement
summary: Retrieve a list of analytic tenant profiles
operationId: ProfileManagement_GetAnalyticProfiles
description: >-
This API allows you to retrieve a list of profiles available for
analytic tenants.
Note: Administrating tenants only.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProfilesGetAPIResponseDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/profiles/accessible-tenants/{profileId}:
get:
tags:
- ProfileManagement
summary: Retrieve the details of an analytic tenant profile
operationId: ProfileManagement_GetAnalyticProfileDetail
description: |-
This API allows you to get the details of an analytic tenant profile.
Note: Administrating tenants only.
parameters:
- description: The ID of the profile to retrieve details for.
name: profileId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProfileGetAPIResponseDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/profiles/accessible-tenants/{profileId}/assign:
put:
tags:
- ProfileManagement
summary: Assign an analytic tenant profile to administrating tenant users
operationId: ProfileManagement_AssignAnalyticProfile
description: >-
This API allows you to assign an analytic tenant profile to a list of
administrating tenant users
for a list of analytic tenants.
Note:
- Administrating tenants only.
- You can revoke a profile from a user with this request by updating the validityEndTime to be
"less than" the current time (that is, in the past).
parameters:
- description: The ID of the profile to assign.
name: profileId
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessibleTenantProfileAssignmentRequestDTO'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: >-
#/components/schemas/AccessibleTenantProfileAssignmentResponseDTO
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/profiles/accessible-tenants/{profileId}/remove:
delete:
tags:
- ProfileManagement
summary: Remove an analytic tenant profile from administrating tenant users
operationId: ProfileManagement_RemoveAnalyticProfile
description: >-
This API allows you to remove an analytic tenant profile from a list of
administrating tenant users for a list of analytic tenants.
Note: Administrating tenants only.
parameters:
- description: The ID of the profile to remove.
name: profileId
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessibleTenantProfileRevokeRequestDTO'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccessibleTenantProfileRevokeResponseDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/profiles/{profileId}:
get:
tags:
- ProfileManagement
summary: Retrieve the details of a profile
operationId: ProfileManagement_GetProfileDetail
description: >-
This API allows you to get the details of a specific profile. For
administrating tenants, this retrieves
the details of administrating tenant profiles.
parameters:
- description: The ID of the profile to retrieve details for.
name: profileId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProfileGetAPIResponseDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/profiles/{profileId}/assign:
put:
tags:
- ProfileManagement
summary: Assign a profile to a list of users
operationId: ProfileManagement_AssignProfile
description: >-
This API allows you to assign a profile to a list of users. For
administrating tenants,
this assigns an administrating tenant profile to a list of users.
parameters:
- description: The ID of the profile to assign to a list of users.
name: profileId
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LocalTenantProfileAssignmentRequestDTO'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LocalTenantProfileAssignmentResponseDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/profiles/{profileId}/remove:
delete:
tags:
- ProfileManagement
summary: Remove a profile from a list of users
operationId: ProfileManagement_RemoveProfile
description: >-
This API allows you to remove a profile from a list of users. For
administrating tenants, this
removes an administrating tenant profile from a list of users.
parameters:
- description: The ID of the profile to remove to a list of users.
name: profileId
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LocalTenantProfileRevokeRequestDTO'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LocalTenantProfileRevokeResponseDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/users/{userId}/accessible-tenant-profiles:
get:
tags:
- ProfileManagement
summary: Retrieve an administrating tenant user's analytic tenant profiles
operationId: ProfileManagement_GetAnalyticUserProfile
description: >-
This API allows you to retrieve a specified user's assigned profiles for
analytic tenants.
Note: Administrating tenants only.
parameters:
- description: The ID of the user you want to retrieve.
name: userId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AllProfileAssignedForAccessibleTenantDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/admin/users/{userId}/profiles:
get:
tags:
- ProfileManagement
summary: Retrieve a user's profiles
operationId: ProfileManagement_GetUserProfile
description: >-
This API allows you to retrieve a specified user's assigned profiles.
For administrating tenants,
this retrieves a user's administrating tenant profiles.
parameters:
- description: The ID of the user you want to retrieve.
name: userId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AllProfileAssignedForLocalTenantDTO'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
components:
schemas:
AccessibleTenantProfileAssignmentRequestDTO:
type: object
properties:
targetUserIds:
description: A list of users to assign this profile.
type: array
items:
type: string
targetTenantCodes:
description: >-
A list of objects representing the analytic tenants for profiles
assigned to the users.
type: array
items:
$ref: '#/components/schemas/TargetTenantCodeDTO'
validityStartTime:
description: An inclusive date-time when this profile is active.
type: string
validityEndTime:
description: An exclusive date-time when this profile is no longer active.
type: string
AccessibleTenantProfileAssignmentResponseDTO:
type: object
properties:
errors:
description: If true, an error is generated by the request.
type: boolean
badTenantCodes:
description: A list of objects representing any tenants that returned errors.
type: array
items:
$ref: '#/components/schemas/TenantCodeErrorDTO'
badUserIds:
description: A list of objects representing the user IDs that may not be valid.
type: array
items:
$ref: '#/components/schemas/UserIdErrorDTO'
failedAssignments:
description: >-
A list of objects representing any errors during the assignment
operation.
type: array
items:
$ref: '#/components/schemas/FailedAccessibleTenantProfileAssignmentDTO'
successfulAssignments:
description: A list of user IDs that were successfully assigned the profiles.
type: array
items:
$ref: >-
#/components/schemas/SuccessfulAccessibleTenantProfileAssignmentDTO
AccessibleTenantProfileRevokeRequestDTO:
type: object
properties:
targetUserIds:
description: A list of users to remove this profile from.
type: array
items:
type: string
targetTenantCodes:
description: >-
A list of objects representing the analytic tenants for removing
profiles from each target user ID.
type: array
items:
$ref: '#/components/schemas/TargetTenantCodeDTO'
AccessibleTenantProfileRevokeResponseDTO:
type: object
properties:
badTenantCodes:
description: A list of objects representing any tenants that returned errors.
type: array
items:
$ref: '#/components/schemas/ReducedTenantCodeErrorDTO'
badUserIds:
description: A list of objects representing the user IDs that may not be valid.
type: array
items:
$ref: '#/components/schemas/ReducedUserIdErrorDTO'
unaffectedUsers:
description: >-
A list of objects representing the valid user IDs that were not
affected.
type: array
items:
$ref: '#/components/schemas/SuccessfulLocalTenantProfileAssignmentDTO'
succeeded:
description: A list of objects representing the valid user IDs that succeeded.
type: array
items:
$ref: '#/components/schemas/SuccessfulLocalTenantProfileAssignmentDTO'
AdditionalCapabilitiesDTO:
type: object
properties:
additionalCapabilities:
description: The additional capabilities assigned to this profile.
type: array
items:
type: string
AllProfileAssignedForAccessibleTenantDTO:
type: object
properties:
assignedProfilesForAccessibleTenant:
description: >-
A list of objects representing the user profiles assigned to the
user and their validity range.
type: array
items:
$ref: '#/components/schemas/ProfileAssignedForAccessibleTenantDTO'
AllProfileAssignedForLocalTenantDTO:
type: object
properties:
assignedProfiles:
description: >-
A list of objects representing the user profiles assigned to the
user and their validity range.
type: array
items:
$ref: '#/components/schemas/ProfileAssignedForLocalTenantDTO'
CapabilitiesDTO:
type: object
properties:
capability:
description: The name of the capability.
type: string
accessLevel:
description: The access level of the profile for the given capability.
type: string
viewLevel:
description: The view level of the profile for the given capability.
type: string
ErrorDTO:
type: object
properties:
rootCauseId:
description: >-
The root cause identifier that allows Visier to determine the source
of the problem.
type: string
errorCode:
description: A brief identifier of the type of error.
type: string
errorMessage:
description: A description of the error that occurred.
type: string
FailedAccessibleTenantProfileAssignmentDTO:
type: object
properties:
userId:
description: The impacted user ID.
type: string
tenantCode:
description: The tenant code.
type: string
forAllChildren:
description: If true, the target assignment is for all analytic tenants.
type: boolean
error:
$ref: '#/components/schemas/ErrorDTO'
x-konfig-properties:
error:
description: The details about the error.
FailedLocalTenantProfileAssignmentDTO:
type: object
properties:
userId:
description: The impacted user ID.
type: string
error:
$ref: '#/components/schemas/ErrorDTO'
x-konfig-properties:
error:
description: The details about the error.
FailedLocalTenantProfileRevokeDTO:
type: object
properties:
userId:
description: The impacted user ID.
type: string
message:
description: The details about the error.
type: string
GoogleProtobufAny:
description: >-
Contains an arbitrary serialized message along with a @type that
describes the type of the serialized message.
type: object
properties:
'@type':
description: The type of the serialized message.
type: string
additionalProperties: true
LocalTenantProfileAssignmentRequestDTO:
type: object
properties:
targetUserIds:
description: A list of users to assign this profile.
type: array
items:
type: string
validityStartTime:
description: An inclusive date-time when this profile is active.
type: string
validityEndTime:
description: An exclusive date-time when this profile is no longer active.
type: string
LocalTenantProfileAssignmentResponseDTO:
type: object
properties:
errors:
description: If true, an error was generated by the request.
type: boolean
badUserIds:
description: A list of objects representing the user IDs that may not be valid.
type: array
items:
$ref: '#/components/schemas/UserIdErrorDTO'
failedAssignments:
description: >-
A list of objects representing any errors that occurred during the
assignment operation.
type: array
items:
$ref: '#/components/schemas/FailedLocalTenantProfileAssignmentDTO'
successfulAssignments:
description: A list of the user IDs that were successfully assigned the profile.
type: array
items:
$ref: '#/components/schemas/SuccessfulLocalTenantProfileAssignmentDTO'
LocalTenantProfileRevokeRequestDTO:
type: object
properties:
targetUserIds:
description: A list of users to remove this profile from.
type: array
items:
type: string
LocalTenantProfileRevokeResponseDTO:
type: object
properties:
failed:
description: >-
A list of objects representing any errors that occurred during the
assignment operation.
type: array
items:
$ref: '#/components/schemas/FailedLocalTenantProfileRevokeDTO'
succeeded:
description: A list of the user IDs that successfully had a profile removed.
type: array
items:
$ref: '#/components/schemas/SuccessfulLocalTenantProfileAssignmentDTO'
ProfileAssignedForAccessibleTenantDTO:
type: object
properties:
profileId:
description: The unique identifier associated with the profile.
type: string
displayName:
description: >-
An identifiable profile name to display in Visier such as "Partner
Service Manager".
type: string
tenantCode:
description: >-
The tenant code of the analytic tenant on which this profile is
assigned.
type: string
forAllChildren:
description: >-
If true, the profile is assigned for all the analytic tenants of the
administrating tenant.
type: boolean
validityStartTime:
description: |-
An inclusive date-time when this profile is active.
Note: Long.Min_Value means that startTime is undefined.
type: string
validityEndTime:
description: |-
An exclusive date-time when this profile is no longer active.
Note: Long.Max_Value means that endTime is undefined and is equivalent to permanent access.
type: string
ProfileAssignedForLocalTenantDTO:
type: object
properties:
profileId:
description: The unique identifier associated with the profile.
type: string
displayName:
description: >-
An identifiable profile name to display in Visier, such as "Partner
Service Manager".
type: string
validityStartTime:
description: An inclusive date-time when this profile is active.
type: string
validityEndTime:
description: An exclusive date-time when this profile is no longer active.
type: string
capabilities:
description: >-
A list of objects representing the access that this profile has for
the capabilities of this profile.
type: array
items:
$ref: '#/components/schemas/CapabilitiesDTO'
additionalCapabilities:
$ref: '#/components/schemas/AdditionalCapabilitiesDTO'
x-konfig-properties:
additionalCapabilities:
description: >-
A list of the additional capabilities that are assigned to this
profile.
ProfileGetAPIResponseDTO:
type: object
properties:
profileId:
description: The unique identifier associated with the profile.
type: string
displayName:
description: >-
An identifiable profile name to display in Visier. For example,
"Partner Service Manager".
type: string
capabilities:
description: >-
A list of objects representing the access that this profile has for
the capabilities of this profile.
type: array
items:
$ref: '#/components/schemas/CapabilitiesDTO'
additionalCapabilities:
description: >-
A list of the additional capabilities that are assigned to this
profile.
type: array
items:
type: string
ProfilesGetAPIResponseDTO:
type: object
properties:
profiles:
description: A list of objects representing the available profiles.
type: array
items:
$ref: '#/components/schemas/ProfileGetAPIResponseDTO'
ReducedErrorDTO:
type: object
properties:
errorMessage:
description: A meaningful message for the end user.
type: string
ReducedTenantCodeErrorDTO:
type: object
properties:
tenantCode:
description: The bad tenant code.
type: string
forAllChildren:
description: >-
If true, the assignment is for all the analytic tenants of the
specified tenant.
type: boolean
error:
$ref: '#/components/schemas/ReducedErrorDTO'
x-konfig-properties:
error:
description: The details about the error.
ReducedUserIdErrorDTO:
type: object
properties:
userId:
description: The bad user ID.
type: string
error:
$ref: '#/components/schemas/ReducedErrorDTO'
x-konfig-properties:
error:
description: The details about the error.
Status:
description: >-
The `Status` type defines a logical error model that is suitable for
different programming environments, including REST APIs and RPC APIs. It
is used by [gRPC](https://github.com/grpc). Each `Status` message
contains three pieces of data: error code, error message, and error
details. You can find out more about this error model and how to work
with it in the [API Design
Guide](https://cloud.google.com/apis/design/errors).
type: object
properties:
code:
description: >-
The status code, which should be an enum value of
[google.rpc.Code][google.rpc.Code].
type: integer
format: int32
message:
description: >-
A developer-facing error message, which should be in English. Any
user-facing error message should be localized and sent in the
[google.rpc.Status.details][google.rpc.Status.details] field, or
localized by the client.
type: string
details:
description: >-
A list of messages that carry the error details. There is a common
set of message types for APIs to use.
type: array
items:
$ref: '#/components/schemas/GoogleProtobufAny'
SuccessfulAccessibleTenantProfileAssignmentDTO:
type: object
properties:
userId:
description: The user ID.
type: string
tenantCode:
description: The tenant code.
type: string
forAllChildren:
description: If true, the target assignment is for all analytic tenants.
type: boolean
SuccessfulLocalTenantProfileAssignmentDTO:
type: object
properties:
userId:
description: The user ID.
type: string
TargetTenantCodeDTO:
type: object
properties:
tenantCode:
description: The tenant code.
type: string
forAllChildren:
description: >-
If true, the assignment is for all the analytic tenants of the
specified tenant.
type: boolean
TenantCodeErrorDTO:
type: object
properties:
tenantCode:
description: The bad tenant code.
type: string
forAllChildren:
description: If true, the target assignment is for all analytic tenants.
type: boolean
error:
$ref: '#/components/schemas/ErrorDTO'
x-konfig-properties:
error:
description: The details about the error.
UserIdErrorDTO:
type: object
properties:
userId:
description: The bad user ID.
type: string
error:
$ref: '#/components/schemas/ErrorDTO'
x-konfig-properties:
error:
description: The details about the error.
securitySchemes:
CookieAuth:
type: apiKey
name: VisierASIDToken
in: cookie
ApiKeyAuth:
type: apiKey
name: apikey
in: header
BearerAuth:
type: http
scheme: bearer
OAuth2Auth:
type: oauth2
flows:
authorizationCode:
authorizationUrl: /v1/auth/oauth2/authorize
tokenUrl: /v1/auth/oauth2/token
scopes:
read: Grants read access
write: Grants write access
password:
tokenUrl: /v1/auth/oauth2/token
scopes:
read: Grants read access
write: Grants write access
security:
- ApiKeyAuth: []
BearerAuth: []
- ApiKeyAuth: []
CookieAuth: []
- ApiKeyAuth: []
OAuth2Auth: []