---
title: "These commands treat the variable as a list, and allow to replace an entry in the list at the specified index with the specified value. The variable has to already exist."
method: PUT
path: "/mimic/agent/{agentNum}/store/lreplace/{var}/{index}"
tags: ["Agent"]
---

# These commands treat the variable as a list, and allow to replace an entry in the list at the specified index with the specified value. The variable has to already exist.

`PUT /mimic/agent/{agentNum}/store/lreplace/{var}/{index}`

These commands treat the variable as a list, and allow to replace an entry in the list at the specified index with the specified value. The variable has to already exist.

## Path parameters

- `agentNum` integer, required
- `var` string, required
- `index` integer, required

## Request body

- string

## Response `200`

successful operation

- string

## Other responses

- `400` — Invalid agent number value

---

[API](https://skmtc.dev/gambitcomm/apis/mimic-rest-api.md) · [All operations](https://skmtc.dev/gambitcomm/apis/mimic-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gambitcomm/mimic-rest-api/revisions/eb67c54e9ec9/schema)
