> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/software-delivery-agent-apis/gitops/agents.md).

# Agents

## GET /api/v1/agents

> List agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents":{"get":{"description":"List agents.","operationId":"AgentServiceForServer_List","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentList"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"identifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET"}},{"name":"tags","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageIndex","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"}},{"name":"drIdentifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}},{"name":"metadataOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ignoreScope","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"connectedStatus","in":"query","required":false,"schema":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"}},{"name":"healthStatus","in":"query","required":false,"schema":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"}},{"name":"withCredentials","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeSecondary","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"drType","in":"query","required":false,"schema":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1AgentList":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/v1Agent"}},"totalPages":{"type":"integer","format":"int32"},"totalItems":{"type":"integer","format":"int32"},"pageItemCount":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"pageIndex":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## POST /api/v1/agents

> Create agent.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents":{"post":{"description":"Create agent.","operationId":"AgentServiceForServer_Create","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"requestBody":{"$ref":"#/components/requestBodies/v1Agent"},"tags":["Agents"]}}},"components":{"schemas":{"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}},"requestBodies":{"v1Agent":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}},"required":true}}}}
```

## GET /api/v1/agents/ns

> Get agent namespaces.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/ns":{"get":{"description":"Get agent namespaces.","operationId":"AgentServiceForServer_ListNamespaces","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gitopsservicev1NamespaceList"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"identifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET"}},{"name":"tags","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageIndex","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"}},{"name":"drIdentifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}},{"name":"metadataOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ignoreScope","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"connectedStatus","in":"query","required":false,"schema":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"}},{"name":"healthStatus","in":"query","required":false,"schema":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"}},{"name":"withCredentials","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeSecondary","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"drType","in":"query","required":false,"schema":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"}}],"tags":["Agents"]}}},"components":{"schemas":{"gitopsservicev1NamespaceList":{"type":"object","properties":{"namespaces":{"type":"array","items":{"$ref":"#/components/schemas/gitopsservicev1Namespace"}},"totalPages":{"type":"integer","format":"int32"},"totalItems":{"type":"integer","format":"int32"},"pageItemCount":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"pageIndex":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"gitopsservicev1Namespace":{"type":"object","properties":{"name":{"type":"string"}}},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## POST /api/v1/agents/search

> Search agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/search":{"post":{"description":"Search agents.","operationId":"AgentServiceForServer_Search","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentList"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentQuery"}}},"required":true},"tags":["Agents"]}}},"components":{"schemas":{"v1AgentList":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/v1Agent"}},"totalPages":{"type":"integer","format":"int32"},"totalItems":{"type":"integer","format":"int32"},"pageItemCount":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"pageIndex":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"v1AgentQuery":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1AgentType"},"tags":{"type":"array","items":{"type":"string"}},"searchTerm":{"type":"string"},"pageSize":{"type":"integer","format":"int32"},"pageIndex":{"type":"integer","format":"int32"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"filter":{"type":"object","description":"Filters for Agents."},"drIdentifier":{"type":"string"},"sortBy":{"$ref":"#/components/schemas/AgentQueryAgentSortByOptions"},"sortOrder":{"$ref":"#/components/schemas/v1SortOrderOptions"},"metadataOnly":{"type":"boolean"},"ignoreScope":{"type":"boolean"},"connectedStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"healthStatus":{"$ref":"#/components/schemas/servicev1HealthStatus"},"withCredentials":{"type":"boolean","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent."},"includeSecondary":{"type":"boolean"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"drType":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"AgentQueryAgentSortByOptions":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"},"v1SortOrderOptions":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}}}}
```

## GET /api/v1/agents/tags

> Get agent tags.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/tags":{"get":{"description":"Get agent tags.","operationId":"AgentServiceForServer_ListTags","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1TagMap"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"identifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET"}},{"name":"tags","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageIndex","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"}},{"name":"drIdentifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}},{"name":"metadataOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ignoreScope","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"connectedStatus","in":"query","required":false,"schema":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"}},{"name":"healthStatus","in":"query","required":false,"schema":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"}},{"name":"withCredentials","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeSecondary","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"drType","in":"query","required":false,"schema":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1TagMap":{"type":"object","properties":{"tags":{"type":"object","additionalProperties":{"type":"string"}},"totalPages":{"type":"integer","format":"int32"},"totalItems":{"type":"integer","format":"int32"},"pageItemCount":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"pageIndex":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## GET /api/v1/agents/versions

> Get agent versions.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/versions":{"get":{"description":"Get agent versions.","operationId":"AgentServiceForServer_ListVersions","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1VersionList"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"identifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET"}},{"name":"tags","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageIndex","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"}},{"name":"drIdentifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}},{"name":"metadataOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ignoreScope","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"connectedStatus","in":"query","required":false,"schema":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"}},{"name":"healthStatus","in":"query","required":false,"schema":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"}},{"name":"withCredentials","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeSecondary","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"drType","in":"query","required":false,"schema":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1VersionList":{"type":"object","properties":{"versions":{"type":"array","items":{"$ref":"#/components/schemas/v1SemanticVersion"}},"totalPages":{"type":"integer","format":"int32"},"totalItems":{"type":"integer","format":"int32"},"pageItemCount":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"pageIndex":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## Update agents.

> This API can be used to update an agent's details in Harness. The following fields will be updated to the new values in the body - "tags", "metadata"(all nested fields in metadata will be replaced with new provided values including empty/nil values if they're sent), "description", "type". A regular agent can be converted to a DR primary by setting "drType" to PRIMARY and providing a PRIMARY "disasterRecoveryNode". Download and reapply the agent manifest after conversion.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agent.identifier}":{"put":{"summary":"Update agents.","description":"This API can be used to update an agent's details in Harness. The following fields will be updated to the new values in the body - \"tags\", \"metadata\"(all nested fields in metadata will be replaced with new provided values including empty/nil values if they're sent), \"description\", \"type\". A regular agent can be converted to a DR primary by setting \"drType\" to PRIMARY and providing a PRIMARY \"disasterRecoveryNode\". Download and reapply the agent manifest after conversion.","operationId":"AgentServiceForServer_Update","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agent.identifier","description":"The gitops-server generated ID for this gitops-agent","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/v1Agent"},"tags":["Agents"]}}},"components":{"schemas":{"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}},"requestBodies":{"v1Agent":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}},"required":true}}}}
```

## GET /api/v1/agents/{agentIdentifier}/deploy.yaml

> GetDeployYaml returns deployment yamls for agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/deploy.yaml":{"get":{"description":"GetDeployYaml returns deployment yamls for agents.","operationId":"AgentServiceForServer_GetDeployYaml","responses":{"200":{"description":"A successful response.","content":{"application/yaml":{"schema":{"type":"string"}}}},"default":{"description":"An unexpected error response.","content":{"application/yaml":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"namespace","in":"query","required":false,"schema":{"type":"string"}},{"name":"disasterRecoveryIdentifier","description":"Disaster Recovery Identifier for entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"skipCrds","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"caData","description":"Certificate chain for the agent, must be base64 encoded.","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.http","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.https","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.username","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.password","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.skipSSLVerify","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"privateKey","in":"query","required":false,"schema":{"type":"string"}},{"name":"argocdSettings.enableHelmPathTraversal","description":"Controls the Environment variable HELM_SECRETS_VALUES_ALLOW_PATH_TRAVERSAL to allow or deny dot-dot-slash values file paths. Disabled by default for security reasons. This config is pushed as an env variable to the repo-server.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.forceEnableInCluster","description":"For a Namespaced gitops agent, incluster is disabled by default. (controlled through variable `cluster.inclusterEnabled` in argocd-cm configmap. NOTE that you will have to manually restrict your namespaced agent's scope to its own cluster since this essentially makes the namespaced agent have access to incluster completely including creating clusterroles.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.enableArgocdHarnessPlugin","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.applicationNamespaces","description":"Comma-separated list of namespaces (or \"*\" for all) where Application CRs are allowed to live. Maps to application.namespaces in argocd-cmd-params-cm.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Agents"]}}},"components":{"schemas":{"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## POST /api/v1/agents/{agentIdentifier}/deployment-spec/helm

> PostDeployHelmChart returns the Helm Chart for deploying the agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/deployment-spec/helm":{"post":{"description":"PostDeployHelmChart returns the Helm Chart for deploying the agents.","operationId":"AgentServiceForServer_PostDeployHelmChart","responses":{"200":{"description":"A successful response.(streaming responses)","content":{"application/octet-stream":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/v1DownloadResponse"},"error":{"$ref":"#/components/schemas/runtimeStreamError"}},"title":"Stream result of v1DownloadResponse"}}}},"default":{"description":"An unexpected error response.","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/v1AgentYamlQuery"},"tags":["Agents"]}}},"components":{"schemas":{"v1DownloadResponse":{"type":"object","properties":{"chunk":{"type":"string","format":"byte"}}},"runtimeStreamError":{"type":"object","properties":{"grpc_code":{"type":"integer","format":"int32"},"http_code":{"type":"integer","format":"int32"},"message":{"type":"string"},"http_status":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"v1AgentYamlQuery":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"namespace":{"type":"string"},"disasterRecoveryIdentifier":{"type":"string","description":"Disaster Recovery Identifier for entity."},"skipCrds":{"type":"boolean"},"caData":{"type":"string","description":"Certificate chain for the agent, must be base64 encoded."},"proxy":{"$ref":"#/components/schemas/v1Proxy"},"privateKey":{"type":"string"},"argocdSettings":{"$ref":"#/components/schemas/v1ArgoCDSettings"}}},"v1Proxy":{"type":"object","properties":{"http":{"type":"string"},"https":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"skipSSLVerify":{"type":"boolean"}}},"v1ArgoCDSettings":{"type":"object","properties":{"enableHelmPathTraversal":{"type":"boolean","description":"Controls the Environment variable HELM_SECRETS_VALUES_ALLOW_PATH_TRAVERSAL to allow or deny dot-dot-slash values file paths. Disabled by default for security reasons. This config is pushed as an env variable to the repo-server."},"forceEnableInCluster":{"type":"boolean","description":"For a Namespaced gitops agent, incluster is disabled by default. (controlled through variable `cluster.inclusterEnabled` in argocd-cm configmap. NOTE that you will have to manually restrict your namespaced agent's scope to its own cluster since this essentially makes the namespaced agent have access to incluster completely including creating clusterroles."},"enableArgocdHarnessPlugin":{"type":"boolean"},"applicationNamespaces":{"type":"string","description":"Comma-separated list of namespaces (or \"*\" for all) where Application CRs are allowed to live. Maps to application.namespaces in argocd-cmd-params-cm."}}}},"requestBodies":{"v1AgentYamlQuery":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentYamlQuery"}}},"required":true}}}}
```

## POST /api/v1/agents/{agentIdentifier}/deployment-spec/yaml

> PostDeployYaml returns deployment yamls for agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/deployment-spec/yaml":{"post":{"description":"PostDeployYaml returns deployment yamls for agents.","operationId":"AgentServiceForServer_PostDeployYaml","responses":{"200":{"description":"A successful response.","content":{"application/yaml":{"schema":{"type":"string"}}}},"default":{"description":"An unexpected error response.","content":{"application/yaml":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/v1AgentYamlQuery"},"tags":["Agents"]}}},"components":{"schemas":{"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"v1AgentYamlQuery":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"namespace":{"type":"string"},"disasterRecoveryIdentifier":{"type":"string","description":"Disaster Recovery Identifier for entity."},"skipCrds":{"type":"boolean"},"caData":{"type":"string","description":"Certificate chain for the agent, must be base64 encoded."},"proxy":{"$ref":"#/components/schemas/v1Proxy"},"privateKey":{"type":"string"},"argocdSettings":{"$ref":"#/components/schemas/v1ArgoCDSettings"}}},"v1Proxy":{"type":"object","properties":{"http":{"type":"string"},"https":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"skipSSLVerify":{"type":"boolean"}}},"v1ArgoCDSettings":{"type":"object","properties":{"enableHelmPathTraversal":{"type":"boolean","description":"Controls the Environment variable HELM_SECRETS_VALUES_ALLOW_PATH_TRAVERSAL to allow or deny dot-dot-slash values file paths. Disabled by default for security reasons. This config is pushed as an env variable to the repo-server."},"forceEnableInCluster":{"type":"boolean","description":"For a Namespaced gitops agent, incluster is disabled by default. (controlled through variable `cluster.inclusterEnabled` in argocd-cm configmap. NOTE that you will have to manually restrict your namespaced agent's scope to its own cluster since this essentially makes the namespaced agent have access to incluster completely including creating clusterroles."},"enableArgocdHarnessPlugin":{"type":"boolean"},"applicationNamespaces":{"type":"string","description":"Comma-separated list of namespaces (or \"*\" for all) where Application CRs are allowed to live. Maps to application.namespaces in argocd-cmd-params-cm."}}}},"requestBodies":{"v1AgentYamlQuery":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentYamlQuery"}}},"required":true}}}}
```

## GET /api/v1/agents/{agentIdentifier}/helm-chart

> GetDeployHelmChart returns the Helm Chart for deploying the agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/helm-chart":{"get":{"description":"GetDeployHelmChart returns the Helm Chart for deploying the agents.","operationId":"AgentServiceForServer_GetDeployHelmChart","responses":{"200":{"description":"A successful response.(streaming responses)","content":{"application/octet-stream":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/v1DownloadResponse"},"error":{"$ref":"#/components/schemas/runtimeStreamError"}},"title":"Stream result of v1DownloadResponse"}}}},"default":{"description":"An unexpected error response.","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"namespace","in":"query","required":false,"schema":{"type":"string"}},{"name":"disasterRecoveryIdentifier","description":"Disaster Recovery Identifier for entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"skipCrds","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"caData","description":"Certificate chain for the agent, must be base64 encoded.","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.http","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.https","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.username","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.password","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.skipSSLVerify","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"privateKey","in":"query","required":false,"schema":{"type":"string"}},{"name":"argocdSettings.enableHelmPathTraversal","description":"Controls the Environment variable HELM_SECRETS_VALUES_ALLOW_PATH_TRAVERSAL to allow or deny dot-dot-slash values file paths. Disabled by default for security reasons. This config is pushed as an env variable to the repo-server.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.forceEnableInCluster","description":"For a Namespaced gitops agent, incluster is disabled by default. (controlled through variable `cluster.inclusterEnabled` in argocd-cm configmap. NOTE that you will have to manually restrict your namespaced agent's scope to its own cluster since this essentially makes the namespaced agent have access to incluster completely including creating clusterroles.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.enableArgocdHarnessPlugin","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.applicationNamespaces","description":"Comma-separated list of namespaces (or \"*\" for all) where Application CRs are allowed to live. Maps to application.namespaces in argocd-cmd-params-cm.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1DownloadResponse":{"type":"object","properties":{"chunk":{"type":"string","format":"byte"}}},"runtimeStreamError":{"type":"object","properties":{"grpc_code":{"type":"integer","format":"int32"},"http_code":{"type":"integer","format":"int32"},"message":{"type":"string"},"http_status":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}}}}}
```

## GET /api/v1/agents/{agentIdentifier}/helm-overrides

> GetDeployOverrides returns the Helm Chart overrides for the agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/helm-overrides":{"get":{"description":"GetDeployOverrides returns the Helm Chart overrides for the agents.","operationId":"AgentServiceForServer_GetDeployOverrides","responses":{"200":{"description":"A successful response.","content":{"application/yaml":{"schema":{"type":"string"}}}},"default":{"description":"An unexpected error response.","content":{"application/yaml":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"namespace","in":"query","required":false,"schema":{"type":"string"}},{"name":"disasterRecoveryIdentifier","description":"Disaster Recovery Identifier for entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"skipCrds","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"caData","description":"Certificate chain for the agent, must be base64 encoded.","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.http","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.https","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.username","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.password","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.skipSSLVerify","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"privateKey","in":"query","required":false,"schema":{"type":"string"}},{"name":"argocdSettings.enableHelmPathTraversal","description":"Controls the Environment variable HELM_SECRETS_VALUES_ALLOW_PATH_TRAVERSAL to allow or deny dot-dot-slash values file paths. Disabled by default for security reasons. This config is pushed as an env variable to the repo-server.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.forceEnableInCluster","description":"For a Namespaced gitops agent, incluster is disabled by default. (controlled through variable `cluster.inclusterEnabled` in argocd-cm configmap. NOTE that you will have to manually restrict your namespaced agent's scope to its own cluster since this essentially makes the namespaced agent have access to incluster completely including creating clusterroles.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.enableArgocdHarnessPlugin","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.applicationNamespaces","description":"Comma-separated list of namespaces (or \"*\" for all) where Application CRs are allowed to live. Maps to application.namespaces in argocd-cmd-params-cm.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Agents"]}}},"components":{"schemas":{"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## POST /api/v1/agents/{agentIdentifier}/helm-overrides

> PostDeployOverrides returns the Helm Chart overrides for deploying the agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/helm-overrides":{"post":{"description":"PostDeployOverrides returns the Helm Chart overrides for deploying the agents.","operationId":"AgentServiceForServer_PostDeployOverrides","responses":{"200":{"description":"A successful response.","content":{"application/yaml":{"schema":{"type":"string"}}}},"default":{"description":"An unexpected error response.","content":{"application/yaml":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/v1AgentYamlQuery"},"tags":["Agents"]}}},"components":{"schemas":{"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"v1AgentYamlQuery":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"namespace":{"type":"string"},"disasterRecoveryIdentifier":{"type":"string","description":"Disaster Recovery Identifier for entity."},"skipCrds":{"type":"boolean"},"caData":{"type":"string","description":"Certificate chain for the agent, must be base64 encoded."},"proxy":{"$ref":"#/components/schemas/v1Proxy"},"privateKey":{"type":"string"},"argocdSettings":{"$ref":"#/components/schemas/v1ArgoCDSettings"}}},"v1Proxy":{"type":"object","properties":{"http":{"type":"string"},"https":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"skipSSLVerify":{"type":"boolean"}}},"v1ArgoCDSettings":{"type":"object","properties":{"enableHelmPathTraversal":{"type":"boolean","description":"Controls the Environment variable HELM_SECRETS_VALUES_ALLOW_PATH_TRAVERSAL to allow or deny dot-dot-slash values file paths. Disabled by default for security reasons. This config is pushed as an env variable to the repo-server."},"forceEnableInCluster":{"type":"boolean","description":"For a Namespaced gitops agent, incluster is disabled by default. (controlled through variable `cluster.inclusterEnabled` in argocd-cm configmap. NOTE that you will have to manually restrict your namespaced agent's scope to its own cluster since this essentially makes the namespaced agent have access to incluster completely including creating clusterroles."},"enableArgocdHarnessPlugin":{"type":"boolean"},"applicationNamespaces":{"type":"string","description":"Comma-separated list of namespaces (or \"*\" for all) where Application CRs are allowed to live. Maps to application.namespaces in argocd-cmd-params-cm."}}}},"requestBodies":{"v1AgentYamlQuery":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentYamlQuery"}}},"required":true}}}}
```

## GET /api/v1/agents/{agentIdentifier}/operator/yaml

> GetOperatorYaml returns operator yaml for deploying the agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/operator/yaml":{"get":{"description":"GetOperatorYaml returns operator yaml for deploying the agents.","operationId":"AgentServiceForServer_GetOperatorYaml","responses":{"200":{"description":"A successful response.","content":{"application/yaml":{"schema":{"type":"string"}}}},"default":{"description":"An unexpected error response.","content":{"application/yaml":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"namespace","in":"query","required":false,"schema":{"type":"string"}},{"name":"disasterRecoveryIdentifier","description":"Disaster Recovery Identifier for entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"skipCrds","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"caData","description":"Certificate chain for the agent, must be base64 encoded.","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.http","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.https","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.username","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.password","in":"query","required":false,"schema":{"type":"string"}},{"name":"proxy.skipSSLVerify","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"privateKey","in":"query","required":false,"schema":{"type":"string"}},{"name":"argocdSettings.enableHelmPathTraversal","description":"Controls the Environment variable HELM_SECRETS_VALUES_ALLOW_PATH_TRAVERSAL to allow or deny dot-dot-slash values file paths. Disabled by default for security reasons. This config is pushed as an env variable to the repo-server.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.forceEnableInCluster","description":"For a Namespaced gitops agent, incluster is disabled by default. (controlled through variable `cluster.inclusterEnabled` in argocd-cm configmap. NOTE that you will have to manually restrict your namespaced agent's scope to its own cluster since this essentially makes the namespaced agent have access to incluster completely including creating clusterroles.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.enableArgocdHarnessPlugin","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"argocdSettings.applicationNamespaces","description":"Comma-separated list of namespaces (or \"*\" for all) where Application CRs are allowed to live. Maps to application.namespaces in argocd-cmd-params-cm.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Agents"]}}},"components":{"schemas":{"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## POST /api/v1/agents/{agentIdentifier}/operator/yaml

> PostOperatorYaml returns operator yaml for deploying the agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/operator/yaml":{"post":{"description":"PostOperatorYaml returns operator yaml for deploying the agents.","operationId":"AgentServiceForServer_PostOperatorYaml","responses":{"200":{"description":"A successful response.","content":{"application/yaml":{"schema":{"type":"string"}}}},"default":{"description":"An unexpected error response.","content":{"application/yaml":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/v1AgentYamlQuery"},"tags":["Agents"]}}},"components":{"schemas":{"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"v1AgentYamlQuery":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"namespace":{"type":"string"},"disasterRecoveryIdentifier":{"type":"string","description":"Disaster Recovery Identifier for entity."},"skipCrds":{"type":"boolean"},"caData":{"type":"string","description":"Certificate chain for the agent, must be base64 encoded."},"proxy":{"$ref":"#/components/schemas/v1Proxy"},"privateKey":{"type":"string"},"argocdSettings":{"$ref":"#/components/schemas/v1ArgoCDSettings"}}},"v1Proxy":{"type":"object","properties":{"http":{"type":"string"},"https":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"skipSSLVerify":{"type":"boolean"}}},"v1ArgoCDSettings":{"type":"object","properties":{"enableHelmPathTraversal":{"type":"boolean","description":"Controls the Environment variable HELM_SECRETS_VALUES_ALLOW_PATH_TRAVERSAL to allow or deny dot-dot-slash values file paths. Disabled by default for security reasons. This config is pushed as an env variable to the repo-server."},"forceEnableInCluster":{"type":"boolean","description":"For a Namespaced gitops agent, incluster is disabled by default. (controlled through variable `cluster.inclusterEnabled` in argocd-cm configmap. NOTE that you will have to manually restrict your namespaced agent's scope to its own cluster since this essentially makes the namespaced agent have access to incluster completely including creating clusterroles."},"enableArgocdHarnessPlugin":{"type":"boolean"},"applicationNamespaces":{"type":"string","description":"Comma-separated list of namespaces (or \"*\" for all) where Application CRs are allowed to live. Maps to application.namespaces in argocd-cmd-params-cm."}}}},"requestBodies":{"v1AgentYamlQuery":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentYamlQuery"}}},"required":true}}}}
```

## PATCH /api/v1/agents/{agentIdentifier}/primaryNode

> Set primary disaster recovery node.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/primaryNode":{"patch":{"description":"Set primary disaster recovery node.","operationId":"AgentServiceForServer_SetPrimaryNode","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentSetPrimaryNodeRequest"}}},"required":true},"tags":["Agents"]}}},"components":{"schemas":{"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"v1AgentSetPrimaryNodeRequest":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"disasterRecoveryIdentifier":{"type":"string","description":"Disaster Recovery Identifier for entity."},"disableSyncWindows":{"type":"boolean","description":"Disable sync windows for the new primary agent."}}}}}}
```

## GET /api/v1/agents/{agentIdentifier}/sync-allowed

> GetSyncStatus returns the sync status of the agent.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/sync-allowed":{"get":{"description":"GetSyncStatus returns the sync status of the agent.","operationId":"AgentServiceForServer_GetSyncAllowed","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1SyncAllowedResponse"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent Identifier for the Entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"disasterRecoveryIdentifier","description":"Disaster Recovery Identifier for entity.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1SyncAllowedResponse":{"type":"object","properties":{"syncAllowed":{"type":"boolean"}}},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## PUT /api/v1/agents/{agentIdentifier}/sync-allowed

> UpdateSyncAllowed updates the sync status of the agent by creating deny sync windows for mapped app projects.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/sync-allowed":{"put":{"description":"UpdateSyncAllowed updates the sync status of the agent by creating deny sync windows for mapped app projects.","operationId":"AgentServiceForServer_UpdateSyncAllowed","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1SyncAllowedResponse"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent Identifier for the Entity.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentSyncAllowedUpdateRequest"}}},"required":true},"tags":["Agents"]}}},"components":{"schemas":{"v1SyncAllowedResponse":{"type":"object","properties":{"syncAllowed":{"type":"boolean"}}},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"v1AgentSyncAllowedUpdateRequest":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent Identifier for the Entity."},"disasterRecoveryIdentifier":{"type":"string","description":"Disaster Recovery Identifier for entity."},"syncAllowed":{"type":"boolean","description":"Sync allowed for the entity."}}}}}}
```

