ListMoves
const url = 'https://example.com/hopbox.admin.v1.MachineService/ListMoves';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{"machineId":"example","pageSize":1,"pageToken":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/hopbox.admin.v1.MachineService/ListMoves \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{ "machineId": "example", "pageSize": 1, "pageToken": "example" }'ListMoves lists the moves of one machine, or of every machine, newest first, one page at a time.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Define the version of the Connect protocol
Define the version of the Connect protocol
Example
1Define the timeout, in ms
Define the timeout, in ms
Example
1000Request Bodyrequired
Section titled “Request Bodyrequired”ListMovesRequest asks for one page of moves.
object
Machine_id, when set, lists only the moves of this machine.
Page_size is the most moves in one response, 1 to 1000. 0 takes 100.
Page_token is the next_page_token of the response before. Leave it empty for the first page.
Example generated
{ "machineId": "example", "pageSize": 1, "pageToken": "example"}Responses
Section titled “Responses”Success
ListMovesResponse holds one page of moves.
object
Moves are the moves of the page, newest first.
Move is one cold move of a machine.
object
Id is the UUID of the move.
Machine_id is the UUID of the machine.
Source_server_id is the UUID of the node that the machine leaves.
Target_server_id is the UUID of the node that the machine moves to.
State is the state of the move.
Target_state is the target state of the machine before the move. The machine gets it back on the target node.
Error says why the move failed.
Cleanup_server_id is the UUID of the node that still holds an old copy of the files of the machine: the source node after a move that is done, the target node after a move that failed. It is empty once that node removed them.
Create_time is when the move started.
Update_time is when the move changed last.
Give_back is the give-back that an instance admin asked for, with the answer of the target node.
Give_back_note says why the target node does not answer a give-back that waits, such as a disk file on the target without the proof of the pull. It is empty otherwise.
Next_page_token reads the next page. It is empty on the last page.
Example
{ "moves": [ { "state": "MOVE_STATE_UNSPECIFIED", "targetState": "MACHINE_STATE_UNSPECIFIED", "createTime": "2023-01-15T01:30:15.01Z", "updateTime": "2023-01-15T01:30:15.01Z", "giveBack": "MOVE_GIVE_BACK_UNSPECIFIED" } ]}default
Section titled “default”Error
Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is no limit on the number of messages.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.
object
A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.
The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.
Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.
object
Example
{ "code": "canceled"}