# List experiments

List experiments with filtering, sorting and pagination

Endpoint: POST /gateway/chaos/manager/api/rest/v2/experiments
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

  - `page` (integer)
    page number

  - `limit` (integer)
    limit per page

  - `experimentName` (string)
    search filter based on name

## Request fields (application/json):

  - `filter` (object)
    Details for fetching filtered data

  - `filter.dateRange` (object)
    Date range for filtering purpose

  - `filter.dateRange.endDate` (string)
    End date

  - `filter.dateRange.startDate` (string)
    Start date

  - `filter.infraActive` (boolean)
    Bool value indicating if Chaos Infrastructure is active

  - `filter.infraIDs` (array)
    IDs of the agent in which the workflow is running

  - `filter.infraName` (string)
    Name of the infra in which the workflow is running

  - `filter.infraTypes` (array)
    Type of infras
    Enum: "Kubernetes", "KubernetesV2", "Windows", "Linux", "CloudFoundry", "Container"

  - `filter.isCronEnabled` (boolean)
    Bool value to filter data based on cron enabled state

  - `filter.scenarioType` (string)
    Scenario type of the workflow i.e. CRON or NON_CRON
    Enum: "CRON", "NON_CRON", "GAMEDAY", "ALL"

  - `filter.status` (string)
    Status of the latest workflow run
    Enum: "All", "Running", "Completed", "Completed_With_Error", "Completed_With_Probe_Failure", "Stopped", "Skipped", "Error", "Timeout", "NA", "Queued", "Blocked"

  - `filter.tags` (array)
    Tags based search

  - `filter.workflowName` (string)
    Name of the workflow

  - `identities` (array)
    Array of identities for which details will be fetched

  - `pagination` (object)
    Details for fetching paginated data

  - `pagination.limit` (integer)
    Number of data to be fetched

  - `pagination.page` (integer)
    Page number for which data will be fetched

  - `sort` (object)
    Details for fetching sorted data

  - `sort.ascending` (boolean)
    Bool value indicating whether the sorting will be done in ascending order

  - `sort.field` (string)
    Field in which sorting will be done
    Enum: "LAST_EXECUTED", "LAST_MODIFIED", "NAME"

  - `workflowIDs` (array)
    Array of workflow IDs for which details will be fetched

## Response 200 fields (application/json):

  - `totalNoOfWorkflows` (integer)
    Total number of workflows

  - `workflows` (array)
    Details related to the workflows

  - `workflows.createdAt` (string)
    Timestamp when the workflow was created

  - `workflows.createdBy` (object)
    User who created the workflow

  - `workflows.createdBy.email` (string)

  - `workflows.createdBy.userID` (string)

  - `workflows.createdBy.username` (string)

  - `workflows.cronSyntax` (string)
    Cron syntax of the workflow schedule

  - `workflows.description` (string)
    Description of the workflow

  - `workflows.eventsMetadata` (array)
    Array containing service identifier and environment identifier
