# List target discovered service with chaos context

Get target discovered service with chaos context

Endpoint: GET /gateway/chaos/manager/api/rest/v2/applicationmaps/{applicationmapid}/targetservices
Version: 1.0
Security: x-api-key

## Query parameters:

  - `accountIdentifier` (string, required)
    account id that want to access the resource

  - `organizationIdentifier` (string, required)
    organization id that want to access the resource

  - `projectIdentifier` (string, required)
    project id that want to access the resource

  - `environmentIdentifier` (string, required)
    environment id that want to access the resource

  - `infraId` (string, required)
    infra id that want to access the resource

  - `page` (integer, required)
    page number

  - `limit` (integer, required)
    limit per page

  - `search` (string)
    search based on name

## Path parameters:

  - `applicationmapid` (string, required)
    Application map ID

## Response 200 fields (application/json):

  - `data` (array)

  - `data.chaosDetails` (object)

  - `data.chaosDetails.accountID` (string, required)

  - `data.chaosDetails.averageResiliencyScore` (number)

  - `data.chaosDetails.createdAt` (integer)

  - `data.chaosDetails.createdBy` (string)

  - `data.chaosDetails.environmentRef` (string)

  - `data.chaosDetails.externalId` (string)

  - `data.chaosDetails.id` (string)

  - `data.chaosDetails.infrastructureId` (string)

  - `data.chaosDetails.isRemoved` (boolean, required)

  - `data.chaosDetails.licenseId` (string)

  - `data.chaosDetails.name` (string)

  - `data.chaosDetails.orgID` (string)

  - `data.chaosDetails.projectID` (string)

  - `data.chaosDetails.resiliencyCoverage` (number)

  - `data.chaosDetails.spec` (object)

  - `data.chaosDetails.spec.discoveredService` (object)

  - `data.chaosDetails.spec.discoveredService.id` (string)

  - `data.chaosDetails.spec.discoveredService.kind` (string)

  - `data.chaosDetails.spec.discoveredService.label` (object)

  - `data.chaosDetails.spec.discoveredService.name` (string)

  - `data.chaosDetails.spec.discoveredService.namespace` (string)

  - `data.chaosDetails.spec.discoveredService.uuid` (string)

  - `data.chaosDetails.totalExperimentCount` (integer)

  - `data.chaosDetails.type` (string)
    Enum: "DiscoveredService", "UnAccounted"

  - `data.chaosDetails.updatedAt` (integer)

  - `data.chaosDetails.updatedBy` (string)

  - `data.discoveryDetails` (object)

  - `data.discoveryDetails.accountIdentifier` (string, required)

  - `data.discoveryDetails.agentID` (string, required)

  - `data.discoveryDetails.agentIdentity` (string, required)

  - `data.discoveryDetails.createdAt` (string)

  - `data.discoveryDetails.createdBy` (string)

  - `data.discoveryDetails.environmentIdentifier` (string, required)

  - `data.discoveryDetails.id` (string, required)

  - `data.discoveryDetails.name` (string, required)

  - `data.discoveryDetails.organizationIdentifier` (string)

  - `data.discoveryDetails.projectIdentifier` (string)

  - `data.discoveryDetails.removed` (boolean)

  - `data.discoveryDetails.removedAt` (string)

  - `data.discoveryDetails.spec` (object, required)

  - `data.discoveryDetails.spec.fqdn` (array)

  - `data.discoveryDetails.spec.harnessEnvironmentIdentity` (object)

  - `data.discoveryDetails.spec.harnessEnvironmentIdentity.accountIdentifier` (string)

  - `data.discoveryDetails.spec.harnessEnvironmentIdentity.identifier` (string)

  - `data.discoveryDetails.spec.harnessEnvironmentIdentity.infraIdentifier` (string)

  - `data.discoveryDetails.spec.harnessEnvironmentIdentity.organizationIdentifier` (string)

  - `data.discoveryDetails.spec.harnessEnvironmentIdentity.projectIdentifier` (string)

  - `data.discoveryDetails.spec.harnessServiceIdentity` (object)

  - `data.discoveryDetails.spec.harnessServiceIdentity.accountIdentifier` (string)

  - `data.discoveryDetails.spec.harnessServiceIdentity.identifier` (string)

  - `data.discoveryDetails.spec.harnessServiceIdentity.organizationIdentifier` (string)

  - `data.discoveryDetails.spec.harnessServiceIdentity.projectIdentifier` (string)

  - `data.discoveryDetails.spec.ip` (array)

  - `data.discoveryDetails.spec.kubernetes` (object)

  - `data.discoveryDetails.spec.kubernetes.kind` (string)

  - `data.discoveryDetails.spec.kubernetes.name` (string)

  - `data.discoveryDetails.spec.kubernetes.namespace` (string)

  - `data.discoveryDetails.spec.kubernetes.service` (object)

  - `data.discoveryDetails.spec.kubernetes.service.annotations` (object)

  - `data.discoveryDetails.spec.kubernetes.service.clusterIP` (string)

  - `data.discoveryDetails.spec.kubernetes.service.clusterIPs` (array)

  - `data.discoveryDetails.spec.kubernetes.service.externalIPs` (array)

  - `data.discoveryDetails.spec.kubernetes.service.externalName` (string)

  - `data.discoveryDetails.spec.kubernetes.service.identity` (object)

  - `data.discoveryDetails.spec.kubernetes.service.identity.apiVersion` (string)
    API version of the referent.
