---
title: "Moves the secondary replica of a partition of a stateful service."
method: POST
path: "/Partitions/{partitionId}/$/MoveSecondaryReplica"
tags: ["Partition"]
---

# Moves the secondary replica of a partition of a stateful service.

`POST /Partitions/{partitionId}/$/MoveSecondaryReplica`

This command moves the secondary replica of a partition of a stateful service, respecting all constraints.
CurrentNodeName parameter must be specified to identify the replica that is moved.
Source node name must be specified, but new node name can be omitted, and in that case replica is moved to a random node.
If IgnoreConstraints parameter is specified and set to true, then secondary will be moved regardless of the constraints.

## Path parameters

- `partitionId` string, uuid, required

## Query parameters

- `api-version` '6.5', required
- `CurrentNodeName` string, required
- `NewNodeName` string
- `IgnoreConstraints` boolean
- `timeout` integer

## Response `200`

A successful operation request will return 200 status code.

## Other responses

- `default` — The detailed error response.

---

[API](https://skmtc.net/azure/apis/servicefabric-servicefabric.md) · [All operations](https://skmtc.net/azure/apis/servicefabric-servicefabric/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/servicefabric-servicefabric/revisions/8fd479ce0f16/schema)