## GET /api/v1/agents/{identifier}

> Get agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{identifier}":{"get":{"description":"Get agents.","operationId":"AgentServiceForServer_Get","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET"}},{"name":"tags","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageIndex","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"}},{"name":"drIdentifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}},{"name":"metadataOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ignoreScope","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"connectedStatus","in":"query","required":false,"schema":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"}},{"name":"healthStatus","in":"query","required":false,"schema":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"}},{"name":"withCredentials","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeSecondary","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"drType","in":"query","required":false,"schema":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## DELETE /api/v1/agents/{identifier}

> Delete agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{identifier}":{"delete":{"description":"Delete agents.","operationId":"AgentServiceForServer_Delete","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET"}},{"name":"tags","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageIndex","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"}},{"name":"drIdentifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}},{"name":"metadataOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ignoreScope","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"connectedStatus","in":"query","required":false,"schema":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"}},{"name":"healthStatus","in":"query","required":false,"schema":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"}},{"name":"withCredentials","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeSecondary","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"drType","in":"query","required":false,"schema":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## POST /api/v1/agents/{identifier}/credentials

> Regenerate credentials for agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{identifier}/credentials":{"post":{"description":"Regenerate credentials for agents.","operationId":"AgentServiceForServer_RegenerateCredentials","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## POST /api/v1/agents/{identifier}/scale

> Scale the Hosted agent.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{identifier}/scale":{"post":{"description":"Scale the Hosted agent.","operationId":"AgentServiceForServer_Scale","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Agent"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1AgentScaleRequest"}}},"required":true},"tags":["Agents"]}}},"components":{"schemas":{"v1Agent":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity.","title":"The ID of the Harness Account that this gitops-agent belongs to"},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity.","title":"The ID of the Harness Project that this gitops-agent belongs to"},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity.","title":"The ID of the Harness Organization that this gitops-agent belongs to"},"identifier":{"type":"string","title":"The gitops-server generated ID for this gitops-agent"},"name":{"type":"string","title":"A human readable name for the gitops-agent"},"metadata":{"$ref":"#/components/schemas/v1AgentMetadata"},"description":{"type":"string","title":"A human readable description for the gitops-agent"},"type":{"$ref":"#/components/schemas/v1AgentType"},"createdAt":{"$ref":"#/components/schemas/v1Time"},"lastModifiedAt":{"$ref":"#/components/schemas/v1Time"},"tags":{"type":"object","additionalProperties":{"type":"string"},"title":"Tags that help organize gitops-agents"},"health":{"$ref":"#/components/schemas/v1AgentHealth"},"credentials":{"$ref":"#/components/schemas/v1AgentCredentials"},"version":{"$ref":"#/components/schemas/v1SemanticVersion"},"upgradeAvailable":{"type":"boolean","title":"Indicates whether this agent has an upgrade available (i.e. the version of this gitops-agent is not the latest released)"},"scope":{"$ref":"#/components/schemas/v1AgentScope"},"disasterRecoveryNode":{"$ref":"#/components/schemas/v1DisasterRecoveryNode"},"isPLG":{"type":"boolean","description":"Indicates if the agent is for PLG."},"operator":{"$ref":"#/components/schemas/v1AgentOperator"},"prefixedIdentifier":{"type":"string","description":"The scoped identifier of the agent. This is a combination of the account, org, project, and agent identifiers."},"deletionInProgress":{"type":"boolean","title":"Deletion in progress"},"uuid":{"type":"string","description":"Server-generated UUID for this agent.","title":"Server-generated UUID for this agent, set at creation"}},"title":"A gitops-agent"},"v1AgentMetadata":{"type":"object","properties":{"namespace":{"type":"string","title":"The k8s namespace that this agent resides in"},"highAvailability":{"type":"boolean","title":"Whether or not this deployment should be deployed using deploy-ha.yaml"},"deployedApplicationCount":{"type":"integer","format":"int32","title":"Number of Deployed Applications"},"existingInstallation":{"type":"boolean","title":"If the agent is running in an existing argo installation"},"mappedProjects":{"$ref":"#/components/schemas/servicev1AppProjectMapping"},"infraType":{"$ref":"#/components/schemas/v1ClusterInfraType"},"isNamespaced":{"type":"boolean"},"releaseName":{"type":"string","title":"The Helm release name used when rendering install manifests for this agent"}}},"servicev1AppProjectMapping":{"type":"object","properties":{"appProjMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/servicev1Project"}}}},"servicev1Project":{"type":"object","properties":{"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"autoCreateServiceEnv":{"type":"boolean","description":"Enable automated creation of service,environment and cluster-env link. Defaults to false."}}},"v1ClusterInfraType":{"type":"string","enum":["UNSET","OPENSHIFT"],"default":"UNSET","title":"Agent destination cluster type"},"v1AgentType":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET","description":"AgentType is the type of agent. CONNECTED_ARGO_PROVIDER is deprecated and will be removed in a future release.\n\nPlease use type \"MANAGED_ARGO_PROVIDER\" to create your agents.\n\n\"MANAGED_ARGO_PROVIDER\" agents are user managed agents and \"HOSTED_ARGO_PROVIDER\" agents are Harness managed agents(these cannot be created by users directly)."},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"v1AgentHealth":{"type":"object","properties":{"lastHeartbeat":{"type":"string","format":"date-time","title":"The last time the agent sent a HeartbeatRequest"},"argoRepoServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoAppController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoRedisServer":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"harnessGitopsAgent":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"connectionStatus":{"$ref":"#/components/schemas/v1ConnectedStatus"},"argoAppSetController":{"$ref":"#/components/schemas/v1AgentComponentHealth"},"argoHAProxy":{"$ref":"#/components/schemas/v1AgentComponentHealth"}}},"v1AgentComponentHealth":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/servicev1HealthStatus"},"k8sError":{"type":"string"},"message":{"type":"string"},"version":{"type":"string"}}},"servicev1HealthStatus":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"},"v1ConnectedStatus":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"},"v1AgentCredentials":{"type":"object","properties":{"privateKey":{"type":"string"},"publicKey":{"type":"string"}}},"v1SemanticVersion":{"type":"object","properties":{"major":{"type":"string","format":"int64"},"minor":{"type":"string","format":"int64"},"patch":{"type":"string","format":"int64"}}},"v1AgentScope":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"},"v1DisasterRecoveryNode":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/v1DisasterRecoveryType"}}},"v1DisasterRecoveryType":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"},"v1AgentOperator":{"type":"string","enum":["UNKNOWN","ARGO","FLAMINGO"],"default":"UNKNOWN"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"v1AgentScaleRequest":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"identifier":{"type":"string"},"type":{"type":"string"},"replicas":{"type":"integer","format":"int32"}}}}}}
```

GetSecretResolutionEnabled reports whether Harness secret resolution is enabled\
for this account and agent version.
-----------------------------------

> Reports whether Harness secret resolution is enabled for the agent.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{identifier}/secret-resolution/enabled":{"get":{"summary":"GetSecretResolutionEnabled reports whether Harness secret resolution is enabled\nfor this account and agent version.","description":"Reports whether Harness secret resolution is enabled for the agent.","operationId":"AgentServiceForServer_GetSecretResolutionEnabled","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1SecretResolutionEnabledResponse"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET"}},{"name":"tags","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageIndex","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"}},{"name":"drIdentifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}},{"name":"metadataOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ignoreScope","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"connectedStatus","in":"query","required":false,"schema":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"}},{"name":"healthStatus","in":"query","required":false,"schema":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"}},{"name":"withCredentials","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeSecondary","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"drType","in":"query","required":false,"schema":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1SecretResolutionEnabledResponse":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## GET /api/v1/agents/{identifier}/unique

> Unique returns unique agents.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{identifier}/unique":{"get":{"description":"Unique returns unique agents.","operationId":"AgentServiceForServer_Unique","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1UniqueMessage"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_TYPE_UNSET","CONNECTED_ARGO_PROVIDER","MANAGED_ARGO_PROVIDER","HOSTED_ARGO_PROVIDER"],"default":"AGENT_TYPE_UNSET"}},{"name":"tags","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageIndex","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["AGENT_SCOPE_UNSET","ACCOUNT","ORG","PROJECT"],"default":"AGENT_SCOPE_UNSET"}},{"name":"drIdentifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","HEALTH_STATUS","CONNECTIVITY_STATUS","NAMESPACE","VERSION"],"default":"SORT_BY_NOT_SET"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}},{"name":"metadataOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ignoreScope","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"connectedStatus","in":"query","required":false,"schema":{"type":"string","enum":["CONNECTED_STATUS_UNSET","CONNECTED","DISCONNECTED"],"default":"CONNECTED_STATUS_UNSET"}},{"name":"healthStatus","in":"query","required":false,"schema":{"type":"string","enum":["HEALTH_STATUS_UNSET","HEALTHY","UNHEALTHY"],"default":"HEALTH_STATUS_UNSET"}},{"name":"withCredentials","description":"Applicable when trying to retrieve an agent. Set to true to include the credentials for the agent in the response. (Private key may not be included in response if agent is already connected to harness). NOTE: Setting this to true requires the user to have edit permissions on Agent.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeSecondary","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"drType","in":"query","required":false,"schema":{"type":"string","enum":["UNKNOWN_TYPE","PRIMARY","SECONDARY"],"default":"UNKNOWN_TYPE"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1UniqueMessage":{"type":"object","properties":{"unique":{"type":"boolean"}}},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## GET /api/v2/versions/agents/upgrade-available

> Check for version updates.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v2/versions/agents/upgrade-available":{"get":{"description":"Check for version updates.","operationId":"VersionUpgradeService_UpgradeAvailableV2","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1VersionUpgradeResponse"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"existingVersion","description":"Current Agent Version","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Agents"]}}},"components":{"schemas":{"v1VersionUpgradeResponse":{"type":"object","properties":{"ShouldUpgrade":{"type":"boolean","description":"Indicates whether agent has an upgrade available or not"},"AgentImageTag":{"type":"string","description":"Docker image tag for agent"},"ArgoCDImage":{"type":"string","description":"Latest ArgoCDImage"},"FlamingoArgoCDImage":{"type":"string","description":"Latest FlamingoArgoCDImage"},"HAProxyImage":{"type":"string","description":"Latest HAProxyImage"},"RedisImage":{"type":"string","description":"Latest redis image"},"SopsImage":{"type":"string","description":"Latest sopsInstaller image"}}},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```
