Skip to main content
POST
/
cloud
/
v1
/
bminstances
/
{project_id}
/
{region_id}
/
{server_id}
/
rebuild
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
task_id_list = client.cloud.baremetal.servers.rebuild(
    server_id="server_id",
    project_id=0,
    region_id=0,
)
print(task_id_list.tasks)
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

server_id
string
required

Server ID

Body

application/json
image_id
string

Image ID

user_data
string

String in base64 format. Must not be passed together with 'username' or 'password'. Examples of the user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html

Response

Return list of created tasks ids

tasks
string[]
required

List of task IDs

Examples:
["d478ae29-dedc-4869-82f0-96104425f565"]