github.com/argoproj/argo-cd/v3@v3.2.1/server/application/application.proto (about)

     1  syntax = "proto2";
     2  option go_package = "github.com/argoproj/argo-cd/v3/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/v3/pkg/apis/application/v1alpha1/generated.proto";
    13  import "github.com/argoproj/argo-cd/v3/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  	// source index (for multi source apps)
    55  	optional int32 sourceIndex = 5;
    56  	// versionId from historical data (for multi source apps)
    57  	optional int32 versionId = 6;
    58  }
    59  
    60  // ApplicationEventsQuery is a query for application resource events
    61  message ApplicationResourceEventsQuery {
    62  	required string name = 1;
    63  	optional string resourceNamespace = 2;
    64  	optional string resourceName = 3;
    65  	optional string resourceUID = 4;
    66  	optional string appNamespace = 5;
    67  	optional string project = 6;
    68  }
    69  
    70  // ManifestQuery is a query for manifest resources
    71  message ApplicationManifestQuery {
    72  	required string name = 1;
    73  	optional string revision = 2;
    74  	optional string appNamespace = 3;
    75  	optional string project = 4;
    76  	repeated int64 sourcePositions = 5;
    77  	repeated string revisions = 6;
    78  	optional bool noCache = 7;
    79  }
    80  
    81  message FileChunk {
    82  	required bytes chunk = 1;
    83  }
    84  
    85  message ApplicationManifestQueryWithFiles {
    86  	required string name = 1;
    87  	required string checksum = 2;
    88  	optional string appNamespace = 3;
    89  	optional string project = 4;
    90  }
    91  
    92  message ApplicationManifestQueryWithFilesWrapper {
    93  	oneof part {
    94  		ApplicationManifestQueryWithFiles query = 1;
    95  		FileChunk chunk = 2;
    96  	}
    97  }
    98  
    99  message ApplicationResponse {}
   100  
   101  message ApplicationCreateRequest {
   102  	required github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application application = 1;
   103  	optional bool upsert = 2;
   104  	optional bool validate = 3;
   105  }
   106  
   107  message ApplicationUpdateRequest {
   108  	required github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application application = 1;
   109  	optional bool validate = 2;
   110  	optional string project = 3;
   111  }
   112  
   113  message ApplicationDeleteRequest {
   114  	required string name = 1;
   115  	optional bool cascade = 2;
   116  	optional string propagationPolicy = 3;
   117  	optional string appNamespace = 4;
   118  	optional string project = 5;
   119  }
   120  
   121  message SyncOptions {
   122  	repeated string items = 1;
   123  }
   124  
   125  // ApplicationSyncRequest is a request to apply the config state to live state
   126  message ApplicationSyncRequest {
   127  	required string name = 1;
   128  	optional string revision = 2;
   129  	optional bool dryRun = 3;
   130  	optional bool prune = 4;
   131  	optional github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.SyncStrategy strategy = 5;
   132  	repeated github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.SyncOperationResource resources = 7;
   133  	repeated string manifests = 8;
   134  	repeated github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Info infos = 9;
   135  	optional github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RetryStrategy retryStrategy = 10;
   136  	optional SyncOptions syncOptions = 11;
   137  	optional string appNamespace = 12;
   138  	optional string project = 13;
   139  	repeated int64 sourcePositions = 14;
   140  	repeated string revisions = 15;
   141  }
   142  
   143  // ApplicationUpdateSpecRequest is a request to update application spec
   144  message ApplicationUpdateSpecRequest {
   145  	required string name = 1;
   146  	required github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationSpec spec = 2;
   147  	optional bool validate = 3;
   148  	optional string appNamespace = 4;
   149  	optional string project = 5;
   150  }
   151  
   152  // ApplicationPatchRequest is a request to patch an application
   153  message ApplicationPatchRequest {
   154  	required string name = 1;
   155  	required string patch = 2;
   156  	required string patchType = 3;
   157  	optional string appNamespace = 5;
   158  	optional string project = 6;
   159  }
   160  
   161  message ApplicationRollbackRequest {
   162  	required string name = 1;
   163  	required int64 id = 2;
   164  	optional bool dryRun = 3;
   165  	optional bool prune = 4;
   166  	optional string appNamespace = 6;
   167  	optional string project = 7;
   168  }
   169  
   170  message ApplicationResourceRequest {
   171  	required string name = 1;
   172  	optional string namespace = 2;
   173  	required string resourceName = 3;
   174  	required string version = 4;
   175  	optional string group = 5;
   176  	required string kind = 6;
   177  	optional string appNamespace = 7;
   178  	optional string project = 8;
   179  }
   180  
   181  message ApplicationResourcePatchRequest {
   182  	required string name = 1;
   183  	optional string namespace = 2;
   184  	required string resourceName = 3;
   185  	required string version = 4;
   186  	optional string group = 5;
   187  	required string kind = 6;
   188  	required string patch = 7;
   189  	required string patchType = 8;
   190  	optional string appNamespace = 9;
   191  	optional string project = 10;
   192  }
   193  
   194  message ApplicationResourceDeleteRequest {
   195  	required string name = 1;
   196  	optional string namespace = 2;
   197  	required string resourceName = 3;
   198  	required string version = 4;
   199  	optional string group = 5;
   200  	required string kind = 6;
   201  	optional bool force = 7;
   202  	optional bool orphan = 8;
   203  	optional string appNamespace = 9;
   204  	optional string project = 10;
   205  }
   206  
   207  message ResourceActionParameters {
   208  	required string name = 1;
   209  	required string value = 2;
   210  }
   211  
   212  // ResourceActionRunRequest is a request to run a resource action.
   213  // This message is deprecated and replaced by ResourceActionRunRequestV2.
   214  message ResourceActionRunRequest {
   215  	option deprecated = true;
   216  	required string name = 1;
   217  	optional string namespace = 2;
   218  	required string resourceName = 3;
   219  	required string version = 4;
   220  	optional string group = 5;
   221  	required string kind = 6;
   222  	required string action = 7;
   223  	optional string appNamespace = 8;
   224  	optional string project = 9;
   225  }
   226  
   227  message ResourceActionRunRequestV2 {
   228  	required string name = 1;
   229  	optional string namespace = 2;
   230  	required string resourceName = 3;
   231  	required string version = 4;
   232  	optional string group = 5;
   233  	required string kind = 6;
   234  	required string action = 7;
   235  	optional string appNamespace = 8;
   236  	optional string project = 9;
   237  	repeated ResourceActionParameters resourceActionParameters = 10;
   238  }
   239  
   240  message ResourceActionsListResponse {
   241  	repeated github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ResourceAction actions = 1;
   242  }
   243  
   244  message ApplicationResourceResponse {
   245  	required string manifest = 1;
   246  }
   247  
   248  message ApplicationPodLogsQuery {
   249  	required string name = 1;
   250  	optional string namespace = 2;
   251  	optional string podName = 3;
   252  	optional string container = 4;
   253  	optional int64 sinceSeconds = 5;
   254  	optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 6;
   255  	optional int64 tailLines = 7;
   256  	optional bool follow = 8;
   257  	optional string untilTime = 9;
   258  	optional string filter = 10;
   259  	optional string kind = 11;
   260  	optional string group = 12;
   261  	optional string resourceName = 13 ;
   262  	optional bool previous = 14;
   263  	optional string appNamespace = 15;
   264  	optional string project = 16;
   265  	optional bool matchCase = 17;
   266  }
   267  
   268  message LogEntry {
   269  	required string content = 1;
   270  	// deprecated in favor of timeStampStr since meta.v1.Time don't support nano time
   271  	required k8s.io.apimachinery.pkg.apis.meta.v1.Time timeStamp = 2;
   272  	required bool last = 3;
   273  	required string timeStampStr = 4;
   274  	required string podName = 5;
   275  }
   276  
   277  message OperationTerminateRequest {
   278  	required string name = 1;
   279  	optional string appNamespace = 2;
   280  	optional string project = 3;
   281  }
   282  
   283  message ApplicationSyncWindowsQuery {
   284  	required string name = 1;
   285  	optional string appNamespace = 2;
   286  	optional string project = 3;
   287  }
   288  
   289  message ApplicationSyncWindowsResponse {
   290  	repeated ApplicationSyncWindow activeWindows = 1;
   291  	repeated ApplicationSyncWindow assignedWindows = 2;
   292  	required bool canSync = 3;
   293  }
   294  
   295  message ApplicationSyncWindow {
   296  	required string kind = 1;
   297  	required string schedule = 2;
   298  	required string duration = 3;
   299  	required bool manualSync = 4;
   300  }
   301  
   302  message OperationTerminateResponse {
   303  }
   304  
   305  
   306  message ResourcesQuery {
   307  	required string applicationName = 1;
   308  
   309  	optional string namespace = 2;
   310  	optional string name = 3;
   311  	optional string version = 4;
   312  	optional string group = 5;
   313  	optional string kind = 6;
   314  	optional string appNamespace = 7;
   315  	optional string project = 8;
   316  }
   317  
   318  message ManagedResourcesResponse {
   319  	repeated github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ResourceDiff items = 1;
   320  }
   321  
   322  message ApplicationServerSideDiffQuery {
   323  	required string appName = 1;
   324  	optional string appNamespace = 2;
   325  	optional string project = 3;
   326  	repeated github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ResourceDiff liveResources = 4;
   327  	repeated string targetManifests = 5;
   328  }
   329  
   330  message ApplicationServerSideDiffResponse {
   331  	repeated github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ResourceDiff items = 1;
   332  	required bool modified = 2;
   333  }
   334  
   335  message LinkInfo {
   336  	required string title = 1;
   337  	required string url = 2;
   338  	optional string description = 3;
   339  	optional string iconClass = 4;
   340  }
   341  
   342  message LinksResponse {
   343  	repeated LinkInfo items = 1;
   344  }
   345  
   346  message ListAppLinksRequest {
   347  	required string name = 1;
   348  	optional string namespace = 3;
   349  	optional string project = 4;
   350  }
   351  
   352  
   353  // ApplicationService
   354  service ApplicationService {
   355  
   356  	// List returns list of applications
   357  	rpc List(ApplicationQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationList) {
   358  		option (google.api.http).get = "/api/v1/applications";
   359  	}
   360  
   361  	// ListResourceEvents returns a list of event resources
   362  	rpc ListResourceEvents(ApplicationResourceEventsQuery) returns (k8s.io.api.core.v1.EventList) {
   363  		option (google.api.http).get = "/api/v1/applications/{name}/events";
   364  	}
   365  
   366  	// Watch returns stream of application change events
   367  	rpc Watch(ApplicationQuery) returns (stream github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationWatchEvent) {
   368  		option (google.api.http).get = "/api/v1/stream/applications";
   369  	}
   370  
   371  	// Create creates an application
   372  	rpc Create (ApplicationCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
   373  		option (google.api.http) = {
   374  			post: "/api/v1/applications"
   375  			body: "application"
   376  		};
   377  	}
   378  
   379  	// Get returns an application by name
   380  	rpc Get (ApplicationQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
   381  		option (google.api.http).get = "/api/v1/applications/{name}";
   382  	}
   383  
   384  	// Get returns sync windows of the application
   385  	rpc GetApplicationSyncWindows (ApplicationSyncWindowsQuery) returns (ApplicationSyncWindowsResponse) {
   386  		option (google.api.http).get = "/api/v1/applications/{name}/syncwindows";
   387  	}
   388  
   389  	// Get the meta-data (author, date, tags, message) for a specific revision of the application
   390  	rpc RevisionMetadata (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RevisionMetadata) {
   391  		option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/metadata";
   392  	}
   393  
   394  	// Get the chart metadata (description, maintainers, home) for a specific revision of the application
   395  	rpc RevisionChartDetails (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ChartDetails) {
   396  		option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/chartdetails";
   397  	}
   398  
   399  	// Get the chart metadata (description, maintainers, home) for a specific revision of the application
   400  	rpc GetOCIMetadata (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.OCIMetadata) {
   401  		option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/ocimetadata";
   402  	}
   403  
   404  	// GetManifests returns application manifests
   405  	rpc GetManifests (ApplicationManifestQuery) returns (repository.ManifestResponse) {
   406  		option (google.api.http).get = "/api/v1/applications/{name}/manifests";
   407  	}
   408  
   409  	// GetManifestsWithFiles returns application manifests using provided files to generate them
   410  	rpc GetManifestsWithFiles (stream ApplicationManifestQueryWithFilesWrapper) returns (repository.ManifestResponse) {
   411  		option (google.api.http) = {
   412  			post: "/api/v1/applications/manifestsWithFiles"
   413  			body: "*"
   414  		};
   415  	}
   416  
   417  	// Update updates an application
   418  	rpc Update(ApplicationUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
   419  		option (google.api.http) = {
   420  			put: "/api/v1/applications/{application.metadata.name}"
   421  			body: "application"
   422  		};
   423  	}
   424  
   425  	// UpdateSpec updates an application spec
   426  	rpc UpdateSpec(ApplicationUpdateSpecRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationSpec) {
   427  		option (google.api.http) = {
   428  			put: "/api/v1/applications/{name}/spec"
   429  			body: "spec"
   430  		};
   431  	}
   432  
   433  	// Patch patch an application
   434  	rpc Patch(ApplicationPatchRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
   435  		option (google.api.http) = {
   436  			patch: "/api/v1/applications/{name}"
   437  			body: "*"
   438  		};
   439  	}
   440  
   441  	// Delete deletes an application
   442  	rpc Delete(ApplicationDeleteRequest) returns (ApplicationResponse) {
   443  		option (google.api.http).delete = "/api/v1/applications/{name}";
   444  	}
   445  
   446  	// Sync syncs an application to its target state
   447  	rpc Sync(ApplicationSyncRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
   448  		option (google.api.http) = {
   449  			post: "/api/v1/applications/{name}/sync"
   450  			body: "*"
   451  		};
   452  	}
   453  
   454  	// ManagedResources returns list of managed resources
   455  	rpc ManagedResources(ResourcesQuery) returns (ManagedResourcesResponse) {
   456  		option (google.api.http).get = "/api/v1/applications/{applicationName}/managed-resources";
   457  	}
   458  
   459  	// ServerSideDiff performs server-side diff calculation using dry-run apply
   460  	rpc ServerSideDiff(ApplicationServerSideDiffQuery) returns (ApplicationServerSideDiffResponse) {
   461  		option (google.api.http).get = "/api/v1/applications/{appName}/server-side-diff";
   462  	}
   463  
   464  	// ResourceTree returns resource tree
   465  	rpc ResourceTree(ResourcesQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationTree) {
   466  		option (google.api.http).get = "/api/v1/applications/{applicationName}/resource-tree";
   467  	}
   468  
   469  	// Watch returns stream of application resource tree
   470  	rpc WatchResourceTree(ResourcesQuery) returns (stream github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationTree) {
   471  		option (google.api.http).get = "/api/v1/stream/applications/{applicationName}/resource-tree";
   472  	}
   473  
   474  	// Rollback syncs an application to its target state
   475  	rpc Rollback(ApplicationRollbackRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
   476  		option (google.api.http) = {
   477  			post: "/api/v1/applications/{name}/rollback"
   478  			body: "*"
   479  		};
   480  	}
   481  
   482  	// TerminateOperation terminates the currently running operation
   483  	rpc TerminateOperation(OperationTerminateRequest) returns (OperationTerminateResponse) {
   484  		option (google.api.http) = {
   485  			delete: "/api/v1/applications/{name}/operation";
   486  		};
   487  	}
   488  
   489  	// GetResource returns single application resource
   490  	rpc GetResource(ApplicationResourceRequest) returns (ApplicationResourceResponse) {
   491  		option (google.api.http).get = "/api/v1/applications/{name}/resource";
   492  	}
   493  
   494  	// PatchResource patch single application resource
   495  	rpc PatchResource(ApplicationResourcePatchRequest) returns (ApplicationResourceResponse) {
   496  		option (google.api.http) = {
   497  			post: "/api/v1/applications/{name}/resource"
   498  			body: "patch"
   499  		};
   500  	}
   501  
   502  	// ListResourceActions returns list of resource actions
   503  	rpc ListResourceActions(ApplicationResourceRequest) returns (ResourceActionsListResponse) {
   504  		option (google.api.http).get = "/api/v1/applications/{name}/resource/actions";
   505  	}
   506  
   507  	// RunResourceAction runs a resource action
   508  	//
   509  	// Deprecated: use RunResourceActionV2 instead. This version does not support resource action parameters but is
   510  	// maintained for backward compatibility. It will be removed in a future release.
   511  	rpc RunResourceAction(ResourceActionRunRequest) returns (ApplicationResponse) {
   512  		option deprecated = true;
   513  		option (google.api.http) = {
   514  			post: "/api/v1/applications/{name}/resource/actions"
   515  			body: "action"
   516  		};
   517  	}
   518  
   519  	// RunResourceActionV2 runs a resource action with parameters
   520  	rpc RunResourceActionV2(ResourceActionRunRequestV2) returns (ApplicationResponse) {
   521  		option (google.api.http) = {
   522  			post: "/api/v1/applications/{name}/resource/actions/v2"
   523  			body: "*"
   524  		};
   525  	}
   526  
   527  	// DeleteResource deletes a single application resource
   528  	rpc DeleteResource(ApplicationResourceDeleteRequest) returns (ApplicationResponse) {
   529  		option (google.api.http).delete = "/api/v1/applications/{name}/resource";
   530  	}
   531  
   532  	// PodLogs returns stream of log entries for the specified pod. Pod
   533  	rpc PodLogs(ApplicationPodLogsQuery) returns (stream LogEntry) {
   534  		option (google.api.http) = {
   535  			get: "/api/v1/applications/{name}/pods/{podName}/logs"
   536  			additional_bindings {
   537  				get: "/api/v1/applications/{name}/logs"
   538  			}
   539  		};
   540  	}
   541  
   542  	// ListLinks returns the list of all application deep links
   543  	rpc ListLinks(ListAppLinksRequest) returns (LinksResponse) {
   544  		option (google.api.http).get = "/api/v1/applications/{name}/links";
   545  	}
   546  
   547  	// ListResourceLinks returns the list of all resource deep links
   548  	rpc ListResourceLinks(ApplicationResourceRequest) returns (LinksResponse) {
   549  		option (google.api.http).get = "/api/v1/applications/{name}/resource/links";
   550  	}
   551  }