for SRM change source events

  - `workflows.eventsMetadata.environmentIdentifier` (array)

  - `workflows.eventsMetadata.faultName` (string)

  - `workflows.eventsMetadata.serviceIdentifier` (array)

  - `workflows.identifiers` (object)
    Harness identifiers

  - `workflows.identifiers.accountIdentifier` (string)
    Harness AccountID

  - `workflows.identifiers.orgIdentifier` (string)
    Harness OrgID

  - `workflows.identifiers.projectIdentifier` (string)
    Harness projectID

  - `workflows.identity` (string)
    Identity of the experiment

  - `workflows.infra` (object)
    Target infra in which the workflow will run

  - `workflows.infra.clusterType` (string)
    Cluster type Indicates the type on infrastructure (Kubernetes/openshift)
    Enum: "KUBERNETES", "OPENSHIFT", "HELM"

  - `workflows.infra.createdAt` (string)
    Timestamp when the workflow was created

  - `workflows.infra.createdBy` (object)
    User who created the workflow

  - `workflows.infra.createdBy.email` (string)

  - `workflows.infra.createdBy.userID` (string)

  - `workflows.infra.createdBy.username` (string)

  - `workflows.infra.description` (string)
    Description of the workflow

  - `workflows.infra.environmentID` (string)
    Environment ID where infra is installed

  - `workflows.infra.identifiers` (object)
    Harness identifiers

  - `workflows.infra.identifiers.accountIdentifier` (string)
    Harness AccountID

  - `workflows.infra.identifiers.orgIdentifier` (string)
    Harness OrgID

  - `workflows.infra.identifiers.projectIdentifier` (string)
    Harness projectID

  - `workflows.infra.infraID` (string)
    ID of the infra

  - `workflows.infra.infraNamespace` (string)
    Namespace where the infra is being installed

  - `workflows.infra.infraScope` (string)
    Scope of the infra : ns or cluster
    Enum: "namespace", "cluster"

  - `workflows.infra.infraType` (string)
    Type of infrastructure
    Enum: "Kubernetes", "KubernetesV2", "Windows", "Linux", "CloudFoundry", "Container"

  - `workflows.infra.isActive` (boolean)
    Bool value to check if infra is active

  - `workflows.infra.isInfraConfirmed` (boolean)
    Bool value to check if infra is confirmed

  - `workflows.infra.isRemoved` (boolean)
    Bool value indicating if the workflow has removed

  - `workflows.infra.lastHeartbeat` (string)
    Last received heartbeat of infrastructure

  - `workflows.infra.name` (string)
    Name of the workflow

  - `workflows.infra.startTime` (string)
    Time when infra became active

  - `workflows.infra.tags` (array)
    Tags of the workflow

  - `workflows.infra.updatedAt` (string)
    Timestamp when the workflow was last updated

  - `workflows.infra.updatedBy` (object)
    Details of the user who updated the workflow

  - `workflows.infra.updatedBy.email` (string)

  - `workflows.infra.updatedBy.userID` (string)

  - `workflows.infra.updatedBy.username` (string)

  - `workflows.infra.version` (string)
    Version of infrastructure

  - `workflows.isCronEnabled` (boolean)
    If cron is enabled or disabled

  - `workflows.isCustomWorkflow` (boolean)
    Bool value indicating whether the workflow is a custom workflow or not

  - `workflows.isRemoved` (boolean)
    Bool value indicating if the workflow has removed

  - `workflows.isSingleRunCronEnabled` (boolean)
    Flag to check if single run status is enabled or not

  - `workflows.lastExecutedAt` (string)
    Timestamp when the experiment was last executed

  - `workflows.name` (string)
    Name of the workflow

  - `workflows.recentWorkflowRunDetails` (array)
    Array of object containing details of recent workflow runs

  - `workflows.recentWorkflowRunDetails.createdAt` (string)
    Timestamp when the workflow was created

  - `workflows.recentWorkflowRunDetails.createdBy` (object)
    User who created the workflow run

  - `workflows.recentWorkflowRunDetails.createdBy.email` (string)

  - `workflows.recentWorkflowRunDetails.createdBy.userID` (string)

  - `workflows.recentWorkflowRunDetails.createdBy.username` (string)

  - `workflows.recentWorkflowRunDetails.notifyID` (string)
    Notify ID for workflow run

  - `workflows.recentWorkflowRunDetails.phase` (string)
    Phase of the workflow run

  - `workflows.recentWorkflowRunDetails.resiliencyScore` (number)
    Resiliency score of the workflow

  - `workflows.recentWorkflowRunDetails.runSequence` (integer)
    runSequence is the sequence number of experiment run

  - `workflows.recentWorkflowRunDetails.updatedAt` (string)
    Timestamp when the workflow was last updated

  - `workflows.recentWorkflowRunDetails.updatedBy` (object)
    User who updated the workflow run

  - `workflows.recentWorkflowRunDetails.updatedBy.email` (string)

  - `workflows.recentWorkflowRunDetails.updatedBy.userID` (string)

  - `workflows.recentWorkflowRunDetails.updatedBy.username` (string)

  - `workflows.recentWorkflowRunDetails.workflowIdentity` (string)
    Identity of the experiment

  - `workflows.recentWorkflowRunDetails.workflowRunID` (string)
    ID of the workflow run which is to be queried

  - `workflows.tags` (array)
    Tags of the workflow

  - `workflows.templateDetails` (object)
    TemplateDetails of an experiment

  - `workflows.templateDetails.hubRef` (string)
    Reference to the hub where the template is stored

  - `workflows.templateDetails.identity` (string)
    Unique identifier for the template

  - `workflows.templateDetails.ref` (string)
    Reference path or identifier for the template

  - `workflows.templateDetails.revision` (string)
    Version or revision of the template

  - `workflows.updatedAt` (string)
    Timestamp when the workflow was last updated

  - `workflows.updatedBy` (object)
    Details of the user who updated the workflow

  - `workflows.updatedBy.email` (string)

  - `workflows.updatedBy.userID` (string)

  - `workflows.updatedBy.username` (string)

  - `workflows.weightages` (array)
    Array containing weightage and name of each chaos experiment in the workflow

  - `workflows.weightages.experimentName` (string)
    Name of the experiment

  - `workflows.weightages.weightage` (integer)
    Weightage of the experiment

  - `workflows.workflowID` (string)
    ID of the workflow

  - `workflows.workflowManifest` (string)
    Manifest of the workflow

  - `workflows.workflowType` (string)
    Type of the workflow

## Response 400 fields (application/json):

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

  - `description` (string)

  - `message` (string)


