{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-v1-agent-query-schema.json", "title": "v1AgentQuery", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/harness-agents-api-openapi.yml#/components/schemas/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": "#/$defs/v1AgentType" }, "tags": { "type": "array", "items": { "type": "string" } }, "searchTerm": { "type": "string" }, "pageSize": { "type": "integer", "format": "int32" }, "pageIndex": { "type": "integer", "format": "int32" }, "scope": { "$ref": "#/$defs/v1AgentScope" }, "filter": { "type": "object", "description": "Filters for Agents." }, "drIdentifier": { "type": "string" }, "sortBy": { "$ref": "#/$defs/AgentQueryAgentSortByOptions" }, "sortOrder": { "$ref": "#/$defs/v1SortOrderOptions" }, "metadataOnly": { "type": "boolean" }, "ignoreScope": { "type": "boolean" }, "connectedStatus": { "$ref": "#/$defs/v1ConnectedStatus" }, "healthStatus": { "$ref": "#/$defs/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": "#/$defs/servicev1AppProjectMapping" } }, "$defs": { "AgentQueryAgentSortByOptions": { "type": "string", "enum": [ "SORT_BY_NOT_SET", "NAME", "HEALTH_STATUS", "CONNECTIVITY_STATUS", "NAMESPACE", "VERSION" ], "default": "SORT_BY_NOT_SET" }, "servicev1AppProjectMapping": { "type": "object", "properties": { "appProjMap": { "type": "object", "additionalProperties": { "$ref": "#/$defs/servicev1Project" } } } }, "servicev1HealthStatus": { "type": "string", "enum": [ "HEALTH_STATUS_UNSET", "HEALTHY", "UNHEALTHY" ], "default": "HEALTH_STATUS_UNSET" }, "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." } } }, "v1AgentScope": { "type": "string", "enum": [ "AGENT_SCOPE_UNSET", "ACCOUNT", "ORG", "PROJECT" ], "default": "AGENT_SCOPE_UNSET" }, "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)." }, "v1ConnectedStatus": { "type": "string", "enum": [ "CONNECTED_STATUS_UNSET", "CONNECTED", "DISCONNECTED" ], "default": "CONNECTED_STATUS_UNSET" }, "v1SortOrderOptions": { "type": "string", "enum": [ "SORT_ORDER_NOT_SET", "ASC", "DESC" ], "default": "SORT_ORDER_NOT_SET" } } }