Skip to content

Commit

Permalink
changes for execution summary outline API (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
meenaravichandran1 authored Jul 12, 2024
1 parent bd77386 commit 4d89fad
Show file tree
Hide file tree
Showing 13 changed files with 935 additions and 0 deletions.
551 changes: 551 additions & 0 deletions harness/nextgen/api/swagger.yaml

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions harness/nextgen/api_execution_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,3 +762,154 @@ func (a *ExecutionDetailsApiService) GetListOfExecutions(ctx context.Context, ac

return localVarReturnValue, localVarHttpResponse, nil
}

/*
ExecutionDetailsApiService List Executions Outline
Returns a List of Pipeline Executions Outline with Specific Filter
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param accountIdentifier Account Identifier for the Entity.
* @param orgIdentifier Organization Identifier for the Entity.
* @param projectIdentifier Project Identifier for the Entity.
* @param optional nil or *ExecutionDetailsApiGetListOfExecutionsOutlineOpts - Optional Parameters:
* @param "Body" (optional.Interface of PipelineExecutionOutlineFilterDto) - Returns a List of Pipeline Executions outline with Specific Filters
* @param "LastSeenExecutionId" (optional.String) - lastSeenExecutionId
* @param "LastSeenStartTime" (optional.Int64) - lastSeenStartTime
* @param "Size" (optional.Int32) - Results per page
@return ResponseDtoCustomPagePipelineExecutionOutline
*/

type ExecutionDetailsApiGetListOfExecutionsOutlineOpts struct {
Body optional.Interface
LastSeenExecutionId optional.String
LastSeenStartTime optional.Int64
Size optional.Int32
}

func (a *ExecutionDetailsApiService) GetListOfExecutionsOutline(ctx context.Context, accountIdentifier string, orgIdentifier string, projectIdentifier string, localVarOptionals *ExecutionDetailsApiGetListOfExecutionsOutlineOpts) (ResponseDtoCustomPagePipelineExecutionOutline, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue ResponseDtoCustomPagePipelineExecutionOutline
)

// create path and map variables
localVarPath := a.client.cfg.BasePath + "/pipeline/api/pipelines/execution/summary/outline"

localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}

