# Get resource tree

ResourceTree returns resource tree.

Endpoint: GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.applicationName}/resource-tree
Version: 1.0
Security: x-api-key

## Path parameters:

  - `agentIdentifier` (string, required)
    Agent identifier for entity.

  - `query.applicationName` (string, required)

## Query parameters:

  - `accountIdentifier` (string)
    Account Identifier for the Entity.

  - `orgIdentifier` (string)
    Organization Identifier for the Entity.

  - `projectIdentifier` (string)
    Project Identifier for the Entity.

  - `query.namespace` (string)

  - `query.name` (string)

  - `query.version` (string)

  - `query.group` (string)

  - `query.kind` (string)

  - `query.appNamespace` (string)

  - `query.project` (string)

## Response 200 fields (application/json):

  - `nodes` (array)
    Nodes contains a list of resources that are either directly managed by the application
or are children of directly managed resources.

  - `nodes.resourceRef` (object)

  - `nodes.resourceRef.group` (string)

  - `nodes.resourceRef.version` (string)

  - `nodes.resourceRef.kind` (string)

  - `nodes.resourceRef.namespace` (string)

  - `nodes.resourceRef.name` (string)

  - `nodes.resourceRef.uid` (string)

  - `nodes.parentRefs` (array)
    ParentRefs lists the parent resources that reference this resource.
This helps in understanding ownership and hierarchical relationships.

  - `nodes.info` (array)
    Info provides additional metadata or annotations about the resource.

  - `nodes.info.name` (string)
    Name is a human readable title for this piece of information.

  - `nodes.info.value` (string)
    Value is human readable content.

  - `nodes.networkingInfo` (object)
    ResourceNetworkingInfo holds networking-related information for a resource.

  - `nodes.networkingInfo.targetLabels` (object)
    TargetLabels represents labels associated with the target resources that this resource communicates with.

  - `nodes.networkingInfo.targetRefs` (array)
    TargetRefs contains references to other resources that this resource interacts with, such as Services or Pods.

  - `nodes.networkingInfo.labels` (object)
    Labels holds the labels associated with this networking resource.

  - `nodes.networkingInfo.ingress` (array)
    Ingress provides information about external access points (e.g., load balancer ingress) for this resource.

  - `nodes.networkingInfo.ingress.ip` (string)

  - `nodes.networkingInfo.ingress.hostname` (string)

  - `nodes.networkingInfo.ingress.ipMode` (string)

  - `nodes.networkingInfo.ingress.ports` (array)

  - `nodes.networkingInfo.ingress.ports.port` (integer)

  - `nodes.networkingInfo.ingress.ports.protocol` (string)

  - `nodes.networkingInfo.ingress.ports.error` (string)

  - `nodes.networkingInfo.externalURLs` (array)
    ExternalURLs holds a list of URLs that should be accessible externally.
This field is typically populated for Ingress resources based on their hostname rules.

  - `nodes.resourceVersion` (string)
    ResourceVersion indicates the version of the resource, used to track changes.

  - `nodes.images` (array)
    Images lists container images associated with the resource.
This is primarily useful for pods and other workload resources.

  - `nodes.health` (object)

  - `nodes.health.status` (string)

  - `nodes.health.message` (string)

  - `nodes.health.lastTransitionTime` (object)
    Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON.  Wrappers are provided for many
of the factory methods that the time package offers.

+protobuf.options.marshal=false
+protobuf.as=Timestamp
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `nodes.health.lastTransitionTime.seconds` (string)
    Represents seconds of UTC time since Unix epoch
1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
9999-12-31T23:59:59Z inclusive.

  - `nodes.health.lastTransitionTime.nanos` (integer)
    Non-negative fractions of a second at nanosecond resolution. Negative
second values with fractions must still have non-negative nanos values
that count forward in time. Must be from 0 to 999,999,999
inclusive. This field may be limited in precision depending on context.

  - `nodes.createdAt` (object)
    Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON.  Wrappers are provided for many
of the factory methods that the time package offers.

+protobuf.options.marshal=false
+protobuf.as=Timestamp
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `nodes.createdAtTs` (string)

  - `orphanedNodes` (array)
    OrphanedNodes contains resources that exist in the same namespace as the application
but are not managed by it. This list is populated only if orphaned resource tracking
is enabled in the application's project settings.

  - `hosts` (array)

  - `hosts.name` (string)
    Name is the hostname or node name in the Kubernetes cluster.

  - `hosts.resourcesInfo` (array)
    ResourcesInfo provides a list of resource usage details for different resource types on this host.

  - `hosts.resourcesInfo.resourceName` (string)
    ResourceName specifies the type of resource (e.g., CPU, memory, storage).

  - `hosts.resourcesInfo.requestedByApp` (string)
    RequestedByApp indicates the total amount of this resource requested by the application running on the host.

  - `hosts.resourcesInfo.requestedByNeighbors` (string)
    RequestedByNeighbors indicates the total amount of this resource requested by other workloads on the same host.

  - `hosts.resourcesInfo.capacity` (string)
    Capacity represents the total available capacity of this resource on the host.

  - `hosts.systemInfo` (object)
    NodeSystemInfo is a set of ids/uuids to uniquely identify the node.

  - `hosts.systemInfo.machineID` (string)

  - `hosts.systemInfo.systemUUID` (string)

  - `hosts.systemInfo.bootID` (string)
    Boot ID reported by the node.

  - `hosts.systemInfo.kernelVersion` (string)
    Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).

  - `hosts.systemInfo.osImage` (string)
    OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).

  - `hosts.systemInfo.containerRuntimeVersion` (string)
    ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).

  - `hosts.systemInfo.kubeletVersion` (string)
    Kubelet Version reported by the node.

  - `hosts.systemInfo.kubeProxyVersion` (string)
    Deprecated: KubeProxy Version reported by the node.

  - `hosts.systemInfo.operatingSystem` (string)

  - `hosts.systemInfo.architecture` (string)

  - `hosts.systemInfo.swap` (object)
    NodeSwapStatus represents swap memory information.

  - `hosts.systemInfo.swap.capacity` (string)

  - `hosts.labels` (object)
    Labels holds the labels attached to the host.

  - `shardsCount` (string)
    ShardsCount represents the total number of shards the application tree is split into.
This is used to distribute resource processing across multiple shards.

## Response default fields (application/json):

  - `error` (string)

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.type_url` (string)
    A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading "." is not accepted).

In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:

* If no scheme is provided, https is assumed.
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
  value in binary format, or produce an error.
* Applications are allowed to cache lookup results based on the
  URL, or have them precompiled into a binary to avoid any
  lookup. Therefore, binary compatibility needs to be preserved
  on changes to types. (Use versioned type names to manage
  breaking changes.)

Note: this functionality is not currently available in the official
protobuf release, and it is not used for type URLs beginning with
type.googleapis.com. As of May 2023, there are no widely used type server
implementations and no plans to implement one.

Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.

  - `details.value` (string)
    Must be a valid serialized protocol buffer of the above specified type.


