Do disk update vs disk resize in the API do the same thing?
Hello,
In the API there is a disk update endpoint (PUT to https://api.linode.com/v4/linode/instances/{linodeId}/disks/{diskId}
) and a disk resize endpoint (POST to https://api.linode.com/v4/linode/instances/{linodeId}/disks/{diskId}/resize
).
Both the disk update and resize endpoints accept a size
argument for the disk's size in MB. Does that mean these endpoints do the same thing? Or should I be using the resize endpoint for resizing?
Thank you.
1 Reply
When I attempted to use PUT with {"label": "New Disk Name", "size": 50688 }
in the request body to https://api.linode.com/v4/linode/instances/{linodeId}/disks/{diskId}
I received the following response:
{
"errors": [
{
"reason": "size is not an editable field.",
"field": "size"
}
]
}
When I removed the 'size' field, the endpoint updated the name.
When I used the POST endpoint instead, the disk resized.