localVarQueryParams.Add("accountIdentifier", parameterToString(accountIdentifier, ""))
localVarQueryParams.Add("orgIdentifier", parameterToString(orgIdentifier, ""))
localVarQueryParams.Add("projectIdentifier", parameterToString(projectIdentifier, ""))
if localVarOptionals != nil && localVarOptionals.LastSeenExecutionId.IsSet() {
localVarQueryParams.Add("lastSeenExecutionId", parameterToString(localVarOptionals.LastSeenExecutionId.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.LastSeenStartTime.IsSet() {
localVarQueryParams.Add("lastSeenStartTime", parameterToString(localVarOptionals.LastSeenStartTime.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Size.IsSet() {
localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}

// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}

// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/yaml"}

// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
if localVarOptionals != nil && localVarOptionals.Body.IsSet() {

localVarOptionalBody := localVarOptionals.Body.Value()
localVarPostBody = &localVarOptionalBody
}
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
var key string
if auth.Prefix != "" {
key = auth.Prefix + " " + auth.Key
} else {
key = auth.Key
}
localVarHeaderParams["x-api-key"] = key

}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}

localVarHttpResponse, err := a.client.callAPI(r)
if err != nil || localVarHttpResponse == nil {
return localVarReturnValue, localVarHttpResponse, err
}

localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}

if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
error: localVarHttpResponse.Status,
}
if localVarHttpResponse.StatusCode == 400 {
var v Failure
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}
if localVarHttpResponse.StatusCode == 500 {
var v ModelError
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}
if localVarHttpResponse.StatusCode == 0 {
var v ResponseDtoCustomPagePipelineExecutionOutline
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, newErr
}

return localVarReturnValue, localVarHttpResponse, nil
}
43 changes: 43 additions & 0 deletions harness/nextgen/docs/ExecutionDetailsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,46 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


# **GetListOfExecutionsOutline**
> ResponseDtoCustomPagePipelineExecutionOutline GetListOfExecutionsOutline(ctx, accountIdentifier, orgIdentifier, projectIdentifier, optional)
List Executions Outline

Returns a List of Pipeline Executions Outline with Specific Filter

### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**orgIdentifier** | **string**| Organization Identifier for the Entity. |
**projectIdentifier** | **string**| Project Identifier for the Entity. |
**optional** | ***ExecutionDetailsApiGetListOfExecutionsOutlineOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a ExecutionDetailsApiGetListOfExecutionsOutlineOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------



**body** | [**optional.Interface of PipelineExecutionOutlineFilterDto**](PipelineExecutionOutlineFilterDto.md)| Returns a List of Pipeline Executions outline with Specific Filters |
**lastSeenExecutionId** | **optional.**| lastSeenExecutionId |
**lastSeenStartTime** | **optional.**| lastSeenStartTime |
**size** | **optional.**| Results per page | [default to 10]

### Return type

[**ResponseDtoCustomPagePipelineExecutionOutline**](ResponseDTOCustomPagePipelineExecutionOutline.md)

### Authorization

[x-api-key](../README.md#x-api-key)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, application/yaml

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
19 changes: 19 additions & 0 deletions harness/nextgen/docs/NodeExecutionOutline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# NodeExecutionOutline

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**NodeType** | **string** | | [optional] [default to null]
**NodeGroup** | **string** | | [optional] [default to null]
**NodeIdentifier** | **string** | | [optional] [default to null]
**Name** | **string** | | [optional] [default to null]
**NodeUuid** | **string** | | [optional] [default to null]
**Status** | **string** | This is the Execution Status of the entity | [optional] [default to null]
**StartTs** | **int64** | | [optional] [default to null]
**EndTs** | **int64** | | [optional] [default to null]
**FailureInfo** | **string** | | [optional] [default to null]
**NodeExecutionId** | **string** | | [optional] [default to null]
**EdgeLayoutList** | [***EdgeLayoutList**](EdgeLayoutList.md) | | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

24 changes: 24 additions & 0 deletions harness/nextgen/docs/PipelineExecutionOutline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# PipelineExecutionOutline

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AccountIdentifier** | **string** | | [default to null]
**OrgIdentifier** | **string** | | [default to null]
**ProjectIdentifier** | **string** | | [default to null]
**PipelineIdentifier** | **string** | | [optional] [default to null]
**PlanExecutionId** | **string** | | [optional] [default to null]
**Name** | **string** | | [optional] [default to null]
**StartingNodeId** | **string** | | [optional] [default to null]
**Status** | **string** | This is the Execution Status of the entity | [optional] [default to null]
**FailureInfo** | **string** | | [optional] [default to null]
**StagesMap** | [**map[string]NodeExecutionOutline**](NodeExecutionOutline.md) | | [optional] [default to null]
**Modules** | **[]string** | | [optional] [default to null]
**StartTs** | **int64** | | [optional] [default to null]
**EndTs** | **int64** | | [optional] [default to null]
**CreatedAt** | **int64** | | [optional] [default to null]
**LastUpdatedAt** | **int64** | | [optional] [default to null]
**RuntimeInputYaml** | **string** | | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

12 changes: 12 additions & 0 deletions harness/nextgen/docs/PipelineExecutionOutlineFilterDto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# PipelineExecutionOutlineFilterDto

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Status** | **[]string** | | [optional] [default to null]
**TimeRange** | [***TimeRange**](TimeRange.md) | | [optional] [default to null]
**PipelineIdentifier** | **string** | | [optional] [default to null]
**PlanExecutionIds** | **[]string** | | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10 changes: 10 additions & 0 deletions harness/nextgen/docs/TimeRange.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# TimeRange

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**StartTime** | **int64** | | [optional] [default to null]
**EndTime** | **int64** | | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Loading

0 comments on commit 4d89fad

Please sign in to comment.