Skip to content

Creating snapshots from the rest-api ignores name_label #9738

@w0

Description

@w0

Are you using XOA or XO from the sources?

XO from the sources

Which release channel?

latest

Provide your commit number

fbba0

Describe the bug

When creating a snapshot from the rest-api the name_label supplied in the json body isn't applied. The snapshot will get the default name_label of the VM name.

Error message

None, snapshot is created successfully using a name_label matching the vm name.

To reproduce

Using curl

curl -X 'POST' \
  'https://yourxoa.com/rest/v0/vms/yourvm-uuid/actions/snapshot' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name_label": "my_awesome_snapshot"
}' \
  -b authenticationToken=yourauthtoken

Expected behavior

Snapshot is created using the supplied name_label

Screenshots

No response

Node

v24.14.1

Hypervisor

XCP-ng 8.3.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions