# Applications

## List applications for a specific agent

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications](https://apidocs.harness.io/applications/agentapplicationservice_list.md): List returns a list of applications for a specific agent.

## Create an application

 - [POST /gitops/api/v1/agents/{agentIdentifier}/applications](https://apidocs.harness.io/applications/agentapplicationservice_create.md): Create creates a new application in the specified project.

## Get parent application

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/parent/{query.name}](https://apidocs.harness.io/applications/agentapplicationservice_parent.md): Parent returns a parent application (app of apps or appset) by child name

## Get ManagedResources

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.applicationName}/managed-resources](https://apidocs.harness.io/applications/agentapplicationservice_managedresources.md): ManagedResources returns list of managed resources.

## Get resource tree

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.applicationName}/resource-tree](https://apidocs.harness.io/applications/agentapplicationservice_resourcetree.md): ResourceTree returns resource tree.

## Get application

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}](https://apidocs.harness.io/applications/agentapplicationservice_get.md): Get returns an application by name.

## List resource events

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}/events](https://apidocs.harness.io/applications/agentapplicationservice_listresourceevents.md): ListResourceEvents returns a list of event resources.

## PodLogs returns stream of log entries for the specified pod(s).

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}/logs](https://apidocs.harness.io/applications/agentapplicationservice_podlogs2.md): PodLogs returns stream of log entries for the specified pod(s).

## AgentApplicationService_PodLogsBatch2

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}/logs/batch](https://apidocs.harness.io/applications/agentapplicationservice_podlogsbatch2.md): PodLogsBatch returns stream of log entry in batches of upto 1000 entries for the specified pod(s).

## Get application manifest

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}/manifests](https://apidocs.harness.io/applications/agentapplicationservice_getmanifests.md): GetManifests returns an application manifests.

## PodLogs returns stream of log entries for the specified pod(s).

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}/pods/{query.podName}/logs](https://apidocs.harness.io/applications/agentapplicationservice_podlogs.md): PodLogs returns stream of log entries for the specified pod(s).

## AgentApplicationService_PodLogsBatch

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}/pods/{query.podName}/logs/batch](https://apidocs.harness.io/applications/agentapplicationservice_podlogsbatch.md): PodLogsBatch returns stream of log entry in batches of upto 1000 entries for the specified pod(s).

## Get revision metadata

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}/revisions/{query.revision}/metadata](https://apidocs.harness.io/applications/agentapplicationservice_revisionmetadata.md): RevisionMetadata returns metadata for a specific revision of the application.

## Get sync windows of the application

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{query.name}/syncwindows](https://apidocs.harness.io/applications/agentapplicationservice_getapplicationsyncwindows.md): GetApplicationSyncWindows returns sync windows of the application.

## Update an application

 - [PUT /gitops/api/v1/agents/{agentIdentifier}/applications/{request.application.metadata.name}](https://apidocs.harness.io/applications/agentapplicationservice_update.md): Update updates an application.

## Delete an application

 - [DELETE /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}](https://apidocs.harness.io/applications/agentapplicationservice_delete.md): Delete deletes an application.

## Patch an application

 - [PATCH /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}](https://apidocs.harness.io/applications/agentapplicationservice_patch.md): Patch applies a patch to an application.

## Terminate operation

 - [DELETE /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/operation](https://apidocs.harness.io/applications/agentapplicationservice_terminateoperation.md): TerminateOperation terminates the currently running operation.

## Get an application resource

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/resource](https://apidocs.harness.io/applications/agentapplicationservice_getresource.md): GetResource returns single application resource.

## Delete resource

 - [DELETE /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/resource](https://apidocs.harness.io/applications/agentapplicationservice_deleteresource.md): DeleteResource deletes a single application resource.

## Patch an application resource

 - [POST /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/resource](https://apidocs.harness.io/applications/agentapplicationservice_patchresource.md): PatchResource patch single application resource.

## List resource actions

 - [GET /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/resource/actions](https://apidocs.harness.io/applications/agentapplicationservice_listresourceactions.md): ListResourceActions returns a list of resource actions.

## Run resource action

 - [POST /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/resource/actions](https://apidocs.harness.io/applications/agentapplicationservice_runresourceaction.md): RunResourceAction runs a resource action.

## Rollback syncs an application to its target state

 - [POST /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/rollback](https://apidocs.harness.io/applications/agentapplicationservice_rollback.md): Rollback syncs an application to its target state. Harness Event type (rollback).

## Update application spec

 - [PUT /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/spec](https://apidocs.harness.io/applications/agentapplicationservice_updatespec.md): UpdateSpec updates an application spec.

## Sync an application

 - [POST /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/sync](https://apidocs.harness.io/applications/agentapplicationservice_sync.md): Sync syncs an application to its target state. Harness Event type (deploy)

## Watch returns stream of application change events

 - [GET /gitops/api/v1/agents/{agentIdentifier}/stream/applications](https://apidocs.harness.io/applications/agentapplicationservice_watch.md): Watch returns stream of application change events.

## WatchResourceTree returns stream of application resource tree

 - [GET /gitops/api/v1/agents/{agentIdentifier}/stream/applications/{query.applicationName}/resource-tree](https://apidocs.harness.io/applications/agentapplicationservice_watchresourcetree.md): WatchResourceTree returns stream of application resource tree.

## List attributes for applications

 - [GET /gitops/api/v1/applications/attributes](https://apidocs.harness.io/applications/applicationservice_listattributes.md): ListAttributes returns a list of attributes for applications

## Bulk refresh multiple applications

 - [POST /gitops/api/v1/applications/bulk/refresh](https://apidocs.harness.io/applications/applicationservice_bulkrefresh.md): BulkRefresh refreshes the status of multiple applications at once, optionally performing a hard refresh if refresh is set to hard.

## Bulk sync multiple applications

 - [POST /gitops/api/v1/applications/bulk/sync](https://apidocs.harness.io/applications/applicationservice_bulksync.md): BulkSync initiates sync for multiple applications to their target states.

## List namespaces for a specific query

 - [POST /gitops/api/v1/applications/ns](https://apidocs.harness.io/applications/applicationservice_listns.md): ListNs retrieves a list of namespaces for a specific query.

## List LegacyApplicationSets

 - [GET /gitops/api/v1/applications/sets](https://apidocs.harness.io/applications/applicationservice_listappsets.md): ListAppSets lists LegacyApplicationSets in the specified project

## List application sync status

 - [POST /gitops/api/v1/applications/sync](https://apidocs.harness.io/applications/applicationservice_listappsync.md): ListAppSync returns a list of application sync status

## Check if an application exists

 - [GET /gitops/api/v1/applications/{name}/exists](https://apidocs.harness.io/applications/applicationservice_exists.md): Exists checks whether an application with the given name exists.