+optional

  - `data.discoveryDetails.spec.kubernetes.service.identity.fieldPath` (string)
    If referring to a piece of an object instead of an entire object, this string
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within a pod, this would take on a value like:
"spec.containers{name}" (where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
+optional

  - `data.discoveryDetails.spec.kubernetes.service.identity.kind` (string)
    Kind of the referent.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+optional

  - `data.discoveryDetails.spec.kubernetes.service.identity.name` (string)
    Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+optional

  - `data.discoveryDetails.spec.kubernetes.service.identity.namespace` (string)
    Namespace of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+optional

  - `data.discoveryDetails.spec.kubernetes.service.identity.resourceVersion` (string)
    Specific resourceVersion to which this reference is made, if any.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
+optional

  - `data.discoveryDetails.spec.kubernetes.service.identity.uid` (string)
    UID of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+optional

  - `data.discoveryDetails.spec.kubernetes.service.labels` (object)

  - `data.discoveryDetails.spec.kubernetes.service.loadBalancerIP` (string)

  - `data.discoveryDetails.spec.kubernetes.service.ports` (array)

  - `data.discoveryDetails.spec.kubernetes.service.ports.appProtocol` (string)
    The application protocol for this port.
This field follows standard Kubernetes label syntax.
Un-prefixed names are reserved for IANA standard service names (as per
RFC-6335 and http://www.iana.org/assignments/service-names).
Non-standard protocols should use prefixed names such as
mycompany.com/my-custom-protocol.
This is a beta field that is guarded by the ServiceAppProtocol feature
gate and enabled by default.
+optional

  - `data.discoveryDetails.spec.kubernetes.service.ports.name` (string)
    The name of this port within the service. This must be a DNS_LABEL.
All ports within a ServiceSpec must have unique names. When considering
the endpoints for a Service, this must match the 'name' field in the
EndpointPort.
Optional if only one ServicePort is defined on this service.
+optional

  - `data.discoveryDetails.spec.kubernetes.service.ports.nodePort` (integer)
    The port on each node on which this service is exposed when type is
NodePort or LoadBalancer.  Usually assigned by the system. If a value is
specified, in-range, and not in use it will be used, otherwise the
operation will fail.  If not specified, a port will be allocated if this
Service requires one.  If this field is specified when creating a
Service which does not need it, creation will fail. This field will be
wiped when updating a Service to no longer need it (e.g. changing type
from NodePort to ClusterIP).
More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+optional

  - `data.discoveryDetails.spec.kubernetes.service.ports.port` (integer)
    The port that will be exposed by this service.

  - `data.discoveryDetails.spec.kubernetes.service.ports.protocol` (string)
    The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".
Default is TCP.
+default="TCP"
+optional
    Enum: "TCP", "UDP", "SCTP"

  - `data.discoveryDetails.spec.kubernetes.service.ports.targetPort` (object)
    Number or name of the port to access on the pods targeted by the service.
Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
If this is a string, it will be looked up as a named port in the
target Pod's container ports. If this is not specified, the value
of the 'port' field is used (an identity map).
This field is ignored for services with clusterIP=None, and should be
omitted or set equal to the 'port' field.
More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
+optional

  - `data.discoveryDetails.spec.kubernetes.service.ports.targetPort.intVal` (integer)

  - `data.discoveryDetails.spec.kubernetes.service.ports.targetPort.strVal` (string)

  - `data.discoveryDetails.spec.kubernetes.service.ports.targetPort.type` (integer)
    Enum: 0, 1

  - `data.discoveryDetails.spec.kubernetes.service.type` (string)
    Enum: "ClusterIP", "NodePort", "LoadBalancer", "ExternalName"

  - `data.discoveryDetails.spec.kubernetes.uid` (string)

  - `data.discoveryDetails.spec.kubernetes.workloads` (array)

  - `data.discoveryDetails.spec.kubernetes.workloads.annotations` (object)

  - `data.discoveryDetails.spec.kubernetes.workloads.identity` (object)

  - `data.discoveryDetails.spec.kubernetes.workloads.labels` (object)

  - `data.discoveryDetails.spec.kubernetes.workloads.podAnnotations` (object)

  - `data.discoveryDetails.spec.kubernetes.workloads.podLabels` (object)

  - `data.discoveryDetails.spec.kubernetes.workloads.replicas` (array)

  - `data.discoveryDetails.spec.kubernetes.workloads.replicas.identity` (object)

  - `data.discoveryDetails.spec.kubernetes.workloads.replicas.phase` (string)
    Enum: "Pending", "Running", "Succeeded", "Failed", "Unknown"

  - `data.discoveryDetails.spec.port` (array)

  - `data.discoveryDetails.type` (string, required)

  - `data.discoveryDetails.updatedAt` (string)

  - `data.discoveryDetails.updatedBy` (string)

  - `data.discoveryDetails.version` (string, required)

  - `page` (object)

  - `page.index` (integer)

  - `page.limit` (integer)

  - `page.totalItems` (integer)

  - `page.totalPages` (integer)

## Response 400 fields (application/json):

  - `code` (string)
    Enum: "PIPELINE_NOT_FOUND"

  - `description` (string)

  - `message` (string)


