From 0d5c4a9502daafbe6838d8a69381aea72d2cd5b9 Mon Sep 17 00:00:00 2001 From: Shivam Negi Date: Mon, 8 Jul 2024 14:09:38 +0530 Subject: [PATCH] feat: [CDS-98026]: TF support for gitops project (#541) * feat: [CDS-98026]: TF support for gitops project * feat: [CDS-98026]: TF support for gitops project * feat: [CDS-98026]: TF support for gitops project * feat: [CDS-98026]: TF support for gitops project --- go.mod | 2 +- go.sum | 2 +- harness/nextgen/api_projects.go | 672 ++++++++++++++++++ harness/nextgen/client.go | 3 + harness/nextgen/docs/AppprojectsAppProject.md | 11 + .../nextgen/docs/AppprojectsAppProjectList.md | 10 + .../nextgen/docs/AppprojectsAppProjectSpec.md | 19 + .../docs/AppprojectsAppProjectStatus.md | 9 + harness/nextgen/docs/AppprojectsJwtToken.md | 11 + harness/nextgen/docs/AppprojectsJwtTokens.md | 9 + .../docs/AppprojectsOrphanedResourceKey.md | 11 + ...rojectsOrphanedResourcesMonitorSettings.md | 10 + .../nextgen/docs/AppprojectsProjectRole.md | 13 + .../nextgen/docs/AppprojectsSignatureKey.md | 9 + harness/nextgen/docs/AppprojectsSyncWindow.md | 16 + .../nextgen/model_appprojects_app_project.go | 16 + .../model_appprojects_app_project_list.go | 15 + .../model_appprojects_app_project_spec.go | 24 + .../model_appprojects_app_project_status.go | 14 + ...del_appprojects_application_destination.go | 16 + .../nextgen/model_appprojects_jwt_token.go | 16 + .../nextgen/model_appprojects_jwt_tokens.go | 14 + ...model_appprojects_orphaned_resource_key.go | 16 + ...cts_orphaned_resources_monitor_settings.go | 15 + .../nextgen/model_appprojects_project_role.go | 18 + .../model_appprojects_signature_key.go | 14 + .../nextgen/model_appprojects_sync_window.go | 21 + .../nextgen/model_projects_empty_response.go | 13 + .../model_projects_project_create_request.go | 16 + .../nextgen/model_projects_project_query.go | 14 + .../model_projects_project_update_request.go | 14 + harness/nextgen/model_v1_group_kind.go | 16 + 32 files changed, 1077 insertions(+), 2 deletions(-) create mode 100644 harness/nextgen/api_projects.go create mode 100644 harness/nextgen/docs/AppprojectsAppProject.md create mode 100644 harness/nextgen/docs/AppprojectsAppProjectList.md create mode 100644 harness/nextgen/docs/AppprojectsAppProjectSpec.md create mode 100644 harness/nextgen/docs/AppprojectsAppProjectStatus.md create mode 100644 harness/nextgen/docs/AppprojectsJwtToken.md create mode 100644 harness/nextgen/docs/AppprojectsJwtTokens.md create mode 100644 harness/nextgen/docs/AppprojectsOrphanedResourceKey.md create mode 100644 harness/nextgen/docs/AppprojectsOrphanedResourcesMonitorSettings.md create mode 100644 harness/nextgen/docs/AppprojectsProjectRole.md create mode 100644 harness/nextgen/docs/AppprojectsSignatureKey.md create mode 100644 harness/nextgen/docs/AppprojectsSyncWindow.md create mode 100644 harness/nextgen/model_appprojects_app_project.go create mode 100644 harness/nextgen/model_appprojects_app_project_list.go create mode 100644 harness/nextgen/model_appprojects_app_project_spec.go create mode 100644 harness/nextgen/model_appprojects_app_project_status.go create mode 100644 harness/nextgen/model_appprojects_application_destination.go create mode 100644 harness/nextgen/model_appprojects_jwt_token.go create mode 100644 harness/nextgen/model_appprojects_jwt_tokens.go create mode 100644 harness/nextgen/model_appprojects_orphaned_resource_key.go create mode 100644 harness/nextgen/model_appprojects_orphaned_resources_monitor_settings.go create mode 100644 harness/nextgen/model_appprojects_project_role.go create mode 100644 harness/nextgen/model_appprojects_signature_key.go create mode 100644 harness/nextgen/model_appprojects_sync_window.go create mode 100644 harness/nextgen/model_projects_empty_response.go create mode 100644 harness/nextgen/model_projects_project_create_request.go create mode 100644 harness/nextgen/model_projects_project_query.go create mode 100644 harness/nextgen/model_projects_project_update_request.go create mode 100644 harness/nextgen/model_v1_group_kind.go diff --git a/go.mod b/go.mod index 7528ae95..e1a787fe 100644 --- a/go.mod +++ b/go.mod @@ -44,4 +44,4 @@ require ( google.golang.org/protobuf v1.28.1 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gotest.tools/v3 v3.0.3 // indirect -) +) \ No newline at end of file diff --git a/go.sum b/go.sum index 5d8fe3f9..492757ee 100644 --- a/go.sum +++ b/go.sum @@ -145,4 +145,4 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= \ No newline at end of file diff --git a/harness/nextgen/api_projects.go b/harness/nextgen/api_projects.go new file mode 100644 index 00000000..d8cd7aef --- /dev/null +++ b/harness/nextgen/api_projects.go @@ -0,0 +1,672 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type ProjectsApiService service + +/* +ProjectsApiService Create a new project +Create a new project + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body + * @param accountIdentifier Account Identifier for the Entity. + * @param agentIdentifier Agent identifier for entity. + * @param optional nil or *ProjectsApiAgentProjectServiceCreateOpts - Optional Parameters: + * @param "OrgIdentifier" (optional.String) - Organization Identifier for the Entity. + * @param "ProjectIdentifier" (optional.String) - Project Identifier for the Entity. +@return AppprojectsAppProject +*/ + +type ProjectsApiAgentProjectServiceCreateOpts struct { + OrgIdentifier optional.String + ProjectIdentifier optional.String +} + +func (a *ProjectsApiService) AgentProjectServiceCreate(ctx context.Context, body ProjectsProjectCreateRequest, accountIdentifier string, agentIdentifier string, localVarOptionals *ProjectsApiAgentProjectServiceCreateOpts) (AppprojectsAppProject, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue AppprojectsAppProject + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/gitops/api/v1/agents/{agentIdentifier}/projects" + localVarPath = strings.Replace(localVarPath, "{"+"agentIdentifier"+"}", fmt.Sprintf("%v", agentIdentifier), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("accountIdentifier", parameterToString(accountIdentifier, "")) + if localVarOptionals != nil && localVarOptionals.OrgIdentifier.IsSet() { + localVarQueryParams.Add("orgIdentifier", parameterToString(localVarOptionals.OrgIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ProjectIdentifier.IsSet() { + localVarQueryParams.Add("projectIdentifier", parameterToString(localVarOptionals.ProjectIdentifier.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"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + 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 == 200 { + var v AppprojectsAppProject + 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 GatewayruntimeError + 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 +} + +/* +ProjectsApiService Delete deletes a project +Delete deletes a project. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param agentIdentifier Agent identifier for entity. + * @param queryName + * @param accountIdentifier Account Identifier for the Entity. + * @param orgIdentifier Organization Identifier for the Entity. + * @param optional nil or *ProjectsApiAgentProjectServiceDeleteOpts - Optional Parameters: + * @param "ProjectIdentifier" (optional.String) - Project Identifier for the Entity. +@return ProjectsEmptyResponse +*/ + +type ProjectsApiAgentProjectServiceDeleteOpts struct { + ProjectIdentifier optional.String +} + +func (a *ProjectsApiService) AgentProjectServiceDelete(ctx context.Context, agentIdentifier string, queryName string, accountIdentifier string, orgIdentifier string, localVarOptionals *ProjectsApiAgentProjectServiceDeleteOpts) (ProjectsEmptyResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ProjectsEmptyResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/gitops/api/v1/agents/{agentIdentifier}/projects/{query.name}" + localVarPath = strings.Replace(localVarPath, "{"+"agentIdentifier"+"}", fmt.Sprintf("%v", agentIdentifier), -1) + localVarPath = strings.Replace(localVarPath, "{"+"query.name"+"}", fmt.Sprintf("%v", queryName), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("accountIdentifier", parameterToString(accountIdentifier, "")) + localVarQueryParams.Add("orgIdentifier", parameterToString(orgIdentifier, "")) + if localVarOptionals != nil && localVarOptionals.ProjectIdentifier.IsSet() { + localVarQueryParams.Add("projectIdentifier", parameterToString(localVarOptionals.ProjectIdentifier.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + 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 == 200 { + var v ProjectsEmptyResponse + 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 GatewayruntimeError + 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 +} + +/* +ProjectsApiService Get returns a project by name +Get returns an argo project by name. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param agentIdentifier Agent identifier for entity. + * @param queryName + * @param accountIdentifier Account Identifier for the Entity. + * @param optional nil or *ProjectsApiAgentProjectServiceGetOpts - Optional Parameters: + * @param "OrgIdentifier" (optional.String) - Organization Identifier for the Entity. + * @param "ProjectIdentifier" (optional.String) - Project Identifier for the Entity. +@return AppprojectsAppProject +*/ + +type ProjectsApiAgentProjectServiceGetOpts struct { + OrgIdentifier optional.String + ProjectIdentifier optional.String +} + +func (a *ProjectsApiService) AgentProjectServiceGet(ctx context.Context, agentIdentifier string, queryName string, accountIdentifier string, localVarOptionals *ProjectsApiAgentProjectServiceGetOpts) (AppprojectsAppProject, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue AppprojectsAppProject + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/gitops/api/v1/agents/{agentIdentifier}/projects/{query.name}" + localVarPath = strings.Replace(localVarPath, "{"+"agentIdentifier"+"}", fmt.Sprintf("%v", agentIdentifier), -1) + localVarPath = strings.Replace(localVarPath, "{"+"query.name"+"}", fmt.Sprintf("%v", queryName), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("accountIdentifier", parameterToString(accountIdentifier, "")) + if localVarOptionals != nil && localVarOptionals.OrgIdentifier.IsSet() { + localVarQueryParams.Add("orgIdentifier", parameterToString(localVarOptionals.OrgIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ProjectIdentifier.IsSet() { + localVarQueryParams.Add("projectIdentifier", parameterToString(localVarOptionals.ProjectIdentifier.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + 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 == 200 { + var v AppprojectsAppProject + 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 GatewayruntimeError + 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 +} + +/* +ProjectsApiService List returns list of projects +Lists lists argo projects. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param agentIdentifier Agent identifier for entity. + * @param accountIdentifier Account Identifier for the Entity. + * @param optional nil or *ProjectsApiAgentProjectServiceListOpts - Optional Parameters: + * @param "OrgIdentifier" (optional.String) - Organization Identifier for the Entity. + * @param "ProjectIdentifier" (optional.String) - Project Identifier for the Entity. + * @param "QueryName" (optional.String) - +@return AppprojectsAppProjectList +*/ + +type ProjectsApiAgentProjectServiceListOpts struct { + OrgIdentifier optional.String + ProjectIdentifier optional.String + QueryName optional.String +} + +func (a *ProjectsApiService) AgentProjectServiceList(ctx context.Context, agentIdentifier string, accountIdentifier string, localVarOptionals *ProjectsApiAgentProjectServiceListOpts) (AppprojectsAppProjectList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue AppprojectsAppProjectList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/gitops/api/v1/agents/{agentIdentifier}/projects" + localVarPath = strings.Replace(localVarPath, "{"+"agentIdentifier"+"}", fmt.Sprintf("%v", agentIdentifier), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("accountIdentifier", parameterToString(accountIdentifier, "")) + if localVarOptionals != nil && localVarOptionals.OrgIdentifier.IsSet() { + localVarQueryParams.Add("orgIdentifier", parameterToString(localVarOptionals.OrgIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ProjectIdentifier.IsSet() { + localVarQueryParams.Add("projectIdentifier", parameterToString(localVarOptionals.ProjectIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.QueryName.IsSet() { + localVarQueryParams.Add("query.name", parameterToString(localVarOptionals.QueryName.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + 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 == 200 { + var v AppprojectsAppProjectList + 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 GatewayruntimeError + 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 +} + +/* +ProjectsApiService Update updates a project +Update updates a project. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body + * @param accountIdentifier Account Identifier for the Entity. + * @param agentIdentifier Agent identifier for entity. + * @param requestProjectMetadataName Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names +optional + * @param optional nil or *ProjectsApiAgentProjectServiceUpdateOpts - Optional Parameters: + * @param "OrgIdentifier" (optional.String) - Organization Identifier for the Entity. + * @param "ProjectIdentifier" (optional.String) - Project Identifier for the Entity. +@return AppprojectsAppProject +*/ + +type ProjectsApiAgentProjectServiceUpdateOpts struct { + OrgIdentifier optional.String + ProjectIdentifier optional.String +} + +func (a *ProjectsApiService) AgentProjectServiceUpdate(ctx context.Context, body ProjectsProjectUpdateRequest, accountIdentifier string, agentIdentifier string, requestProjectMetadataName string, localVarOptionals *ProjectsApiAgentProjectServiceUpdateOpts) (AppprojectsAppProject, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue AppprojectsAppProject + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/gitops/api/v1/agents/{agentIdentifier}/projects/{request.project.metadata.name}" + localVarPath = strings.Replace(localVarPath, "{"+"agentIdentifier"+"}", fmt.Sprintf("%v", agentIdentifier), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request.project.metadata.name"+"}", fmt.Sprintf("%v", requestProjectMetadataName), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("accountIdentifier", parameterToString(accountIdentifier, "")) + if localVarOptionals != nil && localVarOptionals.OrgIdentifier.IsSet() { + localVarQueryParams.Add("orgIdentifier", parameterToString(localVarOptionals.OrgIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ProjectIdentifier.IsSet() { + localVarQueryParams.Add("projectIdentifier", parameterToString(localVarOptionals.ProjectIdentifier.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"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + 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 == 200 { + var v AppprojectsAppProject + 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 GatewayruntimeError + 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 +} diff --git a/harness/nextgen/client.go b/harness/nextgen/client.go index cdc5070d..62838ef5 100644 --- a/harness/nextgen/client.go +++ b/harness/nextgen/client.go @@ -154,6 +154,8 @@ type APIClient struct { ProjectApi *ProjectApiService + ProjectGitOpsApi *ProjectsApiService + ProjectMappingsApi *ProjectMappingsApiService RepositoriesApiService *RepositoriesApiService @@ -284,6 +286,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.PipelinesApi = (*PipelinesApiService)(&c.common) c.PipelinesDashboardApi = (*PipelinesDashboardApiService)(&c.common) c.ProjectApi = (*ProjectApiService)(&c.common) + c.ProjectGitOpsApi = (*ProjectsApiService)(&c.common) c.ProjectMappingsApi = (*ProjectMappingsApiService)(&c.common) c.RepositoriesApiService = (*RepositoriesApiService)(&c.common) c.RepositoryCertificatesApi = (*RepositoryCertificatesApiService)(&c.common) diff --git a/harness/nextgen/docs/AppprojectsAppProject.md b/harness/nextgen/docs/AppprojectsAppProject.md new file mode 100644 index 00000000..314b4397 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsAppProject.md @@ -0,0 +1,11 @@ +# AppprojectsAppProject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metadata** | [***V1ObjectMeta**](v1ObjectMeta.md) | | [optional] [default to null] +**Spec** | [***AppprojectsAppProjectSpec**](appprojectsAppProjectSpec.md) | | [optional] [default to null] +**Status** | [***AppprojectsAppProjectStatus**](appprojectsAppProjectStatus.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) + diff --git a/harness/nextgen/docs/AppprojectsAppProjectList.md b/harness/nextgen/docs/AppprojectsAppProjectList.md new file mode 100644 index 00000000..d73826b1 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsAppProjectList.md @@ -0,0 +1,10 @@ +# AppprojectsAppProjectList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metadata** | [***V1ListMeta**](v1ListMeta.md) | | [optional] [default to null] +**Items** | [**[]AppprojectsAppProject**](appprojectsAppProject.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) + diff --git a/harness/nextgen/docs/AppprojectsAppProjectSpec.md b/harness/nextgen/docs/AppprojectsAppProjectSpec.md new file mode 100644 index 00000000..b43103d1 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsAppProjectSpec.md @@ -0,0 +1,19 @@ +# AppprojectsAppProjectSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SourceRepos** | **[]string** | | [optional] [default to null] +**Destinations** | [**[]AppprojectsApplicationDestination**](appprojectsApplicationDestination.md) | | [optional] [default to null] +**Description** | **string** | | [optional] [default to null] +**Roles** | [**[]AppprojectsProjectRole**](appprojectsProjectRole.md) | | [optional] [default to null] +**ClusterResourceWhitelist** | [**[]V1GroupKind**](v1GroupKind.md) | | [optional] [default to null] +**NamespaceResourceBlacklist** | [**[]V1GroupKind**](v1GroupKind.md) | | [optional] [default to null] +**OrphanedResources** | [***AppprojectsOrphanedResourcesMonitorSettings**](appprojectsOrphanedResourcesMonitorSettings.md) | | [optional] [default to null] +**SyncWindows** | [**[]AppprojectsSyncWindow**](appprojectsSyncWindow.md) | | [optional] [default to null] +**NamespaceResourceWhitelist** | [**[]V1GroupKind**](v1GroupKind.md) | | [optional] [default to null] +**SignatureKeys** | [**[]AppprojectsSignatureKey**](appprojectsSignatureKey.md) | | [optional] [default to null] +**ClusterResourceBlacklist** | [**[]V1GroupKind**](v1GroupKind.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) + diff --git a/harness/nextgen/docs/AppprojectsAppProjectStatus.md b/harness/nextgen/docs/AppprojectsAppProjectStatus.md new file mode 100644 index 00000000..76d067de --- /dev/null +++ b/harness/nextgen/docs/AppprojectsAppProjectStatus.md @@ -0,0 +1,9 @@ +# AppprojectsAppProjectStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JwtTokensByRole** | [**map[string]AppprojectsJwtTokens**](appprojectsJWTTokens.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) + diff --git a/harness/nextgen/docs/AppprojectsJwtToken.md b/harness/nextgen/docs/AppprojectsJwtToken.md new file mode 100644 index 00000000..1859e210 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsJwtToken.md @@ -0,0 +1,11 @@ +# AppprojectsJwtToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Iat** | **string** | | [optional] [default to null] +**Exp** | **string** | | [optional] [default to null] +**Id** | **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) + diff --git a/harness/nextgen/docs/AppprojectsJwtTokens.md b/harness/nextgen/docs/AppprojectsJwtTokens.md new file mode 100644 index 00000000..a4e98040 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsJwtTokens.md @@ -0,0 +1,9 @@ +# AppprojectsJwtTokens + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]AppprojectsJwtToken**](appprojectsJWTToken.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) + diff --git a/harness/nextgen/docs/AppprojectsOrphanedResourceKey.md b/harness/nextgen/docs/AppprojectsOrphanedResourceKey.md new file mode 100644 index 00000000..164bb3ab --- /dev/null +++ b/harness/nextgen/docs/AppprojectsOrphanedResourceKey.md @@ -0,0 +1,11 @@ +# AppprojectsOrphanedResourceKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Group** | **string** | | [optional] [default to null] +**Kind** | **string** | | [optional] [default to null] +**Name** | **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) + diff --git a/harness/nextgen/docs/AppprojectsOrphanedResourcesMonitorSettings.md b/harness/nextgen/docs/AppprojectsOrphanedResourcesMonitorSettings.md new file mode 100644 index 00000000..807b81c8 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsOrphanedResourcesMonitorSettings.md @@ -0,0 +1,10 @@ +# AppprojectsOrphanedResourcesMonitorSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Warn** | **bool** | | [optional] [default to null] +**Ignore** | [**[]AppprojectsOrphanedResourceKey**](appprojectsOrphanedResourceKey.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) + diff --git a/harness/nextgen/docs/AppprojectsProjectRole.md b/harness/nextgen/docs/AppprojectsProjectRole.md new file mode 100644 index 00000000..78c3ee50 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsProjectRole.md @@ -0,0 +1,13 @@ +# AppprojectsProjectRole + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] [default to null] +**Description** | **string** | | [optional] [default to null] +**Policies** | **[]string** | | [optional] [default to null] +**JwtTokens** | [**[]AppprojectsJwtToken**](appprojectsJWTToken.md) | | [optional] [default to null] +**Groups** | **[]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) + diff --git a/harness/nextgen/docs/AppprojectsSignatureKey.md b/harness/nextgen/docs/AppprojectsSignatureKey.md new file mode 100644 index 00000000..cd553bc9 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsSignatureKey.md @@ -0,0 +1,9 @@ +# AppprojectsSignatureKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**KeyID** | **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) + diff --git a/harness/nextgen/docs/AppprojectsSyncWindow.md b/harness/nextgen/docs/AppprojectsSyncWindow.md new file mode 100644 index 00000000..a8702444 --- /dev/null +++ b/harness/nextgen/docs/AppprojectsSyncWindow.md @@ -0,0 +1,16 @@ +# AppprojectsSyncWindow + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | [optional] [default to null] +**Schedule** | **string** | | [optional] [default to null] +**Duration** | **string** | | [optional] [default to null] +**Applications** | **[]string** | | [optional] [default to null] +**Namespaces** | **[]string** | | [optional] [default to null] +**Clusters** | **[]string** | | [optional] [default to null] +**ManualSync** | **bool** | | [optional] [default to null] +**TimeZone** | **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) + diff --git a/harness/nextgen/model_appprojects_app_project.go b/harness/nextgen/model_appprojects_app_project.go new file mode 100644 index 00000000..d1897956 --- /dev/null +++ b/harness/nextgen/model_appprojects_app_project.go @@ -0,0 +1,16 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsAppProject struct { + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + Spec *AppprojectsAppProjectSpec `json:"spec,omitempty"` + Status *AppprojectsAppProjectStatus `json:"status,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_app_project_list.go b/harness/nextgen/model_appprojects_app_project_list.go new file mode 100644 index 00000000..f995d628 --- /dev/null +++ b/harness/nextgen/model_appprojects_app_project_list.go @@ -0,0 +1,15 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsAppProjectList struct { + Metadata *V1ListMeta `json:"metadata,omitempty"` + Items []AppprojectsAppProject `json:"items,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_app_project_spec.go b/harness/nextgen/model_appprojects_app_project_spec.go new file mode 100644 index 00000000..76c88ffd --- /dev/null +++ b/harness/nextgen/model_appprojects_app_project_spec.go @@ -0,0 +1,24 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsAppProjectSpec struct { + SourceRepos []string `json:"sourceRepos,omitempty"` + Destinations []AppprojectsApplicationDestination `json:"destinations,omitempty"` + Description string `json:"description,omitempty"` + Roles []AppprojectsProjectRole `json:"roles,omitempty"` + ClusterResourceWhitelist []V1GroupKind `json:"clusterResourceWhitelist,omitempty"` + NamespaceResourceBlacklist []V1GroupKind `json:"namespaceResourceBlacklist,omitempty"` + OrphanedResources *AppprojectsOrphanedResourcesMonitorSettings `json:"orphanedResources,omitempty"` + SyncWindows []AppprojectsSyncWindow `json:"syncWindows,omitempty"` + NamespaceResourceWhitelist []V1GroupKind `json:"namespaceResourceWhitelist,omitempty"` + SignatureKeys []AppprojectsSignatureKey `json:"signatureKeys,omitempty"` + ClusterResourceBlacklist []V1GroupKind `json:"clusterResourceBlacklist,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_app_project_status.go b/harness/nextgen/model_appprojects_app_project_status.go new file mode 100644 index 00000000..1ae10f11 --- /dev/null +++ b/harness/nextgen/model_appprojects_app_project_status.go @@ -0,0 +1,14 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsAppProjectStatus struct { + JwtTokensByRole map[string]AppprojectsJwtTokens `json:"jwtTokensByRole,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_application_destination.go b/harness/nextgen/model_appprojects_application_destination.go new file mode 100644 index 00000000..245e6d9f --- /dev/null +++ b/harness/nextgen/model_appprojects_application_destination.go @@ -0,0 +1,16 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsApplicationDestination struct { + Server string `json:"server,omitempty"` + Namespace string `json:"namespace,omitempty"` + Name string `json:"name,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_jwt_token.go b/harness/nextgen/model_appprojects_jwt_token.go new file mode 100644 index 00000000..1763fc1d --- /dev/null +++ b/harness/nextgen/model_appprojects_jwt_token.go @@ -0,0 +1,16 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsJwtToken struct { + Iat string `json:"iat,omitempty"` + Exp string `json:"exp,omitempty"` + Id string `json:"id,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_jwt_tokens.go b/harness/nextgen/model_appprojects_jwt_tokens.go new file mode 100644 index 00000000..53ca5299 --- /dev/null +++ b/harness/nextgen/model_appprojects_jwt_tokens.go @@ -0,0 +1,14 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsJwtTokens struct { + Items []AppprojectsJwtToken `json:"items,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_orphaned_resource_key.go b/harness/nextgen/model_appprojects_orphaned_resource_key.go new file mode 100644 index 00000000..7dd44d8b --- /dev/null +++ b/harness/nextgen/model_appprojects_orphaned_resource_key.go @@ -0,0 +1,16 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsOrphanedResourceKey struct { + Group string `json:"group,omitempty"` + Kind string `json:"kind,omitempty"` + Name string `json:"name,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_orphaned_resources_monitor_settings.go b/harness/nextgen/model_appprojects_orphaned_resources_monitor_settings.go new file mode 100644 index 00000000..607ff3eb --- /dev/null +++ b/harness/nextgen/model_appprojects_orphaned_resources_monitor_settings.go @@ -0,0 +1,15 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsOrphanedResourcesMonitorSettings struct { + Warn bool `json:"warn,omitempty"` + Ignore []AppprojectsOrphanedResourceKey `json:"ignore,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_project_role.go b/harness/nextgen/model_appprojects_project_role.go new file mode 100644 index 00000000..fcfa7dbe --- /dev/null +++ b/harness/nextgen/model_appprojects_project_role.go @@ -0,0 +1,18 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsProjectRole struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Policies []string `json:"policies,omitempty"` + JwtTokens []AppprojectsJwtToken `json:"jwtTokens,omitempty"` + Groups []string `json:"groups,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_signature_key.go b/harness/nextgen/model_appprojects_signature_key.go new file mode 100644 index 00000000..24ba0797 --- /dev/null +++ b/harness/nextgen/model_appprojects_signature_key.go @@ -0,0 +1,14 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsSignatureKey struct { + KeyID string `json:"keyID,omitempty"` +} diff --git a/harness/nextgen/model_appprojects_sync_window.go b/harness/nextgen/model_appprojects_sync_window.go new file mode 100644 index 00000000..5fb69757 --- /dev/null +++ b/harness/nextgen/model_appprojects_sync_window.go @@ -0,0 +1,21 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type AppprojectsSyncWindow struct { + Kind string `json:"kind,omitempty"` + Schedule string `json:"schedule,omitempty"` + Duration string `json:"duration,omitempty"` + Applications []string `json:"applications,omitempty"` + Namespaces []string `json:"namespaces,omitempty"` + Clusters []string `json:"clusters,omitempty"` + ManualSync bool `json:"manualSync,omitempty"` + TimeZone string `json:"timeZone,omitempty"` +} diff --git a/harness/nextgen/model_projects_empty_response.go b/harness/nextgen/model_projects_empty_response.go new file mode 100644 index 00000000..e08d1b48 --- /dev/null +++ b/harness/nextgen/model_projects_empty_response.go @@ -0,0 +1,13 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type ProjectsEmptyResponse struct { +} diff --git a/harness/nextgen/model_projects_project_create_request.go b/harness/nextgen/model_projects_project_create_request.go new file mode 100644 index 00000000..50a903d5 --- /dev/null +++ b/harness/nextgen/model_projects_project_create_request.go @@ -0,0 +1,16 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +// ProjectCreateRequest defines project creation parameters. +type ProjectsProjectCreateRequest struct { + Project *AppprojectsAppProject `json:"project,omitempty"` + Upsert bool `json:"upsert,omitempty"` +} diff --git a/harness/nextgen/model_projects_project_query.go b/harness/nextgen/model_projects_project_query.go new file mode 100644 index 00000000..807991f6 --- /dev/null +++ b/harness/nextgen/model_projects_project_query.go @@ -0,0 +1,14 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type ProjectsProjectQuery struct { + Name string `json:"name,omitempty"` +} diff --git a/harness/nextgen/model_projects_project_update_request.go b/harness/nextgen/model_projects_project_update_request.go new file mode 100644 index 00000000..704c2b23 --- /dev/null +++ b/harness/nextgen/model_projects_project_update_request.go @@ -0,0 +1,14 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +type ProjectsProjectUpdateRequest struct { + Project *AppprojectsAppProject `json:"project,omitempty"` +} diff --git a/harness/nextgen/model_v1_group_kind.go b/harness/nextgen/model_v1_group_kind.go new file mode 100644 index 00000000..c7a3df3e --- /dev/null +++ b/harness/nextgen/model_v1_group_kind.go @@ -0,0 +1,16 @@ +/* + * Harness NextGen Software Delivery Platform API Reference + * + * The Harness Software Delivery Platform uses OpenAPI Specification v3.0. Harness constantly improves these APIs. Please be aware that some improvements could cause breaking changes. # Introduction The Harness API allows you to integrate and use all the services and modules we provide on the Harness Platform. If you use client-side SDKs, Harness functionality can be integrated with your client-side automation, helping you reduce manual efforts and deploy code faster. For more information about how Harness works, read our [documentation](https://developer.harness.io/docs/getting-started) or visit the [Harness Developer Hub](https://developer.harness.io/). ## How it works The Harness API is a RESTful API that uses standard HTTP verbs. You can send requests in JSON, YAML, or form-data format. The format of the response matches the format of your request. You must send a single request at a time and ensure that you include your authentication key. For more information about this, go to [Authentication](#section/Introduction/Authentication). ## Get started Before you start integrating, get to know our API better by reading the following topics: * [Harness key concepts](https://developer.harness.io/docs/getting-started/learn-harness-key-concepts/) * [Authentication](#section/Introduction/Authentication) * [Requests and responses](#section/Introduction/Requests-and-Responses) * [Common Parameters](#section/Introduction/Common-Parameters-Beta) * [Status Codes](#section/Introduction/Status-Codes) * [Errors](#tag/Error-Response) * [Versioning](#section/Introduction/Versioning-Beta) * [Pagination](/#section/Introduction/Pagination-Beta) The methods you need to integrate with depend on the functionality you want to use. Work with your Harness Solutions Engineer to determine which methods you need. ## Authentication To authenticate with the Harness API, you need to: 1. Generate an API token on the Harness Platform. 2. Send the API token you generate in the `x-api-key` header in each request. ### Generate an API token To generate an API token, complete the following steps: 1. Go to the [Harness Platform](https://app.harness.io/). 2. On the left-hand navigation, click **My Profile**. 3. Click **+API Key**, enter a name for your key and then click **Save**. 4. Within the API Key tile, click **+Token**. 5. Enter a name for your token and click **Generate Token**. **Important**: Make sure to save your token securely. Harness does not store the API token for future reference, so make sure to save your token securely before you leave the page. ### Send the API token in your requests Send the token you created in the Harness Platform in the x-api-key header. For example: `x-api-key: YOUR_API_KEY_HERE` ## Requests and Responses The structure for each request and response is outlined in the API documentation. We have examples in JSON and YAML for every request and response. You can use our online editor to test the examples. ## Common Parameters [Beta] | Field Name | Type | Default | Description | |------------|---------|---------|----------------| | identifier | string | none | URL-friendly version of the name, used to identify a resource within it's scope and so needs to be unique within the scope. | | name | string | none | Human-friendly name for the resource. | | org | string | none | Limit to provided org identifiers. | | project | string | none | Limit to provided project identifiers. | | description| string | none | More information about the specific resource. | | tags | map[string]string | none | List of labels applied to the resource. | | order | string | desc | Order to use when sorting the specified fields. Type: enum(asc,desc). | | sort | string | none | Fields on which to sort. Note: Specify the fields that you want to use for sorting. When doing so, consider the operational overhead of sorting fields. | | limit | int | 30 | Pagination: Number of items to return. | | page | int | 1 | Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page. | | created | int64 | none | Unix timestamp that shows when the resource was created (in milliseconds). | | updated | int64 | none | Unix timestamp that shows when the resource was last edited (in milliseconds). | ## Status Codes Harness uses conventional HTTP status codes to indicate the status of an API request. Generally, 2xx responses are reserved for success and 4xx status codes are reserved for failures. A 5xx response code indicates an error on the Harness server. | Error Code | Description | |-------------|-------------| | 200 | OK | | 201 | Created | | 202 | Accepted | | 204 | No Content | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 412 | Precondition Failed | | 415 | Unsupported Media Type | | 500 | Server Error | To view our error response structures, go [here](#tag/Error-Response). ## Versioning [Beta] ### Harness Version The current version of our Beta APIs is yet to be announced. The version number will use the date-header format and will be valid only for our Beta APIs. ### Generation All our beta APIs are versioned as a Generation, and this version is included in the path to every API resource. For example, v1 beta APIs begin with `app.harness.io/v1/`, where v1 is the API Generation. The version number represents the core API and does not change frequently. The version number changes only if there is a significant departure from the basic underpinnings of the existing API. For example, when Harness performs a system-wide refactoring of core concepts or resources. ## Pagination [Beta] We use pagination to place limits on the number of responses associated with list endpoints. Pagination is achieved by the use of limit query parameters. The limit defaults to 30. Its maximum value is 100. Following are the pagination headers supported in the response bodies of paginated APIs: 1. X-Total-Elements : Indicates the total number of entries in a paginated response. 2. X-Page-Number : Indicates the page number currently returned for a paginated response. 3. X-Page-Size : Indicates the number of entries per page for a paginated response. For example: ``` X-Total-Elements : 30 X-Page-Number : 0 X-Page-Size : 10 ``` + * + * API version: 1.0 + * Contact: contact@harness.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package nextgen + +// +protobuf.options.(gogoproto.goproto_stringer)=false +type V1GroupKind struct { + Group string `json:"group,omitempty"` + Kind string `json:"kind,omitempty"` +}