github.com/argoproj/argo-cd/v2@v2.10.9/server/application/application.proto (about)

     1  syntax = "proto2";
     2  option go_package = "github.com/argoproj/argo-cd/v2/pkg/apiclient/application";
     3  
     4  // Application Service
     5  //
     6  // Application Service API performs CRUD actions against application resources
     7  package application;
     8  
     9  import "google/api/annotations.proto";
    10  import "k8s.io/api/core/v1/generated.proto";
    11  import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
    12  import "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.proto";
    13  import "github.com/argoproj/argo-cd/v2/reposerver/repository/repository.proto";
    14  
    15  
    16  // ApplicationQuery is a query for application resources. When getting multiple applications, the "projects" field acts
    17  // as a filter. When getting a single application, you may specify either zero or one project. If you specify zero
    18  // projects, the application will be returned regardless of which project it belongs to (assuming you have access). If
    19  // you specify one project, the application will only be returned if it exists and belongs to the specified project.
    20  // Otherwise you will receive a 404.
    21  message ApplicationQuery {
    22  	// the application's name
    23  	optional string name = 1;
    24  	// forces application reconciliation if set to 'hard'
    25  	optional string refresh = 2;
    26  	// the project names to restrict returned list applications
    27  	repeated string projects = 3;
    28  	// when specified with a watch call, shows changes that occur after that particular version of a resource.
    29  	optional string resourceVersion = 4;
    30  	// the selector to restrict returned list to applications only with matched labels
    31  	optional string selector = 5;
    32  	// the repoURL to restrict returned list applications
    33  	optional string repo = 6;
    34  	// the application's namespace
    35  	optional string appNamespace = 7;
    36  	// the project names to restrict returned list applications (legacy name for backwards-compatibility)
    37  	repeated string project = 8;
    38  }
    39  
    40  message NodeQuery {
    41  	// the application's name
    42  	optional string name = 1;
    43  	optional string appNamespace = 2;
    44  }
    45  
    46  message RevisionMetadataQuery{
    47  	// the application's name
    48  	required string name = 1;
    49  	// the revision of the app
    50  	required string revision = 2;
    51  	// the application's namespace
    52  	optional string appNamespace = 3;
    53  	optional string project = 4;
    54  }
    55  
    56  // ApplicationEventsQuery is a query for application resource events
    57  message ApplicationResourceEventsQuery {
    58  	required string name = 1;
    59  	optional string resourceNamespace = 2;
    60  	optional string resourceName = 3;
    61  	optional string resourceUID = 4;
    62  	optional string appNamespace = 5;
    63  	optional string project = 6;
    64  }
    65  
    66  // ManifestQuery is a query for manifest resources
    67  message ApplicationManifestQuery {
    68  	required string name = 1;
    69  	optional string revision = 2;
    70  	optional string appNamespace = 3;
    71  	optional string project = 4;
    72  }
    73  
    74  message FileChunk {
    75  	required bytes chunk = 1;
    76  }
    77  
    78  message ApplicationManifestQueryWithFiles {
    79  	required string name = 1;
    80  	required string checksum = 2;
    81  	optional string appNamespace = 3;
    82  	optional string project = 4;
    83  }
    84  
    85  message ApplicationManifestQueryWithFilesWrapper {
    86  	oneof part {
    87  		ApplicationManifestQueryWithFiles query = 1;
    88  		FileChunk chunk = 2;
    89  	}
    90  }
    91  
    92  message ApplicationResponse {}
    93  
    94  message ApplicationCreateRequest {
    95  	required github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application application = 1;
    96  	optional bool upsert = 2;
    97  	optional bool validate = 3;
    98  }
    99  
   100  message ApplicationUpdateRequest {
   101  	required github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application application = 1;
   102  	optional bool validate = 2;
   103  	optional string project = 3;
   104  }
   105  
   106  message ApplicationDeleteRequest {
   107  	required string name = 1;
   108  	optional bool cascade = 2;
   109  	optional string propagationPolicy = 3;
   110  	optional string appNamespace = 4;
   111  	optional string project = 5;
   112  }
   113  
   114  message SyncOptions {
   115  	repeated string items = 1;
   116  }
   117  
   118  // ApplicationSyncRequest is a request to apply the config state to live state
   119  message ApplicationSyncRequest {
   120  	required string name = 1;
   121  	optional string revision = 2;
   122  	optional bool dryRun = 3;
   123  	optional bool prune = 4;
   124  	optional github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.SyncStrategy strategy = 5;
   125  	repeated github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.SyncOperationResource resources = 7;
   126  	repeated string manifests = 8;
   127  	repeated github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Info infos = 9;
   128  	optional github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.RetryStrategy retryStrategy = 10;
   129  	optional SyncOptions syncOptions = 11;
   130  	optional string appNamespace = 12;
   131  	optional string project = 13;
   132  }
   133  
   134  // ApplicationUpdateSpecRequest is a request to update application spec
   135  message ApplicationUpdateSpecRequest {
   136  	required string name = 1;
   137  	required github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSpec spec = 2;
   138  	optional bool validate = 3;
   139  	optional string appNamespace = 4;
   140  	optional string project = 5;
   141  }
   142  
   143  // ApplicationPatchRequest is a request to patch an application
   144  message ApplicationPatchRequest {
   145  	required string name = 1;
   146  	required string patch = 2;
   147  	required string patchType = 3;
   148  	optional string appNamespace = 5;
   149  	optional string project = 6;
   150  }
   151  
   152  message ApplicationRollbackRequest {
   153  	required string name = 1;
   154  	required int64 id = 2;
   155  	optional bool dryRun = 3;
   156  	optional bool prune = 4;
   157  	optional string appNamespace = 6;
   158  	optional string project = 7;
   159  }
   160  
   161  message ApplicationResourceRequest {
   162  	required string name = 1;
   163  	optional string namespace = 2;
   164  	required string resourceName = 3;
   165  	required string version = 4;
   166  	optional string group = 5;
   167  	required string kind = 6;
   168  	optional string appNamespace = 7;
   169  	optional string project = 8;
   170  }
   171  
   172  message ApplicationResourcePatchRequest {
   173  	required string name = 1;
   174  	optional string namespace = 2;
   175  	required string resourceName = 3;
   176  	required string version = 4;
   177  	optional string group = 5;
   178  	required string kind = 6;
   179  	required string patch = 7;
   180  	required string patchType = 8;
   181  	optional string appNamespace = 9;
   182  	optional string project = 10;
   183  }
   184  
   185  message ApplicationResourceDeleteRequest {
   186  	required string name = 1;
   187  	optional string namespace = 2;
   188  	required string resourceName = 3;
   189  	required string version = 4;
   190  	optional string group = 5;
   191  	required string kind = 6;
   192  	optional bool force = 7;
   193  	optional bool orphan = 8;
   194  	optional string appNamespace = 9;
   195  	optional string project = 10;
   196  }
   197  
   198  message ResourceActionRunRequest {
   199  	required string name = 1;
   200  	optional string namespace = 2;
   201  	required string resourceName = 3;
   202  	required string version = 4;
   203  	optional string group = 5;
   204  	required string kind = 6;
   205  	required string action = 7;
   206  	optional string appNamespace = 8;
   207  	optional string project = 9;
   208  }
   209  
   210  message ResourceActionsListResponse {
   211  	repeated github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ResourceAction actions = 1;
   212  }
   213  
   214  message ApplicationResourceResponse {
   215  	required string manifest = 1;
   216  }
   217  
   218  message ApplicationPodLogsQuery {
   219  	required string name = 1;
   220  	optional string namespace = 2;
   221  	optional string podName = 3;
   222  	optional string container = 4;
   223  	optional int64 sinceSeconds = 5;
   224  	optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 6;
   225  	optional int64 tailLines = 7;
   226  	optional bool follow = 8;
   227  	optional string untilTime = 9;
   228  	optional string filter = 10;
   229  	optional string kind = 11;
   230  	optional string group = 12;
   231  	optional string resourceName = 13 ;
   232  	optional bool previous = 14;
   233  	optional string appNamespace = 15;
   234  	optional string project = 16;
   235  }
   236  
   237  message LogEntry {
   238  	required string content = 1;
   239  	// deprecated in favor of timeStampStr since meta.v1.Time don't support nano time
   240  	required k8s.io.apimachinery.pkg.apis.meta.v1.Time timeStamp = 2;
   241  	required bool last = 3;
   242  	required string timeStampStr = 4;
   243  	required string podName = 5;
   244  }
   245  
   246  message OperationTerminateRequest {
   247  	required string name = 1;
   248  	optional string appNamespace = 2;
   249  	optional string project = 3;
   250  }
   251  
   252  message ApplicationSyncWindowsQuery {
   253  	required string name = 1;
   254  	optional string appNamespace = 2;
   255  	optional string project = 3;
   256  }
   257  
   258  message ApplicationSyncWindowsResponse {
   259  	repeated ApplicationSyncWindow activeWindows = 1;
   260  	repeated ApplicationSyncWindow assignedWindows = 2;
   261  	required bool canSync = 3;
   262  }
   263  
   264  message ApplicationSyncWindow {
   265  	required string kind = 1;
   266  	required string schedule = 2;
   267  	required string duration = 3;
   268  	required bool manualSync = 4;
   269  }
   270  
   271  message OperationTerminateResponse {
   272  }
   273  
   274  
   275  message ResourcesQuery {
   276  	required string applicationName = 1;
   277  
   278  	optional string namespace = 2;
   279  	optional string name = 3;
   280  	optional string version = 4;
   281  	optional string group = 5;
   282  	optional string kind = 6;
   283  	optional string appNamespace = 7;
   284  	optional string project = 8;
   285  }
   286  
   287  message ManagedResourcesResponse {
   288  	repeated github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ResourceDiff items = 1;
   289  }
   290  
   291  message LinkInfo {
   292  	required string title = 1;
   293  	required string url = 2;
   294  	optional string description = 3;
   295  	optional string iconClass = 4;
   296  }
   297  
   298  message LinksResponse {
   299  	repeated LinkInfo items = 1;
   300  }
   301  
   302  message ListAppLinksRequest {
   303  	required string name = 1;
   304  	optional string namespace = 3;
   305  	optional string project = 4;
   306  }
   307  
   308  
   309  // ApplicationService
   310  service ApplicationService {
   311  
   312  	// List returns list of applications
   313  	rpc List(ApplicationQuery) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationList) {
   314  		option (google.api.http).get = "/api/v1/applications";
   315  	}
   316  
   317  	// ListResourceEvents returns a list of event resources
   318  	rpc ListResourceEvents(ApplicationResourceEventsQuery) returns (k8s.io.api.core.v1.EventList) {
   319  		option (google.api.http).get = "/api/v1/applications/{name}/events";
   320  	}
   321  
   322  	// Watch returns stream of application change events
   323  	rpc Watch(ApplicationQuery) returns (stream github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationWatchEvent) {
   324  		option (google.api.http).get = "/api/v1/stream/applications";
   325  	}
   326  
   327  	// Create creates an application
   328  	rpc Create (ApplicationCreateRequest) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application) {
   329  		option (google.api.http) = {
   330  			post: "/api/v1/applications"
   331  			body: "application"
   332  		};
   333  	}
   334  
   335  	// Get returns an application by name
   336  	rpc Get (ApplicationQuery) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application) {
   337  		option (google.api.http).get = "/api/v1/applications/{name}";
   338  	}
   339  
   340  	// Get returns sync windows of the application
   341  	rpc GetApplicationSyncWindows (ApplicationSyncWindowsQuery) returns (ApplicationSyncWindowsResponse) {
   342  		option (google.api.http).get = "/api/v1/applications/{name}/syncwindows";
   343  	}
   344  
   345  	// Get the meta-data (author, date, tags, message) for a specific revision of the application
   346  	rpc RevisionMetadata (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.RevisionMetadata) {
   347  		option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/metadata";
   348  	}
   349  
   350  	// Get the chart metadata (description, maintainers, home) for a specific revision of the application
   351  	rpc RevisionChartDetails (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ChartDetails) {
   352  		option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/chartdetails";
   353  	}
   354  
   355  	// GetManifests returns application manifests
   356  	rpc GetManifests (ApplicationManifestQuery) returns (repository.ManifestResponse) {
   357  		option (google.api.http).get = "/api/v1/applications/{name}/manifests";
   358  	}
   359  
   360  	// GetManifestsWithFiles returns application manifests using provided files to generate them
   361  	rpc GetManifestsWithFiles (stream ApplicationManifestQueryWithFilesWrapper) returns (repository.ManifestResponse) {
   362  		option (google.api.http) = {
   363  			post: "/api/v1/applications/manifestsWithFiles"
   364  			body: "*"
   365  		};
   366  	}
   367  
   368  	// Update updates an application
   369  	rpc Update(ApplicationUpdateRequest) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application) {
   370  		option (google.api.http) = {
   371  			put: "/api/v1/applications/{application.metadata.name}"
   372  			body: "application"
   373  		};
   374  	}
   375  
   376  	// UpdateSpec updates an application spec
   377  	rpc UpdateSpec(ApplicationUpdateSpecRequest) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSpec) {
   378  		option (google.api.http) = {
   379  			put: "/api/v1/applications/{name}/spec"
   380  			body: "spec"
   381  		};
   382  	}
   383  
   384  	// Patch patch an application
   385  	rpc Patch(ApplicationPatchRequest) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application) {
   386  		option (google.api.http) = {
   387  			patch: "/api/v1/applications/{name}"
   388  			body: "*"
   389  		};
   390  	}
   391  
   392  	// Delete deletes an application
   393  	rpc Delete(ApplicationDeleteRequest) returns (ApplicationResponse) {
   394  		option (google.api.http).delete = "/api/v1/applications/{name}";
   395  	}
   396  
   397  	// Sync syncs an application to its target state
   398  	rpc Sync(ApplicationSyncRequest) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application) {
   399  		option (google.api.http) = {
   400  			post: "/api/v1/applications/{name}/sync"
   401  			body: "*"
   402  		};
   403  	}
   404  
   405  	// ManagedResources returns list of managed resources
   406  	rpc ManagedResources(ResourcesQuery) returns (ManagedResourcesResponse) {
   407  		option (google.api.http).get = "/api/v1/applications/{applicationName}/managed-resources";
   408  	}
   409  
   410  	// ResourceTree returns resource tree
   411  	rpc ResourceTree(ResourcesQuery) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationTree) {
   412  		option (google.api.http).get = "/api/v1/applications/{applicationName}/resource-tree";
   413  	}
   414  
   415  	// Watch returns stream of application resource tree
   416  	rpc WatchResourceTree(ResourcesQuery) returns (stream github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationTree) {
   417  		option (google.api.http).get = "/api/v1/stream/applications/{applicationName}/resource-tree";
   418  	}
   419  
   420  	// Rollback syncs an application to its target state
   421  	rpc Rollback(ApplicationRollbackRequest) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application) {
   422  		option (google.api.http) = {
   423  			post: "/api/v1/applications/{name}/rollback"
   424  			body: "*"
   425  		};
   426  	}
   427  
   428  	// TerminateOperation terminates the currently running operation
   429  	rpc TerminateOperation(OperationTerminateRequest) returns (OperationTerminateResponse) {
   430  		option (google.api.http) = {
   431  			delete: "/api/v1/applications/{name}/operation";
   432  		};
   433  	}
   434  
   435  	// GetResource returns single application resource
   436  	rpc GetResource(ApplicationResourceRequest) returns (ApplicationResourceResponse) {
   437  		option (google.api.http).get = "/api/v1/applications/{name}/resource";
   438  	}
   439  
   440  	// PatchResource patch single application resource
   441  	rpc PatchResource(ApplicationResourcePatchRequest) returns (ApplicationResourceResponse) {
   442  		option (google.api.http) = {
   443  			post: "/api/v1/applications/{name}/resource"
   444  			body: "patch"
   445  		};
   446  	}
   447  
   448  	// ListResourceActions returns list of resource actions
   449  	rpc ListResourceActions(ApplicationResourceRequest) returns (ResourceActionsListResponse) {
   450  		option (google.api.http).get = "/api/v1/applications/{name}/resource/actions";
   451  	}
   452  
   453  	// RunResourceAction run resource action
   454  	rpc RunResourceAction(ResourceActionRunRequest) returns (ApplicationResponse) {
   455  		option (google.api.http) = {
   456  			post: "/api/v1/applications/{name}/resource/actions"
   457  			body: "action"
   458  		};
   459  	}
   460  
   461  	// DeleteResource deletes a single application resource
   462  	rpc DeleteResource(ApplicationResourceDeleteRequest) returns (ApplicationResponse) {
   463  		option (google.api.http).delete = "/api/v1/applications/{name}/resource";
   464  	}
   465  
   466  	// PodLogs returns stream of log entries for the specified pod. Pod
   467  	rpc PodLogs(ApplicationPodLogsQuery) returns (stream LogEntry) {
   468  		option (google.api.http) = {
   469  			get: "/api/v1/applications/{name}/pods/{podName}/logs"
   470  			additional_bindings {
   471  				get: "/api/v1/applications/{name}/logs"
   472  			}
   473  		};
   474  	}
   475  
   476  	// ListLinks returns the list of all application deep links
   477  	rpc ListLinks(ListAppLinksRequest) returns (LinksResponse) {
   478  		option (google.api.http).get = "/api/v1/applications/{name}/links";
   479  	}
   480  
   481  	// ListResourceLinks returns the list of all resource deep links
   482  	rpc ListResourceLinks(ApplicationResourceRequest) returns (LinksResponse) {
   483  		option (google.api.http).get = "/api/v1/applications/{name}/resource/links";
   484  	}
   485  }