-
Notifications
You must be signed in to change notification settings - Fork 1
/
swagger.yaml
4755 lines (4559 loc) · 136 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'
# API metadata
info:
title: AppVeyor REST API
version: 1.0.0
description: |
AppVeyor is a hosted continuous integration service which runs on Microsoft
Windows. The AppVeyor REST API provides a RESTful way to interact with the
AppVeyor service. This includes managing projects, builds, deployments,
and the teams that build them.
Additional help and discussion of the AppVeyor REST API is available at
http://help.appveyor.com/discussions
This Swagger definition is an **unofficial** description of the AppVeyor
REST API maintained at https://github.com/kevinoid/appveyor-swagger
Please report any issues or suggestions for this Swagger definition at
https://github.com/kevinoid/appveyor-swagger/issues/new
#### API Conventions
Fields which are missing from update operations (`PUT` requests) are
typically reset to their default values. So although most fields are not
technically required, they should usually be specified in practice.
contact:
name: AppVeyor Team
email: [email protected]
url: https://www.appveyor.com/about/
termsOfService: https://www.appveyor.com/terms-of-service/
license:
name: AppVeyor End User License Agreement (EULA)
url: https://www.appveyor.com/eula/
x-logo:
url: https://www.appveyor.com/assets/img/appveyor-logo-256.png
x-unofficialSpec: true
# Link to published docs
externalDocs:
description: AppVeyor REST API Documentation
url: https://www.appveyor.com/docs/api/
# Domain of the service
host: ci.appveyor.com
# Protocols the API supports
schemes:
- https
# Path prefix for API paths
basePath: /api
# Supported request types (Content-Type)
consumes:
- application/json
# Supported response types (Accept)
produces:
- application/json
- application/xml
securityDefinitions:
# OpenAPI v3.0 definition:
#apiToken:
# type: http
# scheme: bearer
apiToken:
description: >-
API token can be acquired from https://ci.appveyor.com/api-keys
This value must be passed to the server in the `Authorization` header
as `"Bearer <token>"`. Since [bearer token authentication support is not
explicitly supported in OpenAPI
2.0](https://github.com/OAI/OpenAPI-Specification/issues/583), client
code will vary. Clients created with
[swagger-codegen](https://github.com/swagger-api/swagger-codegen) should
set `apiKeyPrefix` to `"Bearer"` and set `apiKey` to the token. Other
clients may need to set `apiKey` to the string `"Bearer <token>"`.
Note that this should be [fixed in OpenAPI
3.0](https://github.com/OAI/OpenAPI-Specification/pull/807)), whenever
that becomes available and supported.
#### User-Level API Keys
To use a user-level API key (prefixed with "v2."), `basePath` must be
changed to `/api/account/{accountName}` where `{accountName}` is the name
of the account for which requests will be made.
type: apiKey
in: header
name: Authorization
security:
- apiToken: []
tags:
- name: Collaborator
externalDocs:
url: https://www.appveyor.com/docs/api/team/
- name: Role
externalDocs:
url: https://www.appveyor.com/docs/api/team/
- name: User
externalDocs:
url: https://www.appveyor.com/docs/api/team/
- name: Build
externalDocs:
url: https://www.appveyor.com/docs/api/projects-builds/
- name: Project
externalDocs:
url: https://www.appveyor.com/docs/api/projects-builds/
- name: Deployment
externalDocs:
url: https://www.appveyor.com/docs/api/environments-deployments/
- name: Environment
externalDocs:
url: https://www.appveyor.com/docs/api/environments-deployments/
parameters:
### {{{ Teams
roleId:
name: roleId
in: path
description: Role ID
type: integer
required: true
minimum: 0
userId:
name: userId
in: path
description: User ID
type: integer
required: true
minimum: 0
userInvitationId:
name: userInvitationId
in: path
description: User Invitation ID
type: string
required: true
minLength: 1
### }}}
### {{{ Projects and Builds
accountName:
name: accountName
in: path
# Note: copied to accountName server variable for user-level API spec
description: |-
AppVeyor account name on which to operate.
Accounts for which a user has access are listed on the [Security page of
the user profile](https://ci.appveyor.com/security) (when logged in).
The user account is also the `accountName` property of `UserAccount`.
type: string
required: true
minLength: 1
all:
name: all
in: query
description: |-
Include not only `successful`, but also jobs with `failed`, and
`cancelled` status.
type: boolean
default: false
artifactFileName:
name: artifactFileName
in: path
description: |-
File name (or path) of a build artifact file.
Corresponds to the `fileName` property of `ArtifactModel`.
URL-encoding of slashes in parameter values is optional.
type: string
required: true
minLength: 1
badgeRepoProvider:
name: badgeRepoProvider
in: path
description: Repository provider supported for badges
type: string
# Note: Values are case-insensitive.
# Match capitalization of RepositoryProvider for ease of use.
enum:
- bitBucket
- gitHub
required: true
branch:
name: branch
in: query
description: Repository Branch
type: string
minLength: 1
buildBranch:
name: buildBranch
in: path
description: Build Branch
type: string
required: true
buildVersion:
name: buildVersion
in: path
description: Build Version (`version` property of `Build`)
type: string
required: true
job:
name: job
in: query
description: Name of the build job.
type: string
jobId:
name: jobId
in: path
description: Build ID (`jobId` property of `BuildJob`)
type: string
required: true
pr:
name: pr
in: query
description: |
Include PR builds in the search results?
`true` - take artifact from PR builds only;
`false` - do not look for artifact in PR builds;
default/unspecified - look for artifact in both PR an non-PR builds.
type: boolean
projectSlug:
name: projectSlug
in: path
description: Project Slug
type: string
required: true
repoAccountName:
name: repoAccountName
in: path
description: Account name with repository provider
type: string
required: true
minLength: 1
repoSlug:
name: repoSlug
in: path
description: Slug (URL component) of repository.
type: string
required: true
minLength: 1
recordsNumber:
name: recordsNumber
in: query
description: >-
Number of results to include in the response.
getProjectDeployments is documented to have a maximum of 20.
It currently returns 500 Internal Server Error for recordsNumber <= 5.
In the past it has returned 500 Internal Server Error for many different
values which did not match the value used by the ci.appveyor.com web
interface at the time. As of 2018-09-08, the value used by the web
interface is 10.
type: integer
minimum: 0
required: true
startBuildId:
description: Maximum `buildId` to include in the results (exclusive).
name: startBuildId
in: query
type: integer
minimum: 0
statusBadgeId:
name: statusBadgeId
in: path
description: >-
ID of the status badge (`statusBadgeId` from `ProjectWithConfiguration`).
type: string
minLength: 1
required: true
tag:
name: tag
in: query
description: A git (or other VCS) tag
type: string
minLength: 1
### {{{ Status badges
failingText:
name: failingText
in: query
description: Text to show in badge when build is failing.
type: string
# Parameter can be unspecified (not present), but can't be empty
minLength: 1
passingText:
name: passingText
in: query
description: Text to show in badge when build is passing.
type: string
# Parameter can be unspecified (not present), but can't be empty
minLength: 1
pendingText:
name: pendingText
in: query
description: Text to show in badge when build is pending.
type: string
# Parameter can be unspecified (not present), but can't be empty
minLength: 1
retina:
name: retina
in: query
description: >-
Return a larger image suitable for retina displays? Exclusive with `svg`.
type: boolean
default: false
svg:
name: svg
in: query
description: Return an SVG image instead of PNG? Exclusive with `retina`.
type: boolean
default: false
### }}}
### }}}
### {{{ Environments and Deployments
deploymentId:
name: deploymentId
in: path
description: Deployment ID (`deploymentId` property of `Deployment`)
type: integer
minimum: 0
required: true
deploymentEnvironmentId:
name: deploymentEnvironmentId
in: path
description: >
Deployment Environment ID (`deploymentEnvironmentId` property of
`DeploymentEnvironment`)
type: integer
minimum: 0
required: true
### }}}
definitions:
Error:
description: |
Schema of object returned in 4XX and 5XX responses.
Note: The name is unfortunate, since it conflicts with `java.lang.Error`
and other generic error classes. It is the name used in XML responses,
so it is used for consistency and possible future XML deserialization
support.
type: object
properties:
message:
type: string
modelState:
description: |
When present, this property is a map of property names in the format
`request.<capitalized name>` to an `Array` of validation error
message strings for the property.
type: object
additionalProperties:
type: array
items:
type: string
required: [message]
Timestamped:
type: object
properties:
created:
readOnly: true
type: string
format: date-time
updated:
readOnly: true
type: string
format: date-time
UnknownType:
description: |
A schema for values which have an undocumented/unknown type.
Although the type of such values could be left unspecified according to
JSON Schema (and by extension OpenAPI 2.0), such unspecified types cause
tool failures (e.g. swagger-codegen). So this type can be used as a
placeholder to prevent errors and document the behavior.
type: string
enum: [unknown]
### {{{ Teams
BuildNotificationFrequency:
type: string
enum: [all, myCommits, none]
DeploymentNotificationFrequency:
type: string
enum: [all, none]
CollaboratorUpdate:
description: |
Technically `userId` and `roleId` have default value 0 and are not
required, but since user 0 and role 0 never exist it would always cause
a 404 response.
type: object
properties:
userId:
type: integer
minimum: 0
roleId:
type: integer
minimum: 0
# Tested with POST /collaborators 2016-12-29
required: [userId, roleId]
example:
userId: 2018
roleId: 3040
PermissionName:
description: |
Available permission names. The names correspond to the following groups:
#### AccountPermission
- ManageApplicationAuthorizations
- UpdateAccountDetails
- UpdateBillingDetails
#### BuildEnvironmentPermission
- ConfigureBuildEnvironment
#### DenyPermission
- DenyAllProjectsEnvironments
#### EnvironmentsPermission
- DeployToEnvironment
- ManageEnvironments
- UpdateEnvironmentSettings
#### ProjectsPermission
- ManageProjects
- RunProjectBuild
- UpdateProjectSettings
#### RolesPermission
- AddRole
- DeleteRole
- UpdateRoleDetails
#### UserPermission
- ConfigureApiKeys
#### UsersPermission
- AddUser
- DeleteUser
- UpdateUserDetails
type: string
enum:
# AccountPermission:
- ManageApplicationAuthorizations
- UpdateAccountDetails
- UpdateBillingDetails
# BuildEnvironmentPermission:
- ConfigureBuildEnvironment
# DenyPermission:
- DenyAllProjectsEnvironments
# EnvironmentsPermission:
- DeployToEnvironment
- ManageEnvironments
- UpdateEnvironmentSettings
# ProjectsPermission:
- ManageProjects
- RunProjectBuild
- UpdateProjectSettings
# RolesPermission:
- AddRole
- DeleteRole
- UpdateRoleDetails
# UserPermission:
- ConfigureApiKeys
# UsersPermission:
- AddUser
- DeleteUser
- UpdateUserDetails
PermissionState:
type: object
properties:
name:
$ref: '#/definitions/PermissionName'
description:
type: string
allowed:
description: |
State of the named permission. `true` to allow, `false` to deny,
missing to inherit.
type: boolean
required: [name]
GroupName:
type: string
enum:
- Account
- BuildEnvironment
- Deny
- Environments
- Projects
- Roles
- User
- Users
GroupPermissions:
type: object
properties:
name:
$ref: '#/definitions/GroupName'
permissions:
type: array
items:
$ref: '#/definitions/PermissionState'
required: [name, permissions]
RoleAddition:
type: object
properties:
name:
type: string
minLength: 1
required: [name]
example:
name: My Role
Role:
description: |
Technically `roleId` has default value 0 and is not required, but
since role 0 never exists it would always cause a 404 response.
allOf:
- $ref: '#/definitions/Timestamped'
- type: object
properties:
roleId:
type: integer
minimum: 0
name:
type: string
# Tested with PUT /api/roles 2016-12-29
minLength: 1
isSystem:
type: boolean
readOnly: true
# Tested with PUT /api/roles 2016-12-29
# Technically roleId
required: [roleId, name]
RoleWithGroups:
allOf:
- $ref: '#/definitions/Role'
- type: object
properties:
groups:
type: array
items:
$ref: '#/definitions/GroupPermissions'
example:
roleId: 3040
name: My Role
isSystem: false
created: '2014-03-18T20:12:08.4749886+00:00'
groups:
- name: Deny
permissions:
- name: DenyAllProjectsEnvironments
description: Deny all projects and environments, unless explicitly allowed
allowed: false
- name: Projects
permissions:
- name: ManageProjects
description: Create, delete projects, update project settings
allowed: true
- name: UpdateProjectSettings
description: Update project settings
allowed: true
- name: RunProjectBuild
description: Run project builds
allowed: false
- name: DeleteProjectBuilds
description: Delete project builds
allowed: false
- name: Environments
permissions:
- name: ManageEnvironments
description: Create, delete projects, update environment settings
allowed: false
- name: UpdateEnvironmentSettings
description: Update environment settings
allowed: false
- name: DeployToEnvironment
description: Deploy to environment
allowed: false
- name: Account
permissions:
- name: UpdateAccountDetails
description: Update account details
allowed: false
- name: Users
permissions:
- name: AddUser
description: Add new user
allowed: false
- name: UpdateUserDetails
description: Update user details
allowed: false
- name: DeleteUser
description: Delete user
allowed: false
- name: Roles
permissions:
- name: AddRole
description: Add new role
allowed: false
- name: UpdateRoleDetails
description: Update role details
allowed: false
- name: DeleteRole
description: Delete role
allowed: false
- name: User
permissions:
- name: ConfigureApiKeys
description: Generate API keys
allowed: false
InviteUserRequest:
type: object
properties:
email:
type: string
format: email
roleId:
type: integer
minimum: 0
required:
- email
- roleId
UserInvitationModel:
type: object
properties:
userInvitationId:
readOnly: true
type: string
minLength: 1
email:
type: string
format: email
roleId:
type: integer
minimum: 0
roleName:
readOnly: true
type: string
accountId:
readOnly: true
type: integer
accountName:
readOnly: true
type: string
created:
readOnly: true
type: string
format: date-time
required:
- userInvitationId
- email
- roleId
- accountId
- created
JoinAccountRequest:
type: object
properties:
invitationId:
type: string
minLength: 1
required:
- invitationId
SessionUserModel:
allOf:
- $ref: '#/definitions/Timestamped'
- type: object
properties:
userId:
readOnly: true
type: integer
minimum: 0
email:
type: string
format: email
gravatarHash:
type: string
bitBucketUsername:
type: string
gitHubUsername:
type: string
gitLabUserId:
type: string
vsoUsername:
type: string
twoFactorAuthEnabled:
type: boolean
fullName:
type: string
pageSize:
type: integer
minimum: 0
readOnly: true
required:
- userId
- email
PlanName:
type: string
enum:
- free
PlanStatus:
type: string
enum:
- active
FeatureFlags:
type: string
enum:
- distv2
SessionUserAccountModel:
allOf:
- $ref: '#/definitions/Timestamped'
- type: object
properties:
accountId:
readOnly: true
type: integer
minimum: 0
name:
readOnly: true
type: string
isOwner:
readOnly: true
type: boolean
isCollaborator:
readOnly: true
type: boolean
roleId:
type: integer
minimum: 0
roleName:
readOnly: true
type: string
permissions:
type: array
items:
$ref: '#/definitions/PermissionName'
timeZoneId:
type: string
planId:
$ref: '#/definitions/PlanName'
planStart:
readOnly: true
type: string
format: date-time
planEnd:
readOnly: true
type: string
format: date-time
planStatus:
$ref: '#/definitions/PlanStatus'
gitHubPlan:
type: boolean
gitHubPlanOrg:
type: string
unpaid:
type: boolean
unverified:
type: boolean
blocked:
type: boolean
manualPayments:
type: boolean
featureFlags:
$ref: '#/definitions/FeatureFlags'
allowCustomBuildEnvironment:
type: boolean
isEnterprisePlan:
type: boolean
SessionModel:
type: object
properties:
setupRequired:
type: boolean
twoFactorAuthRequired:
type: boolean
user:
$ref: '#/definitions/SessionUserModel'
accounts:
type: array
items:
$ref: '#/definitions/SessionUserAccountModel'
UserAccountSettings:
type: object
properties:
successfulBuildNotification:
$ref: '#/definitions/BuildNotificationFrequency'
failedBuildNotification:
$ref: '#/definitions/BuildNotificationFrequency'
notifyWhenBuildStatusChangedOnly:
description: |
Note that this value is `true` on user creation, but behaves as
`false` when not specified on update.
type: boolean
default: false
successfulDeploymentNotification:
$ref: '#/definitions/DeploymentNotificationFrequency'
failedDeploymentNotification:
$ref: '#/definitions/DeploymentNotificationFrequency'
notifyWhenDeploymentStatusChangedOnly:
description: |
Note that this value is `true` on user creation, but behaves as
`false` when not specified on update.
type: boolean
default: false
# Tested against PUT /users 2016-12-29
required:
- successfulBuildNotification
- failedBuildNotification
- successfulDeploymentNotification
- failedDeploymentNotification
# Note: I would prefer the name User, but User must be used for
# UserGroupPermissions in the due to how discriminator works.
# Item 1 of https://github.com/OAI/OpenAPI-Specification/issues/707
UserAccount:
allOf:
- $ref: '#/definitions/Timestamped'
- type: object
properties:
accountId:
readOnly: true
type: integer
minimum: 0
accountName:
readOnly: true
type: string
isOwner:
readOnly: true
type: boolean
isCollaborator:
readOnly: true
type: boolean
userId:
type: integer
minimum: 0
fullName:
type: string
email:
type: string
format: email
password:
type: string
minLength: 1
format: password
roleId:
type: integer
minimum: 0
roleName:
readOnly: true
type: string
twoFactorAuthEnabled:
type: boolean
pageSize:
type: integer
minimum: 0
readOnly: true
# Tested against PUT /users 2016-12-29
required: [fullName, email]
example:
userId: 3019
fullName: John Smith
email: [email protected]
roleId: 4
successfulBuildNotification: all
failedBuildNotification: all
notifyWhenBuildStatusChangedOnly: true
UserAccountRolesResults:
description: >-
The roles property contains all roles, not only the role for which the
user is a member.
type: object
properties:
user:
$ref: '#/definitions/UserAccount'
roles:
type: array
items:
$ref: '#/definitions/Role'
### Teams }}}
### {{{ Projects and Builds
StringValueObject:
type: object
properties:
value:
type: string
Status:
type: string
enum:
- cancelled
- cancelling
- failed
- queued
- running
- starting
- success
Job:
allOf:
- $ref: '#/definitions/Timestamped'
- type: object
properties:
jobId:
type: string
name:
type: string
status:
$ref: '#/definitions/Status'
started:
type: string
format: date-time
finished:
type: string
format: date-time
OSType:
type: string
enum: [Ubuntu, Windows]
BuildJob:
allOf:
- $ref: '#/definitions/Job'
- type: object
properties:
osType:
$ref: '#/definitions/OSType'
allowFailure:
type: boolean
messagesCount:
type: integer
minimum: 0
compilationMessagesCount:
type: integer
minimum: 0
compilationErrorsCount:
type: integer
minimum: 0
compilationWarningsCount:
type: integer
minimum: 0
testsCount:
type: integer
minimum: 0
passedTestsCount:
type: integer
minimum: 0
failedTestsCount:
type: integer
minimum: 0
artifactsCount:
type: integer
minimum: 0
BuildStartRequest:
type: object
properties:
accountName:
type: string
minLength: 1
projectSlug:
type: string
minLength: 1
branch:
type: string
commitId:
type: string
pullRequestId:
description: Can not be used with `branch` or `commitId`
type: integer
minimum: 1
environmentVariables:
type: object
additionalProperties:
type: string
required: [accountName, projectSlug]
example:
accountName: your-account-name
projectSlug: project-slug-from-url
branch: master
environmentVariables:
my_var: value
another_var: another value