---
title: "Query historic agent instances"
method: GET
path: "/agent-history/historic-agent-instances"
tags: ["Historic Agent Instances"]
---

# Query historic agent instances

`GET /agent-history/historic-agent-instances`

## Request

- Base URL: `http://localhost:8090/agent-api`
- URL: `http://localhost:8090/agent-api/agent-history/historic-agent-instances`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/flowable/apis/flowable-agent-engine-rest-api/docs/agent-history/historic-agent-instances/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `agentDefinitionId` string
- `id` string
- `order` string
- `referenceId` string
- `referenceType` string
- `size` integer
- `sort` string
- `start` integer
- `startUserId` string
- `tenantId` string
- `tenantIdLike` string

## Response `200`

Indicates the request was successful.

- DataResponseHistoricAgentInstanceResponse
  - `data` HistoricAgentInstanceResponse[]
    - `id` string, required: The unique identifier of a historic agent instance
    - `agentDefinitionId` string, required: The id of the agent definition that was used to start the historic agent instance.
    - `agentDefinitionKey` string, required: The key of the agent definition that was used to start the historic agent instance.
    - `agentDefinitionName` string, required: The name of the agent definition that was used to start the historic agent instance.
    - `referenceId` string: The id of the CMMN or BPMN model backing the historic agent instance behavior.
    - `referenceType` string: The type of the model that backs the historic agent instance behavior (e.g. CMMN or BPMN).
    - `callbackId` string: The callback identifier for this agent instance.
    - `callbackType` string: The callback type for this agent instance.
    - `callbackScopeId` string: The callback scope id for this agent instance.
    - `state` string: The current state of this agent instance.
    - `startTime` integer, required: The time the instance was started.
    - `endTime` integer, required: The time the instance was ended.
    - `startUserId` string: The user that started the agent instance.
    - `jsonInvocationResult` JsonNode
      - `string` boolean
      - `valueNode` boolean
      - `missingNode` boolean
      - `short` boolean
      - `double` boolean
      - `bigDecimal` boolean
      - `bigInteger` boolean
      - `textual` boolean
      - `boolean` boolean
      - `container` boolean
      - `object` boolean
      - `binary` boolean
      - `number` boolean
      - `nodeType` 'ARRAY' | 'BINARY' | 'BOOLEAN' | 'MISSING' | 'NULL' | 'NUMBER' | 'OBJECT' | 'POJO' | 'STRING'
      - `long` boolean
      - `pojo` boolean
      - `int` boolean
      - `integralNumber` boolean
      - `floatingPointNumber` boolean
      - `array` boolean
      - `empty` boolean
      - boolean
      - `float` boolean
      - `embeddedValue` boolean
    - `plainTextInvocationResult` string
  - `total` integer
  - `start` integer
  - `sort` string
  - `order` string
  - `size` integer

## Other responses

- `400`: Indicates the request had some invalid arguments.

---

[API](https://skmtc.dev/flowable/apis/flowable-agent-engine-rest-api.md) - [All operations](https://skmtc.dev/flowable/apis/flowable-agent-engine-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flowable/apis/flowable-agent-engine-rest-api/revisions/54fc1189496f?raw)
