diff --git a/shared/management/http/api/openapi.yml b/shared/management/http/api/openapi.yml index b7f4a22d8..86082e606 100644 --- a/shared/management/http/api/openapi.yml +++ b/shared/management/http/api/openapi.yml @@ -32,28 +32,43 @@ tags: - name: Ingress Ports description: Interact with and view information about the ingress peers and ports. x-cloud-only: true + - name: Jobs + description: Interact with and view information about remote jobs. + x-experimental: true + components: schemas: WorkloadType: type: string + description: | + Identifies the type of workload the job will execute. + Currently only `"bundle"` is supported. enum: - bundle + example: "bundle" BundleParameters: type: object + description: These parameters control what gets included in the bundle and how it is processed. properties: bundle_for: type: boolean + description: Whether to generate a bundle for the given timeframe. example: true bundle_for_time: type: integer - minimum: 0 + minimum: 1 + maximum: 5 + description: Time period in minutes for which to generate the bundle. example: 2 log_file_count: type: integer - minimum: 0 + minimum: 1 + maximum: 1000 + description: Maximum number of log files to include in the bundle. example: 100 anonymize: type: boolean + description: Whether sensitive data should be anonymized in the bundle. example: false required: - bundle_for @@ -2286,10 +2301,10 @@ paths: parameters: - in: path name: peerId + description: The unique identifier of a peer required: true schema: type: string - description: The unique identifier of a peer responses: '200': description: List of jobs @@ -2317,10 +2332,10 @@ paths: parameters: - in: path name: peerId + description: The unique identifier of a peer required: true schema: type: string - description: The unique identifier of a peer requestBody: description: Create job request content: @@ -2355,11 +2370,13 @@ paths: - in: path name: peerId required: true + description: The unique identifier of a peer schema: type: string - in: path name: jobId required: true + description: The unique identifier of a job schema: type: string responses: diff --git a/shared/management/http/api/types.gen.go b/shared/management/http/api/types.gen.go index d7ce9bd14..09c1ecb0f 100644 --- a/shared/management/http/api/types.gen.go +++ b/shared/management/http/api/types.gen.go @@ -353,12 +353,19 @@ type AvailablePorts struct { Udp int `json:"udp"` } -// BundleParameters defines model for BundleParameters. +// BundleParameters These parameters control what gets included in the bundle and how it is processed. type BundleParameters struct { - Anonymize bool `json:"anonymize"` - BundleFor bool `json:"bundle_for"` - BundleForTime int `json:"bundle_for_time"` - LogFileCount int `json:"log_file_count"` + // Anonymize Whether sensitive data should be anonymized in the bundle. + Anonymize bool `json:"anonymize"` + + // BundleFor Whether to generate a bundle for the given timeframe. + BundleFor bool `json:"bundle_for"` + + // BundleForTime Time period in minutes for which to generate the bundle. + BundleForTime int `json:"bundle_for_time"` + + // LogFileCount Maximum number of log files to include in the bundle. + LogFileCount int `json:"log_file_count"` } // BundleResult defines model for BundleResult. @@ -368,15 +375,23 @@ type BundleResult struct { // BundleWorkloadRequest defines model for BundleWorkloadRequest. type BundleWorkloadRequest struct { + // Parameters These parameters control what gets included in the bundle and how it is processed. Parameters BundleParameters `json:"parameters"` - Type WorkloadType `json:"type"` + + // Type Identifies the type of workload the job will execute. + // Currently only `"bundle"` is supported. + Type WorkloadType `json:"type"` } // BundleWorkloadResponse defines model for BundleWorkloadResponse. type BundleWorkloadResponse struct { + // Parameters These parameters control what gets included in the bundle and how it is processed. Parameters BundleParameters `json:"parameters"` Result BundleResult `json:"result"` - Type WorkloadType `json:"type"` + + // Type Identifies the type of workload the job will execute. + // Currently only `"bundle"` is supported. + Type WorkloadType `json:"type"` } // Checks List of objects that perform the actual checks @@ -1891,7 +1906,8 @@ type WorkloadResponse struct { union json.RawMessage } -// WorkloadType defines model for WorkloadType. +// WorkloadType Identifies the type of workload the job will execute. +// Currently only `"bundle"` is supported. type WorkloadType string // GetApiEventsNetworkTrafficParams defines parameters for GetApiEventsNetworkTraffic.