hetzner-openapi/ts/api.ts

23069 lines
880 KiB
TypeScript
Raw Normal View History

2024-01-29 17:13:40 +00:00
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Resource */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/certificates": {
/**
* Get all Certificates
* @description Returns all Certificate objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/** @description Can be used multiple times. The response will only contain Certificates matching the type. */
type?: "uploaded" | "managed";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `certificates` key contains an array of Certificate objects */
200: {
content: {
"application/json": {
certificates: ({
/**
* @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding
* @example -----BEGIN CERTIFICATE-----
* ...
*/
certificate: string | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Domains and subdomains covered by the Certificate
* @example [
* "example.com",
* "webmail.example.com",
* "www.example.com"
* ]
*/
domain_names: string[];
/**
* @description SHA256 fingerprint of the Certificate
* @example 03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f
*/
fingerprint: string | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Point in time when the Certificate stops being valid (in ISO-8601 format)
* @example 2019-07-08T09:59:59+00:00
*/
not_valid_after: string | null;
/**
* @description Point in time when the Certificate becomes valid (in ISO-8601 format)
* @example 2019-01-08T10:00:00+00:00
*/
not_valid_before: string | null;
/** @description Current status of a type `managed` Certificate, always *null* for type `uploaded` Certificates */
status?: ({
/**
* @description If issuance or renewal reports `failed`, this property contains information about what happened
* @example null
*/
error?: {
code?: string;
message?: string;
} | null;
/**
* @description Status of the issuance process of the Certificate
* @example completed
* @enum {string}
*/
issuance?: "pending" | "completed" | "failed";
/**
* @description Status of the renewal process of the Certificate.
* @example scheduled
* @enum {string}
*/
renewal?: "scheduled" | "pending" | "failed" | "unavailable";
}) | null;
/**
* @description Type of the Certificate
* @example uploaded
* @enum {string}
*/
type?: "uploaded" | "managed";
/** @description Resources currently using the Certificate */
used_by: {
/**
* Format: int64
* @description ID of resource referenced
* @example 4711
*/
id: number;
/**
* @description Type of resource referenced
* @example load_balancer
*/
type: string;
}[];
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
/**
* Create a Certificate
* @description Creates a new Certificate.
*
* The default type **uploaded** allows for uploading your existing `certificate` and `private_key` in PEM format. You have to monitor its expiration date and handle renewal yourself.
*
* In contrast, type **managed** requests a new Certificate from *Let's Encrypt* for the specified `domain_names`. Only domains managed by *Hetzner DNS* are supported. We handle renewal and timely alert the project owner via email if problems occur.
*
* For type `managed` Certificates the `action` key of the response contains the Action that allows for tracking the issuance process. For type `uploaded` Certificates the `action` is always null.
*/
post: {
requestBody?: {
content: {
"application/json": {
/**
* @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding. Required for type `uploaded` Certificates.
* @example -----BEGIN CERTIFICATE-----
* ...
*/
certificate?: string;
/**
* @description Domains and subdomains that should be contained in the Certificate issued by *Let's Encrypt*. Required for type `managed` Certificates.
* @example null
*/
domain_names?: string[];
/** @description User-defined labels (key-value pairs) */
labels?: Record<string, never>;
/**
* @description Name of the Certificate
* @example my website cert
*/
name: string;
/**
* @description Certificate key in PEM format. Required for type `uploaded` Certificates.
* @example -----BEGIN PRIVATE KEY-----
* ...
*/
private_key?: string;
/**
* @description Choose between uploading a Certificate in PEM format or requesting a managed *Let's Encrypt* Certificate.
* @default uploaded
* @example uploaded
* @enum {string}
*/
type?: "uploaded" | "managed";
};
};
};
responses: {
/** @description The `certificate` key contains the Certificate that was just created. For type `managed` Certificates the `action` key contains the Action that allows for tracking the issuance process. For type `uploaded` Certificates the `action` is always null. */
201: {
content: {
"application/json": {
/** NullableAction */
action?: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
}) | null;
/** Certificate */
certificate: {
/**
* @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding
* @example -----BEGIN CERTIFICATE-----
* ...
*/
certificate: string | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Domains and subdomains covered by the Certificate
* @example [
* "example.com",
* "webmail.example.com",
* "www.example.com"
* ]
*/
domain_names: string[];
/**
* @description SHA256 fingerprint of the Certificate
* @example 03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f
*/
fingerprint: string | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Point in time when the Certificate stops being valid (in ISO-8601 format)
* @example 2019-07-08T09:59:59+00:00
*/
not_valid_after: string | null;
/**
* @description Point in time when the Certificate becomes valid (in ISO-8601 format)
* @example 2019-01-08T10:00:00+00:00
*/
not_valid_before: string | null;
/** @description Current status of a type `managed` Certificate, always *null* for type `uploaded` Certificates */
status?: ({
/**
* @description If issuance or renewal reports `failed`, this property contains information about what happened
* @example null
*/
error?: {
code?: string;
message?: string;
} | null;
/**
* @description Status of the issuance process of the Certificate
* @example completed
* @enum {string}
*/
issuance?: "pending" | "completed" | "failed";
/**
* @description Status of the renewal process of the Certificate.
* @example scheduled
* @enum {string}
*/
renewal?: "scheduled" | "pending" | "failed" | "unavailable";
}) | null;
/**
* @description Type of the Certificate
* @example uploaded
* @enum {string}
*/
type?: "uploaded" | "managed";
/** @description Resources currently using the Certificate */
used_by: {
/**
* Format: int64
* @description ID of resource referenced
* @example 4711
*/
id: number;
/**
* @description Type of resource referenced
* @example load_balancer
*/
type: string;
}[];
};
};
};
};
};
};
};
"/certificates/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/certificates/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/certificates/{id}": {
/**
* Get a Certificate
* @description Gets a specific Certificate object.
*/
get: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
responses: {
/** @description The `certificate` key contains a Certificate object */
200: {
content: {
"application/json": {
/** Certificate */
certificate: {
/**
* @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding
* @example -----BEGIN CERTIFICATE-----
* ...
*/
certificate: string | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Domains and subdomains covered by the Certificate
* @example [
* "example.com",
* "webmail.example.com",
* "www.example.com"
* ]
*/
domain_names: string[];
/**
* @description SHA256 fingerprint of the Certificate
* @example 03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f
*/
fingerprint: string | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Point in time when the Certificate stops being valid (in ISO-8601 format)
* @example 2019-07-08T09:59:59+00:00
*/
not_valid_after: string | null;
/**
* @description Point in time when the Certificate becomes valid (in ISO-8601 format)
* @example 2019-01-08T10:00:00+00:00
*/
not_valid_before: string | null;
/** @description Current status of a type `managed` Certificate, always *null* for type `uploaded` Certificates */
status?: ({
/**
* @description If issuance or renewal reports `failed`, this property contains information about what happened
* @example null
*/
error?: {
code?: string;
message?: string;
} | null;
/**
* @description Status of the issuance process of the Certificate
* @example completed
* @enum {string}
*/
issuance?: "pending" | "completed" | "failed";
/**
* @description Status of the renewal process of the Certificate.
* @example scheduled
* @enum {string}
*/
renewal?: "scheduled" | "pending" | "failed" | "unavailable";
}) | null;
/**
* @description Type of the Certificate
* @example uploaded
* @enum {string}
*/
type?: "uploaded" | "managed";
/** @description Resources currently using the Certificate */
used_by: {
/**
* Format: int64
* @description ID of resource referenced
* @example 4711
*/
id: number;
/**
* @description Type of resource referenced
* @example load_balancer
*/
type: string;
}[];
};
};
};
};
};
};
/**
* Update a Certificate
* @description Updates the Certificate properties.
*
* Note that when updating labels, the Certificates current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*
* Note: if the Certificate object changes during the request, the response will be a conflict error.
*/
put: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description New Certificate name
* @example my website cert
*/
name?: string;
};
};
};
responses: {
/** @description The `certificate` key contains the Certificate that was just updated */
200: {
content: {
"application/json": {
/** Certificate */
certificate: {
/**
* @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding
* @example -----BEGIN CERTIFICATE-----
* ...
*/
certificate: string | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Domains and subdomains covered by the Certificate
* @example [
* "example.com",
* "webmail.example.com",
* "www.example.com"
* ]
*/
domain_names: string[];
/**
* @description SHA256 fingerprint of the Certificate
* @example 03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f
*/
fingerprint: string | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Point in time when the Certificate stops being valid (in ISO-8601 format)
* @example 2019-07-08T09:59:59+00:00
*/
not_valid_after: string | null;
/**
* @description Point in time when the Certificate becomes valid (in ISO-8601 format)
* @example 2019-01-08T10:00:00+00:00
*/
not_valid_before: string | null;
/** @description Current status of a type `managed` Certificate, always *null* for type `uploaded` Certificates */
status?: ({
/**
* @description If issuance or renewal reports `failed`, this property contains information about what happened
* @example null
*/
error?: {
code?: string;
message?: string;
} | null;
/**
* @description Status of the issuance process of the Certificate
* @example completed
* @enum {string}
*/
issuance?: "pending" | "completed" | "failed";
/**
* @description Status of the renewal process of the Certificate.
* @example scheduled
* @enum {string}
*/
renewal?: "scheduled" | "pending" | "failed" | "unavailable";
}) | null;
/**
* @description Type of the Certificate
* @example uploaded
* @enum {string}
*/
type?: "uploaded" | "managed";
/** @description Resources currently using the Certificate */
used_by: {
/**
* Format: int64
* @description ID of resource referenced
* @example 4711
*/
id: number;
/**
* @description Type of resource referenced
* @example load_balancer
*/
type: string;
}[];
};
};
};
};
};
};
/**
* Delete a Certificate
* @description Deletes a Certificate.
*/
delete: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
responses: {
/** @description Certificate deleted */
204: {
content: never;
};
};
};
};
"/certificates/{id}/actions": {
/**
* Get all Actions for a Certificate
* @description Returns all Action objects for a Certificate. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter.
*
* Only type `managed` Certificates can have Actions. For type `uploaded` Certificates the `actions` key will always contain an empty array.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/certificates/{id}/actions/retry": {
/**
* Retry Issuance or Renewal
* @description Retry a failed Certificate issuance or renewal.
*
* Only applicable if the type of the Certificate is `managed` and the issuance or renewal status is `failed`.
*
* #### Call specific error codes
*
* | Code | Description |
* |---------------------------------------------------------|---------------------------------------------------------------------------|
* | `caa_record_does_not_allow_ca` | CAA record does not allow certificate authority |
* | `ca_dns_validation_failed` | Certificate Authority: DNS validation failed |
* | `ca_too_many_authorizations_failed_recently` | Certificate Authority: Too many authorizations failed recently |
* | `ca_too_many_certificates_issued_for_registered_domain` | Certificate Authority: Too many certificates issued for registered domain |
* | `ca_too_many_duplicate_certificates` | Certificate Authority: Too many duplicate certificates |
* | `could_not_verify_domain_delegated_to_zone` | Could not verify domain delegated to zone |
* | `dns_zone_not_found` | DNS zone not found |
* | `dns_zone_is_secondary_zone` | DNS zone is a secondary zone |
*/
post: {
parameters: {
path: {
/** @description ID of the Certificate */
id: number;
};
};
responses: {
/** @description The `action` key contains the resulting Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/certificates/{id}/actions/{action_id}": {
/**
* Get an Action for a Certificate
* @description Returns a specific Action for a Certificate. Only type `managed` Certificates have Actions.
*/
get: {
parameters: {
path: {
/** @description ID of the Certificate */
id: number;
/** @description ID of the Action */
action_id: number;
};
};
responses: {
/** @description The `action` key contains the Certificate Action */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/datacenters": {
/**
* Get all Datacenters
* @description Returns all Datacenter objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter Datacenters by their name. The response will only contain the Datacenter matching the specified name. When the name does not match the Datacenter name format, an `invalid_input` error is returned. */
name?: string;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The reply contains the `datacenters` and `recommendation` keys */
200: {
content: {
"application/json": {
datacenters: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
}[];
meta: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
/**
* Format: int64
* @description The Datacenter which is recommended to be used to create new Servers.
* @example 1
*/
recommendation: number;
};
};
};
};
};
};
"/datacenters/{id}": {
/**
* Get a Datacenter
* @description Returns a specific Datacenter object.
*/
get: {
parameters: {
path: {
/** @description ID of Datacenter */
id: number;
};
};
responses: {
/** @description The `datacenter` key in the reply contains a Datacenter object with this structure */
200: {
content: {
"application/json": {
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
};
};
};
};
};
};
"/firewalls": {
/**
* Get all Firewalls
* @description Returns all Firewall objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `firewalls` key contains an array of Firewall objects */
200: {
content: {
"application/json": {
firewalls: ({
applied_to: ({
applied_to_resources?: {
server?: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
};
/**
* @description Type of resource referenced
* @example server
* @enum {string}
*/
type?: "server";
}[];
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
server?: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
};
/**
* @description Type of resource referenced
* @example server
* @enum {string}
*/
type: "server" | "label_selector";
})[];
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels?: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
rules: ({
/** @description Description of the Rule */
description?: string | null;
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
destination_ips?: string[];
/**
* @description Select traffic direction on which rule should be applied. Use `source_ips` for direction `in` and `destination_ips` for direction `out`.
* @enum {string}
*/
direction: "in" | "out";
/**
* @description Port or port range to which traffic will be allowed, only applicable for protocols TCP and UDP. A port range can be specified by separating two ports with a dash, e.g `1024-5000`.
* @example 80
*/
port?: string;
/**
* @description Type of traffic to allow
* @enum {string}
*/
protocol: "tcp" | "udp" | "icmp" | "esp" | "gre";
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
source_ips?: string[];
})[];
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
/**
* Create a Firewall
* @description Creates a new Firewall.
*
* #### Call specific error codes
*
* | Code | Description |
* |------------------------------ |-------------------------------------------------------------- |
* | `server_already_added` | Server added more than one time to resource |
* | `incompatible_network_type` | The Network type is incompatible for the given resource |
* | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found |
*/
post: {
requestBody?: {
content: {
"application/json": {
/** @description Resources the Firewall should be applied to after creation */
apply_to?: ({
/** @description Configuration for type LabelSelector, required if type is `label_selector` */
label_selector?: {
/** @description Label selector */
selector: string;
};
/** @description Configuration for type Server, required if type is `server` */
server?: {
/**
* Format: int64
* @description ID of the Server
*/
id: number;
};
/**
* @description Type of the resource
* @enum {string}
*/
type: "server" | "label_selector";
})[];
/** @description User-defined labels (key-value pairs) */
labels?: Record<string, never>;
/**
* @description Name of the Firewall
* @example Corporate Intranet Protection
*/
name: string;
/**
* @description Array of rules
* @example [
* {
* "direction": "in",
* "port": "80",
* "protocol": "tcp",
* "source_ips": [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
* }
* ]
*/
rules?: ({
/** @description Description of the Rule */
description?: string | null;
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
destination_ips?: string[];
/**
* @description Select traffic direction on which rule should be applied. Use `source_ips` for direction `in` and `destination_ips` for direction `out`.
* @enum {string}
*/
direction: "in" | "out";
/**
* @description Port or port range to which traffic will be allowed, only applicable for protocols TCP and UDP. A port range can be specified by separating two ports with a dash, e.g `1024-5000`.
* @example 80
*/
port?: string;
/**
* @description Type of traffic to allow
* @enum {string}
*/
protocol: "tcp" | "udp" | "icmp" | "esp" | "gre";
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
source_ips?: string[];
})[];
};
};
};
responses: {
/** @description The `firewall` key contains the Firewall that was just created */
201: {
content: {
"application/json": {
/**
* @example [
* {
* "command": "set_firewall_rules",
* "error": {
* "code": "action_failed",
* "message": "Action failed"
* },
* "finished": "2016-01-30T23:56:00+00:00",
* "id": 13,
* "progress": 100,
* "resources": [
* {
* "id": 38,
* "type": "firewall"
* }
* ],
* "started": "2016-01-30T23:55:00+00:00",
* "status": "success"
* },
* {
* "command": "apply_firewall",
* "error": {
* "code": "action_failed",
* "message": "Action failed"
* },
* "finished": "2016-01-30T23:56:00+00:00",
* "id": 14,
* "progress": 100,
* "resources": [
* {
* "id": 42,
* "type": "server"
* },
* {
* "id": 38,
* "type": "firewall"
* }
* ],
* "started": "2016-01-30T23:55:00+00:00",
* "status": "success"
* }
* ]
*/
actions?: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
/** Firewall */
firewall?: {
applied_to: ({
applied_to_resources?: {
server?: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
};
/**
* @description Type of resource referenced
* @example server
* @enum {string}
*/
type?: "server";
}[];
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
server?: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
};
/**
* @description Type of resource referenced
* @example server
* @enum {string}
*/
type: "server" | "label_selector";
})[];
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels?: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
rules: ({
/** @description Description of the Rule */
description?: string | null;
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
destination_ips?: string[];
/**
* @description Select traffic direction on which rule should be applied. Use `source_ips` for direction `in` and `destination_ips` for direction `out`.
* @enum {string}
*/
direction: "in" | "out";
/**
* @description Port or port range to which traffic will be allowed, only applicable for protocols TCP and UDP. A port range can be specified by separating two ports with a dash, e.g `1024-5000`.
* @example 80
*/
port?: string;
/**
* @description Type of traffic to allow
* @enum {string}
*/
protocol: "tcp" | "udp" | "icmp" | "esp" | "gre";
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
source_ips?: string[];
})[];
};
};
};
};
};
};
};
"/firewalls/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/firewalls/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Resource */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/firewalls/{id}": {
/**
* Get a Firewall
* @description Gets a specific Firewall object.
*/
get: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
responses: {
/** @description The `firewall` key contains a Firewall object */
200: {
content: {
"application/json": {
/** Firewall */
firewall: {
applied_to: ({
applied_to_resources?: {
server?: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
};
/**
* @description Type of resource referenced
* @example server
* @enum {string}
*/
type?: "server";
}[];
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
server?: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
};
/**
* @description Type of resource referenced
* @example server
* @enum {string}
*/
type: "server" | "label_selector";
})[];
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels?: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
rules: ({
/** @description Description of the Rule */
description?: string | null;
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
destination_ips?: string[];
/**
* @description Select traffic direction on which rule should be applied. Use `source_ips` for direction `in` and `destination_ips` for direction `out`.
* @enum {string}
*/
direction: "in" | "out";
/**
* @description Port or port range to which traffic will be allowed, only applicable for protocols TCP and UDP. A port range can be specified by separating two ports with a dash, e.g `1024-5000`.
* @example 80
*/
port?: string;
/**
* @description Type of traffic to allow
* @enum {string}
*/
protocol: "tcp" | "udp" | "icmp" | "esp" | "gre";
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
source_ips?: string[];
})[];
};
};
};
};
};
};
/**
* Update a Firewall
* @description Updates the Firewall.
*
* Note that when updating labels, the Firewall's current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*
* Note: if the Firewall object changes during the request, the response will be a conflict error.
*/
put: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description New Firewall name
* @example new-name
*/
name?: string;
};
};
};
responses: {
/** @description The `firewall` key contains the Firewall that was just updated */
200: {
content: {
"application/json": {
/** Firewall */
firewall: {
applied_to: ({
applied_to_resources?: {
server?: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
};
/**
* @description Type of resource referenced
* @example server
* @enum {string}
*/
type?: "server";
}[];
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
server?: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
};
/**
* @description Type of resource referenced
* @example server
* @enum {string}
*/
type: "server" | "label_selector";
})[];
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels?: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
rules: ({
/** @description Description of the Rule */
description?: string | null;
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
destination_ips?: string[];
/**
* @description Select traffic direction on which rule should be applied. Use `source_ips` for direction `in` and `destination_ips` for direction `out`.
* @enum {string}
*/
direction: "in" | "out";
/**
* @description Port or port range to which traffic will be allowed, only applicable for protocols TCP and UDP. A port range can be specified by separating two ports with a dash, e.g `1024-5000`.
* @example 80
*/
port?: string;
/**
* @description Type of traffic to allow
* @enum {string}
*/
protocol: "tcp" | "udp" | "icmp" | "esp" | "gre";
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
source_ips?: string[];
})[];
};
};
};
};
};
};
/**
* Delete a Firewall
* @description Deletes a Firewall.
*
* #### Call specific error codes
*
* | Code | Description |
* |--------------------- |-------------------------------------------|
* | `resource_in_use` | Firewall must not be in use to be deleted |
*/
delete: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
responses: {
/** @description Firewall deleted */
204: {
content: never;
};
};
};
};
"/firewalls/{id}/actions": {
/**
* Get all Actions for a Firewall
* @description Returns all Action objects for a Firewall. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/firewalls/{id}/actions/apply_to_resources": {
/**
* Apply to Resources
* @description Applies one Firewall to multiple resources.
*
* Currently servers (public network interface) and label selectors are supported.
*
* #### Call specific error codes
*
* | Code | Description |
* |-------------------------------|---------------------------------------------------------------|
* | `firewall_already_applied` | Firewall was already applied on resource |
* | `incompatible_network_type` | The Network type is incompatible for the given resource |
* | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found |
*/
post: {
parameters: {
path: {
/** @description ID of the Firewall */
id: number;
};
};
requestBody?: {
content: {
/**
* @example {
* "apply_to": [
* {
* "server": {
* "id": 42
* },
* "type": "server"
* }
* ]
* }
*/
"application/json": {
/** @description Resources the Firewall should be applied to */
apply_to: ({
/** @description Configuration for type label_selector, required if type is `label_selector` */
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/** @description Configuration for type server, required if type is `server` */
server?: {
/**
* Format: int64
* @description ID of the Server
*/
id: number;
};
/**
* @description Type of the resource
* @enum {string}
*/
type?: "server" | "label_selector";
})[];
};
};
};
responses: {
/** @description The `actions` key contains multiple `apply_firewall` Actions */
201: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/firewalls/{id}/actions/remove_from_resources": {
/**
* Remove from Resources
* @description Removes one Firewall from multiple resources.
*
* Currently only Servers (and their public network interfaces) are supported.
*
* #### Call specific error codes
*
* | Code | Description |
* |---------------------------------------|------------------------------------------------------------------------|
* | `firewall_already_removed` | Firewall was already removed from the resource |
* | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found |
* | `firewall_managed_by_label_selector` | Firewall was applied via label selector and cannot be removed manually |
*/
post: {
parameters: {
path: {
/** @description ID of the Firewall */
id: number;
};
};
requestBody?: {
content: {
/**
* @example {
* "remove_from": [
* {
* "server": {
* "id": 42
* },
* "type": "server"
* }
* ]
* }
*/
"application/json": {
/** @description Resources the Firewall should be removed from */
remove_from: ({
/** @description Configuration for type label_selector, required if type is `label_selector` */
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/** @description Configuration for type server, required if type is `server` */
server?: {
/**
* Format: int64
* @description ID of the Server
*/
id: number;
};
/**
* @description Type of the resource
* @enum {string}
*/
type?: "server" | "label_selector";
})[];
};
};
};
responses: {
/** @description The `actions` key contains multiple `remove_firewall` Actions */
201: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/firewalls/{id}/actions/set_rules": {
/**
* Set Rules
* @description Sets the rules of a Firewall.
*
* All existing rules will be overwritten. Pass an empty `rules` array to remove all rules.
* The maximum amount of rules that can be defined is 50.
*
* #### Call specific error codes
*
* | Code | Description |
* |-------------------------------|---------------------------------------------------------------|
* | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found |
*/
post: {
parameters: {
path: {
/** @description ID of the Firewall */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/** @description Array of rules */
rules: ({
/** @description Description of the Rule */
description?: string | null;
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
destination_ips?: string[];
/**
* @description Select traffic direction on which rule should be applied. Use `source_ips` for direction `in` and `destination_ips` for direction `out`.
* @enum {string}
*/
direction: "in" | "out";
/**
* @description Port or port range to which traffic will be allowed, only applicable for protocols TCP and UDP. A port range can be specified by separating two ports with a dash, e.g `1024-5000`.
* @example 80
*/
port?: string;
/**
* @description Type of traffic to allow
* @enum {string}
*/
protocol: "tcp" | "udp" | "icmp" | "esp" | "gre";
/**
* @description List of permitted IPv4/IPv6 addresses in CIDR notation. Use `0.0.0.0/0` to allow all IPv4 addresses and `::/0` to allow all IPv6 addresses. You can specify 100 CIDRs at most.
* @example [
* "28.239.13.1/32",
* "28.239.14.0/24",
* "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128"
* ]
*/
source_ips?: string[];
})[];
};
};
};
responses: {
/** @description The `action` key contains one `set_firewall_rules` Action plus one `apply_firewall` Action per resource where the Firewall is active */
201: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/firewalls/{id}/actions/{action_id}": {
/**
* Get an Action for a Firewall
* @description Returns a specific Action for a Firewall.
*/
get: {
parameters: {
path: {
/** @description ID of the Firewall */
id: number;
/** @description ID of the Action */
action_id: number;
};
};
responses: {
/** @description The `action` key contains the Firewall Action */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/floating_ips": {
/**
* Get all Floating IPs
* @description Returns all Floating IP objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter Floating IPs by their name. The response will only contain the Floating IP matching the specified name. */
name?: string;
/** @description Can be used to filter Floating IPs by labels. The response will only contain Floating IPs matching the label selector. */
label_selector?: string;
/** @description Can be used multiple times. Choices id id:asc id:desc created created:asc created:desc */
sort?: "id" | "id:asc" | "id:desc" | "created" | "created:asc" | "created:desc";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `floating_ips` key in the reply contains an array of Floating IP objects with this structure */
200: {
content: {
"application/json": {
floating_ips: ({
/**
* @description Whether the IP is blocked
* @example false
*/
blocked: boolean;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Description of the Resource
* @example this describes my resource
*/
description: string | null;
/** @description Array of reverse DNS entries */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv4 or IPv6 address
* @example 2001:db8::1
*/
ip: string;
}[];
/** @description Location the Floating IP was created in. Routing is optimized for this Location. */
home_location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description IP address
* @example 131.232.99.1
*/
ip: string;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* Format: int64
* @description ID of the Server the Floating IP is assigned to, null if it is not assigned at all
* @example 42
*/
server: number | null;
/**
* @description Type of the Floating IP
* @enum {string}
*/
type: "ipv4" | "ipv6";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
/**
* Create a Floating IP
* @description Creates a new Floating IP assigned to a Server. If you want to create a Floating IP that is not bound to a Server, you need to provide the `home_location` key instead of `server`. This can be either the ID or the name of the Location this IP shall be created in. Note that a Floating IP can be assigned to a Server in any Location later on. For optimal routing it is advised to use the Floating IP in the same Location it was created in.
*/
post: {
/** @description The `type` argument is required while `home_location` and `server` are mutually exclusive. */
requestBody?: {
content: {
"application/json": {
/** @example Web Frontend */
description?: string;
/**
* @description Home Location (routing is optimized for that Location). Only optional if Server argument is passed.
* @example fsn1
*/
home_location?: string;
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/** @example Web Frontend */
name?: string;
/**
* Format: int64
* @description ID of the Server to assign the Floating IP to
* @example 42
*/
server?: number;
/**
* @description Floating IP type
* @enum {string}
*/
type: "ipv4" | "ipv6";
};
};
};
responses: {
/** @description The `floating_ip` key in the reply contains the object that was just created */
201: {
content: {
"application/json": {
/** Action */
action?: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
floating_ip: {
/**
* @description Whether the IP is blocked
* @example false
*/
blocked: boolean;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Description of the Resource
* @example this describes my resource
*/
description: string | null;
/** @description Array of reverse DNS entries */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv4 or IPv6 address
* @example 2001:db8::1
*/
ip: string;
}[];
/** @description Location the Floating IP was created in. Routing is optimized for this Location. */
home_location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description IP address
* @example 131.232.99.1
*/
ip: string;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* Format: int64
* @description ID of the Server the Floating IP is assigned to, null if it is not assigned at all
* @example 42
*/
server: number | null;
/**
* @description Type of the Floating IP
* @enum {string}
*/
type: "ipv4" | "ipv6";
};
};
};
};
};
};
};
"/floating_ips/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/floating_ips/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/floating_ips/{id}": {
/**
* Get a Floating IP
* @description Returns a specific Floating IP object.
*/
get: {
parameters: {
path: {
/** @description ID of the Floating IP */
id: number;
};
};
responses: {
/** @description The `floating_ip` key in the reply contains a Floating IP object with this structure */
200: {
content: {
"application/json": {
floating_ip: {
/**
* @description Whether the IP is blocked
* @example false
*/
blocked: boolean;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Description of the Resource
* @example this describes my resource
*/
description: string | null;
/** @description Array of reverse DNS entries */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv4 or IPv6 address
* @example 2001:db8::1
*/
ip: string;
}[];
/** @description Location the Floating IP was created in. Routing is optimized for this Location. */
home_location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description IP address
* @example 131.232.99.1
*/
ip: string;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* Format: int64
* @description ID of the Server the Floating IP is assigned to, null if it is not assigned at all
* @example 42
*/
server: number | null;
/**
* @description Type of the Floating IP
* @enum {string}
*/
type: "ipv4" | "ipv6";
};
};
};
};
};
};
/**
* Update a Floating IP
* @description Updates the description or labels of a Floating IP.
* Also note that when updating labels, the Floating IPs current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*/
put: {
parameters: {
path: {
/** @description ID of the Floating IP */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description New Description to set
* @example Web Frontend
*/
description?: string;
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description New unique name to set
* @example Web Frontend
*/
name?: string;
};
};
};
responses: {
/** @description The `floating_ip` key in the reply contains the modified Floating IP object with the new description */
200: {
content: {
"application/json": {
floating_ip: {
/**
* @description Whether the IP is blocked
* @example false
*/
blocked: boolean;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Description of the Resource
* @example this describes my resource
*/
description: string | null;
/** @description Array of reverse DNS entries */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv4 or IPv6 address
* @example 2001:db8::1
*/
ip: string;
}[];
/** @description Location the Floating IP was created in. Routing is optimized for this Location. */
home_location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description IP address
* @example 131.232.99.1
*/
ip: string;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* Format: int64
* @description ID of the Server the Floating IP is assigned to, null if it is not assigned at all
* @example 42
*/
server: number | null;
/**
* @description Type of the Floating IP
* @enum {string}
*/
type: "ipv4" | "ipv6";
};
};
};
};
};
};
/**
* Delete a Floating IP
* @description Deletes a Floating IP. If it is currently assigned to a Server it will automatically get unassigned.
*/
delete: {
parameters: {
path: {
/** @description ID of the Floating IP */
id: number;
};
};
responses: {
/** @description Floating IP deleted */
204: {
content: never;
};
};
};
};
"/floating_ips/{id}/actions": {
/**
* Get all Actions for a Floating IP
* @description Returns all Action objects for a Floating IP. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
path: {
/** @description ID of the Floating IP */
id: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/floating_ips/{id}/actions/assign": {
/**
* Assign a Floating IP to a Server
* @description Assigns a Floating IP to a Server.
*/
post: {
parameters: {
path: {
/** @description ID of the Floating IP */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* Format: int64
* @description ID of the Server the Floating IP shall be assigned to
* @example 42
*/
server: number;
};
};
};
responses: {
/** @description The `action` key contains the `assign` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/floating_ips/{id}/actions/change_dns_ptr": {
/**
* Change reverse DNS entry for a Floating IP
* @description Changes the hostname that will appear when getting the hostname belonging to this Floating IP.
*/
post: {
parameters: {
path: {
/** @description ID of the Floating IP */
id: number;
};
};
/**
* @description Select the IP address for which to change the DNS entry by passing `ip`. For a Floating IP of type `ipv4` this must exactly match the IP address of the Floating IP. For a Floating IP of type `ipv6` this must be a single IP within the IPv6 /64 range that belongs to this Floating IP. You can add up to 100 IPv6 reverse DNS entries.
*
* The target hostname is set by passing `dns_ptr`.
*/
requestBody?: {
content: {
"application/json": {
/**
* @description Hostname to set as a reverse DNS PTR entry, will reset to original default value if `null`
* @example server02.example.com
*/
dns_ptr: string | null;
/**
* @description IP address for which to set the reverse DNS entry
* @example 1.2.3.4
*/
ip: string;
};
};
};
responses: {
/** @description The `action` key contains the `change_dns_ptr` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/floating_ips/{id}/actions/change_protection": {
/**
* Change Floating IP Protection
* @description Changes the protection configuration of the Floating IP.
*/
post: {
parameters: {
path: {
/** @description ID of the Floating IP */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description If true, prevents the Floating IP from being deleted
* @example true
*/
delete?: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `change_protection` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/floating_ips/{id}/actions/unassign": {
/**
* Unassign a Floating IP
* @description Unassigns a Floating IP, resulting in it being unreachable. You may assign it to a Server again at a later time.
*/
post: {
parameters: {
path: {
/** @description ID of the Floating IP */
id: number;
};
};
responses: {
/** @description The `action` key contains the `unassign` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/floating_ips/{id}/actions/{action_id}": {
/**
* Get an Action for a Floating IP
* @description Returns a specific Action object for a Floating IP.
*/
get: {
parameters: {
path: {
/** @description ID of the Floating IP */
id: number;
/** @description ID of the Action */
action_id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/images": {
/**
* Get all Images
* @description Returns all Image objects. You can select specific Image types only and sort the results by using URI parameters.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
/** @description Can be used multiple times. */
type?: "system" | "snapshot" | "backup" | "app";
/** @description Can be used multiple times. The response will only contain Images matching the status. */
status?: "available" | "creating";
/** @description Can be used multiple times. Server ID linked to the Image. Only available for Images of type `backup` */
bound_to?: string;
/** @description Can be used multiple times. */
include_deprecated?: boolean;
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/** @description Return only Images with the given architecture. */
architecture?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `images` key in the reply contains an array of Image objects with this structure */
200: {
content: {
"application/json": {
images: ({
/**
* @description Type of cpu architecture this image is compatible with.
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* Format: int64
* @description ID of Server the Image is bound to. Only set for Images of type `backup`.
* @example null
*/
bound_to: number | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Information about the Server the Image was created from */
created_from: {
/**
* Format: int64
* @description ID of the Server the Image was created from
* @example 1
*/
id: number;
/**
* @description Server name at the time the Image was created
* @example Server
*/
name: string;
} | null;
/**
* @description Point in time where the Image was deleted (in ISO-8601 format)
* @example null
*/
deleted: string | null;
/**
* @description Point in time when the Image is considered to be deprecated (in ISO-8601 format)
* @example 2018-02-28T00:00:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Image
* @example Ubuntu 20.04 Standard 64 bit
*/
description: string;
/**
* @description Size of the disk contained in the Image in GB
* @example 10
*/
disk_size: number;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image.
* @example 2.3
*/
image_size: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Unique identifier of the Image. This value is only set for system Images.
* @example ubuntu-20.04
*/
name: string | null;
/**
* @description Flavor of operating system contained in the Image
* @example ubuntu
* @enum {string}
*/
os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
/**
* @description Operating system version
* @example 20.04
*/
os_version: string | null;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Indicates that rapid deploy of the Image is available
* @example false
*/
rapid_deploy?: boolean;
/**
* @description Whether the Image can be used or if it's still being created or unavailable
* @enum {string}
*/
status: "available" | "creating" | "unavailable";
/**
* @description Type of the Image
* @example snapshot
* @enum {string}
*/
type: "system" | "app" | "snapshot" | "backup" | "temporary";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/images/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/images/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Resource */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/images/{id}": {
/**
* Get an Image
* @description Returns a specific Image object.
*/
get: {
parameters: {
path: {
/** @description ID of the Image */
id: number;
};
};
responses: {
/** @description The `image` key in the reply contains an Image object with this structure */
200: {
content: {
"application/json": {
image?: {
/**
* @description Type of cpu architecture this image is compatible with.
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* Format: int64
* @description ID of Server the Image is bound to. Only set for Images of type `backup`.
* @example null
*/
bound_to: number | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Information about the Server the Image was created from */
created_from: {
/**
* Format: int64
* @description ID of the Server the Image was created from
* @example 1
*/
id: number;
/**
* @description Server name at the time the Image was created
* @example Server
*/
name: string;
} | null;
/**
* @description Point in time where the Image was deleted (in ISO-8601 format)
* @example null
*/
deleted: string | null;
/**
* @description Point in time when the Image is considered to be deprecated (in ISO-8601 format)
* @example 2018-02-28T00:00:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Image
* @example Ubuntu 20.04 Standard 64 bit
*/
description: string;
/**
* @description Size of the disk contained in the Image in GB
* @example 10
*/
disk_size: number;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image.
* @example 2.3
*/
image_size: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Unique identifier of the Image. This value is only set for system Images.
* @example ubuntu-20.04
*/
name: string | null;
/**
* @description Flavor of operating system contained in the Image
* @example ubuntu
* @enum {string}
*/
os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
/**
* @description Operating system version
* @example 20.04
*/
os_version: string | null;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Indicates that rapid deploy of the Image is available
* @example false
*/
rapid_deploy?: boolean;
/**
* @description Whether the Image can be used or if it's still being created or unavailable
* @enum {string}
*/
status: "available" | "creating" | "unavailable";
/**
* @description Type of the Image
* @example snapshot
* @enum {string}
*/
type: "system" | "app" | "snapshot" | "backup" | "temporary";
};
};
};
};
};
};
/**
* Update an Image
* @description Updates the Image. You may change the description, convert a Backup Image to a Snapshot Image or change the Image labels. Only Images of type `snapshot` and `backup` can be updated.
*
* Note that when updating labels, the current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*/
put: {
parameters: {
path: {
/** @description ID of the Image */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description New description of Image
* @example My new Image description
*/
description?: string;
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description Destination Image type to convert to
* @enum {string}
*/
type?: "snapshot";
};
};
};
responses: {
/** @description The image key in the reply contains the modified Image object */
200: {
content: {
"application/json": {
image?: {
/**
* @description Type of cpu architecture this image is compatible with.
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* Format: int64
* @description ID of Server the Image is bound to. Only set for Images of type `backup`.
* @example null
*/
bound_to: number | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Information about the Server the Image was created from */
created_from: {
/**
* Format: int64
* @description ID of the Server the Image was created from
* @example 1
*/
id: number;
/**
* @description Server name at the time the Image was created
* @example Server
*/
name: string;
} | null;
/**
* @description Point in time where the Image was deleted (in ISO-8601 format)
* @example null
*/
deleted: string | null;
/**
* @description Point in time when the Image is considered to be deprecated (in ISO-8601 format)
* @example 2018-02-28T00:00:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Image
* @example Ubuntu 20.04 Standard 64 bit
*/
description: string;
/**
* @description Size of the disk contained in the Image in GB
* @example 10
*/
disk_size: number;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image.
* @example 2.3
*/
image_size: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Unique identifier of the Image. This value is only set for system Images.
* @example ubuntu-20.04
*/
name: string | null;
/**
* @description Flavor of operating system contained in the Image
* @example ubuntu
* @enum {string}
*/
os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
/**
* @description Operating system version
* @example 20.04
*/
os_version: string | null;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Indicates that rapid deploy of the Image is available
* @example false
*/
rapid_deploy?: boolean;
/**
* @description Whether the Image can be used or if it's still being created or unavailable
* @enum {string}
*/
status: "available" | "creating" | "unavailable";
/**
* @description Type of the Image
* @example snapshot
* @enum {string}
*/
type: "system" | "app" | "snapshot" | "backup" | "temporary";
};
};
};
};
};
};
/**
* Delete an Image
* @description Deletes an Image. Only Images of type `snapshot` and `backup` can be deleted.
*/
delete: {
parameters: {
path: {
/** @description ID of the Image */
id: number;
};
};
responses: {
/** @description Image deleted */
204: {
content: never;
};
};
};
};
"/images/{id}/actions": {
/**
* Get all Actions for an Image
* @description Returns all Action objects for an Image. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
path: {
/** @description ID of the Image */
id: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/images/{id}/actions/change_protection": {
/**
* Change Image Protection
* @description Changes the protection configuration of the Image. Can only be used on snapshots.
*/
post: {
parameters: {
path: {
/** @description ID of the Image */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description If true, prevents the snapshot from being deleted
* @example true
*/
delete?: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `change_protection` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/images/{id}/actions/{action_id}": {
/**
* Get an Action for an Image
* @description Returns a specific Action for an Image.
*/
get: {
parameters: {
path: {
/** @description ID of the Image */
id: number;
/** @description ID of the Action */
action_id: number;
};
};
responses: {
/** @description The `action` key contains the Image Action */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/isos": {
/**
* Get all ISOs
* @description Returns all available ISO objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter ISOs by their name. The response will only contain the ISO matching the specified name. */
name?: string;
/** @description Return only ISOs with the given architecture. */
architecture?: string;
/** @description Include Images with wildcard architecture (architecture is null). Works only if architecture filter is specified. */
include_architecture_wildcard?: boolean;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `isos` key in the reply contains an array of iso objects with this structure */
200: {
content: {
"application/json": {
isos: ({
/**
* @description Type of cpu architecture this iso is compatible with. Null indicates no restriction on the architecture (wildcard).
* @example x86
* @enum {string|null}
*/
architecture: "x86" | "arm" | null;
/**
* DeprecationInfo
* @description Describes if, when & how the resources was deprecated. If this field is
* set to `null` the resource is not deprecated. If it has a value, it is
* considered deprecated.
*/
deprecation: {
/**
* Format: iso-8601
* @description Date of when the deprecation was announced.
*
* @example 2023-06-01T00:00:00+00:00
*/
announced: string;
/**
* Format: iso-8601
* @description After the time in this field, the resource will not be available
* from the general listing endpoint of the resource type, and it
* can not be used in new resources. For example, if this is an
* image, you can not create new servers with this image after the
* mentioned date.
*
* @example 2023-09-01T00:00:00+00:00
*/
unavailable_after: string;
} | null;
/**
* @description Description of the ISO
* @example FreeBSD 11.0 x64
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Unique identifier of the ISO. Only set for public ISOs
* @example FreeBSD-11.0-RELEASE-amd64-dvd1
*/
name: string | null;
/**
* @description Type of the ISO
* @enum {string|null}
*/
type: "public" | "private" | null;
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/isos/{id}": {
/**
* Get an ISO
* @description Returns a specific ISO object.
*/
get: {
parameters: {
path: {
/** @description ID of the ISO */
id: number;
};
};
responses: {
/** @description The `iso` key in the reply contains an array of ISO objects with this structure */
200: {
content: {
"application/json": {
iso: {
/**
* @description Type of cpu architecture this iso is compatible with. Null indicates no restriction on the architecture (wildcard).
* @example x86
* @enum {string|null}
*/
architecture: "x86" | "arm" | null;
/**
* DeprecationInfo
* @description Describes if, when & how the resources was deprecated. If this field is
* set to `null` the resource is not deprecated. If it has a value, it is
* considered deprecated.
*/
deprecation: {
/**
* Format: iso-8601
* @description Date of when the deprecation was announced.
*
* @example 2023-06-01T00:00:00+00:00
*/
announced: string;
/**
* Format: iso-8601
* @description After the time in this field, the resource will not be available
* from the general listing endpoint of the resource type, and it
* can not be used in new resources. For example, if this is an
* image, you can not create new servers with this image after the
* mentioned date.
*
* @example 2023-09-01T00:00:00+00:00
*/
unavailable_after: string;
} | null;
/**
* @description Description of the ISO
* @example FreeBSD 11.0 x64
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Unique identifier of the ISO. Only set for public ISOs
* @example FreeBSD-11.0-RELEASE-amd64-dvd1
*/
name: string | null;
/**
* @description Type of the ISO
* @enum {string|null}
*/
type: "public" | "private" | null;
};
};
};
};
};
};
};
"/load_balancer_types": {
/**
* Get all Load Balancer Types
* @description Gets all Load Balancer type objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter Load Balancer types by their name. The response will only contain the Load Balancer type matching the specified name. */
name?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `load_balancer_types` key in the reply contains an array of Load Balancer type objects with this structure */
200: {
content: {
"application/json": {
load_balancer_types: ({
/**
* @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Load Balancer type
* @example LB11
*/
description: string;
/**
* Format: int64
* @description ID of the Load Balancer type
* @example 1
*/
id: number;
/**
* Format: int64
* @description Number of SSL Certificates that can be assigned to a single Load Balancer
* @example 10
*/
max_assigned_certificates: number;
/**
* Format: int64
* @description Number of maximum simultaneous open connections
* @example 20000
*/
max_connections: number;
/**
* Format: int64
* @description Number of services a Load Balancer of this type can have
* @example 5
*/
max_services: number;
/**
* Format: int64
* @description Number of targets a single Load Balancer can have
* @example 25
*/
max_targets: number;
/**
* @description Unique identifier of the Load Balancer type
* @example lb11
*/
name: string;
/** @description Prices in different network zones */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Resource in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Resource in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
})[];
};
};
};
};
};
};
"/load_balancer_types/{id}": {
/**
* Get a Load Balancer Type
* @description Gets a specific Load Balancer type object.
*/
get: {
parameters: {
path: {
/** @description ID of Load Balancer type */
id: number;
};
};
responses: {
/** @description The `load_balancer_type` key in the reply contains a Load Balancer type object with this structure */
200: {
content: {
"application/json": {
load_balancer_type?: {
/**
* @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Load Balancer type
* @example LB11
*/
description: string;
/**
* Format: int64
* @description ID of the Load Balancer type
* @example 1
*/
id: number;
/**
* Format: int64
* @description Number of SSL Certificates that can be assigned to a single Load Balancer
* @example 10
*/
max_assigned_certificates: number;
/**
* Format: int64
* @description Number of maximum simultaneous open connections
* @example 20000
*/
max_connections: number;
/**
* Format: int64
* @description Number of services a Load Balancer of this type can have
* @example 5
*/
max_services: number;
/**
* Format: int64
* @description Number of targets a single Load Balancer can have
* @example 25
*/
max_targets: number;
/**
* @description Unique identifier of the Load Balancer type
* @example lb11
*/
name: string;
/** @description Prices in different network zones */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Resource in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Resource in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
};
};
};
};
};
};
};
"/load_balancers": {
/**
* Get all Load Balancers
* @description Gets all existing Load Balancers that you have available.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `load_balancers` key contains a list of Load Balancers */
200: {
content: {
"application/json": {
load_balancers: ({
/** @description Algorithm of the Load Balancer */
algorithm: {
/**
* @description Type of the algorithm
* @enum {string}
*/
type: "round_robin" | "least_connections";
};
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* Format: int64
* @description Free Traffic for the current billing period in bytes
* @example 10000
*/
included_traffic: number;
/**
* Format: int64
* @description Inbound Traffic for the current billing period in bytes
*/
ingoing_traffic: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
load_balancer_type: {
/**
* @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Load Balancer type
* @example LB11
*/
description: string;
/**
* Format: int64
* @description ID of the Load Balancer type
* @example 1
*/
id: number;
/**
* Format: int64
* @description Number of SSL Certificates that can be assigned to a single Load Balancer
* @example 10
*/
max_assigned_certificates: number;
/**
* Format: int64
* @description Number of maximum simultaneous open connections
* @example 20000
*/
max_connections: number;
/**
* Format: int64
* @description Number of services a Load Balancer of this type can have
* @example 5
*/
max_services: number;
/**
* Format: int64
* @description Number of targets a single Load Balancer can have
* @example 25
*/
max_targets: number;
/**
* @description Unique identifier of the Load Balancer type
* @example lb11
*/
name: string;
/** @description Prices in different network zones */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Resource in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Resource in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
};
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* Format: int64
* @description Outbound Traffic for the current billing period in bytes
*/
outgoing_traffic: number | null;
/** @description Private networks information */
private_net: {
/**
* @description IP address (v4) of this Load Balancer in this Network
* @example 10.0.0.2
*/
ip?: string;
/**
* Format: int64
* @description ID of the Network
* @example 4711
*/
network?: number;
}[];
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/** @description Public network information */
public_net: {
/** @description Public Interface enabled or not */
enabled: boolean;
/** @description IP address (v4) */
ipv4: {
/**
* @description Reverse DNS PTR entry for the IPv4 address of this Load Balancer
* @example lb1.example.com
*/
dns_ptr?: string | null;
/**
* @description IP address (v4) of this Load Balancer
* @example 1.2.3.4
*/
ip?: string | null;
};
/** @description IP address (v6) */
ipv6: {
/**
* @description Reverse DNS PTR entry for the IPv6 address of this Load Balancer
* @example lb1.example.com
*/
dns_ptr?: string | null;
/**
* @description IP address (v6) of this Load Balancer
* @example 2001:db8::1
*/
ip?: string | null;
};
};
/** @description List of services that belong to this Load Balancer */
services: ({
/**
* @description Port the Load Balancer will balance to
* @example 80
*/
destination_port: number;
/**
* LoadBalancerServiceHealthCheck
* @description Service health check
*/
health_check: {
/** @description Additional configuration for protocol http */
http?: {
/**
* @description Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent.
* @example example.com
*/
domain: string | null;
/**
* @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead.
* @example /
*/
path: string;
/**
* @description String that must be contained in HTTP response in order to pass the health check
* @example {"status": "ok"}
*/
response?: string;
/**
* @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones.
* @default [
* "2??",
* "3??"
* ]
* @example [
* "2??",
* "3??"
* ]
*/
status_codes?: string[];
/**
* @description Use HTTPS for health check
* @example false
*/
tls?: boolean;
};
/**
* @description Time interval in seconds health checks are performed
* @example 15
*/
interval: number;
/**
* @description Port the health check will be performed on
* @example 4711
*/
port: number;
/**
* @description Type of the health check
* @example http
* @enum {string}
*/
protocol: "tcp" | "http";
/**
* @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again
* @example 3
*/
retries: number;
/**
* @description Time in seconds after an attempt is considered a timeout
* @example 10
*/
timeout: number;
};
/**
* LoadBalancerServiceHTTP
* @description Configuration option for protocols http and https
*/
http?: {
/**
* @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`.
* @example [
* 897
* ]
*/
certificates?: number[];
/**
* @description Lifetime of the cookie used for sticky sessions (in seconds).
* @default 300
* @example 300
*/
cookie_lifetime?: number;
/**
* @description Name of the cookie used for sticky sessions.
* @default HCLBSTICKY
* @example HCLBSTICKY
*/
cookie_name?: string;
/**
* @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`.
* @default false
* @example true
*/
redirect_http?: boolean;
/**
* @description Use sticky sessions. Only available if `protocol` is `http` or `https`.
* @default false
* @example true
*/
sticky_sessions?: boolean;
};
/**
* @description Port the Load Balancer listens on
* @example 443
*/
listen_port: number;
/**
* @description Protocol of the Load Balancer
* @example https
* @enum {string}
*/
protocol: "tcp" | "http" | "https";
/**
* @description Is Proxyprotocol enabled or not
* @example false
*/
proxyprotocol: boolean;
})[];
/** @description List of targets that belong to this Load Balancer */
targets: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetIP
* @description IP targets where the traffic should be routed to. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only present for target type "ip".
*/
ip?: {
/**
* @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a Subnetwork type vswitch.
* @example 203.0.113.1
*/
ip: string;
};
/**
* LoadBalancerTargetLabelSelector
* @description Label selector used to determine targets. Only present for target type "label_selector".
*/
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/** @description List of resolved label selector target Servers. Only present for type "label_selector". */
targets?: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/**
* @description Type of the resource. Here always "server".
* @example server
*/
type?: string;
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
/**
* @description Type of the resource
* @enum {string}
*/
type: "server" | "label_selector" | "ip";
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
/**
* Create a Load Balancer
* @description Creates a Load Balancer.
*
* #### Call specific error codes
*
* | Code | Description |
* |-----------------------------------------|-------------------------------------------------------------------------------------------------------|
* | `cloud_resource_ip_not_allowed` | The IP you are trying to add as a target belongs to a Hetzner Cloud resource |
* | `ip_not_owned` | The IP is not owned by the owner of the project of the Load Balancer |
* | `load_balancer_not_attached_to_network` | The Load Balancer is not attached to a network |
* | `robot_unavailable` | Robot was not available. The caller may retry the operation after a short delay. |
* | `server_not_attached_to_network` | The server you are trying to add as a target is not attached to the same network as the Load Balancer |
* | `source_port_already_used` | The source port you are trying to add is already in use |
* | `target_already_defined` | The Load Balancer target you are trying to define is already defined |
*/
post: {
requestBody?: {
content: {
"application/json": {
/**
* LoadBalancerAlgorithm
* @description Algorithm of the Load Balancer
*/
algorithm?: {
/**
* @description Type of the algorithm.
* @default round_robin
* @enum {string}
*/
type: "round_robin" | "least_connections";
};
/** @description User-defined labels (key-value pairs) */
labels?: {
/**
* @description New label
* @example value
*/
labelkey?: string;
};
/**
* @description ID or name of the Load Balancer type this Load Balancer should be created with
* @example lb11
*/
load_balancer_type: string;
/** @description ID or name of Location to create Load Balancer in */
location?: string;
/**
* @description Name of the Load Balancer
* @example Web Frontend
*/
name: string;
/**
* Format: int64
* @description ID of the network the Load Balancer should be attached to on creation
* @example 123
*/
network?: number;
/**
* @description Name of network zone
* @example eu-central
*/
network_zone?: string;
/**
* @description Enable or disable the public interface of the Load Balancer
* @example true
*/
public_interface?: boolean;
/** @description Array of services */
services?: ({
/**
* @description Port the Load Balancer will balance to
* @example 80
*/
destination_port: number;
/**
* LoadBalancerServiceHealthCheck
* @description Service health check
*/
health_check: {
/** @description Additional configuration for protocol http */
http?: {
/**
* @description Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent.
* @example example.com
*/
domain: string | null;
/**
* @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead.
* @example /
*/
path: string;
/**
* @description String that must be contained in HTTP response in order to pass the health check
* @example {"status": "ok"}
*/
response?: string;
/**
* @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones.
* @default [
* "2??",
* "3??"
* ]
* @example [
* "2??",
* "3??"
* ]
*/
status_codes?: string[];
/**
* @description Use HTTPS for health check
* @example false
*/
tls?: boolean;
};
/**
* @description Time interval in seconds health checks are performed
* @example 15
*/
interval: number;
/**
* @description Port the health check will be performed on
* @example 4711
*/
port: number;
/**
* @description Type of the health check
* @example http
* @enum {string}
*/
protocol: "tcp" | "http";
/**
* @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again
* @example 3
*/
retries: number;
/**
* @description Time in seconds after an attempt is considered a timeout
* @example 10
*/
timeout: number;
};
/**
* LoadBalancerServiceHTTP
* @description Configuration option for protocols http and https
*/
http?: {
/**
* @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`.
* @example [
* 897
* ]
*/
certificates?: number[];
/**
* @description Lifetime of the cookie used for sticky sessions (in seconds).
* @default 300
* @example 300
*/
cookie_lifetime?: number;
/**
* @description Name of the cookie used for sticky sessions.
* @default HCLBSTICKY
* @example HCLBSTICKY
*/
cookie_name?: string;
/**
* @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`.
* @default false
* @example true
*/
redirect_http?: boolean;
/**
* @description Use sticky sessions. Only available if `protocol` is `http` or `https`.
* @default false
* @example true
*/
sticky_sessions?: boolean;
};
/**
* @description Port the Load Balancer listens on
* @example 443
*/
listen_port: number;
/**
* @description Protocol of the Load Balancer
* @example https
* @enum {string}
*/
protocol: "tcp" | "http" | "https";
/**
* @description Is Proxyprotocol enabled or not
* @example false
*/
proxyprotocol: boolean;
})[];
/** @description Array of targets */
targets?: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetIP
* @description IP targets where the traffic should be routed to. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only present for target type "ip".
*/
ip?: {
/**
* @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a Subnetwork type vswitch.
* @example 203.0.113.1
*/
ip: string;
};
/**
* LoadBalancerTargetLabelSelector
* @description Label selector used to determine targets. Only present for target type "label_selector".
*/
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/** @description List of resolved label selector target Servers. Only present for type "label_selector". */
targets?: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/**
* @description Type of the resource. Here always "server".
* @example server
*/
type?: string;
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
/**
* @description Type of the resource
* @enum {string}
*/
type: "server" | "label_selector" | "ip";
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
};
};
};
responses: {
/** @description The `load_balancer` key contains the Load Balancer that was just created */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
load_balancer: {
/** @description Algorithm of the Load Balancer */
algorithm: {
/**
* @description Type of the algorithm
* @enum {string}
*/
type: "round_robin" | "least_connections";
};
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* Format: int64
* @description Free Traffic for the current billing period in bytes
* @example 10000
*/
included_traffic: number;
/**
* Format: int64
* @description Inbound Traffic for the current billing period in bytes
*/
ingoing_traffic: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
load_balancer_type: {
/**
* @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Load Balancer type
* @example LB11
*/
description: string;
/**
* Format: int64
* @description ID of the Load Balancer type
* @example 1
*/
id: number;
/**
* Format: int64
* @description Number of SSL Certificates that can be assigned to a single Load Balancer
* @example 10
*/
max_assigned_certificates: number;
/**
* Format: int64
* @description Number of maximum simultaneous open connections
* @example 20000
*/
max_connections: number;
/**
* Format: int64
* @description Number of services a Load Balancer of this type can have
* @example 5
*/
max_services: number;
/**
* Format: int64
* @description Number of targets a single Load Balancer can have
* @example 25
*/
max_targets: number;
/**
* @description Unique identifier of the Load Balancer type
* @example lb11
*/
name: string;
/** @description Prices in different network zones */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Resource in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Resource in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
};
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* Format: int64
* @description Outbound Traffic for the current billing period in bytes
*/
outgoing_traffic: number | null;
/** @description Private networks information */
private_net: {
/**
* @description IP address (v4) of this Load Balancer in this Network
* @example 10.0.0.2
*/
ip?: string;
/**
* Format: int64
* @description ID of the Network
* @example 4711
*/
network?: number;
}[];
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/** @description Public network information */
public_net: {
/** @description Public Interface enabled or not */
enabled: boolean;
/** @description IP address (v4) */
ipv4: {
/**
* @description Reverse DNS PTR entry for the IPv4 address of this Load Balancer
* @example lb1.example.com
*/
dns_ptr?: string | null;
/**
* @description IP address (v4) of this Load Balancer
* @example 1.2.3.4
*/
ip?: string | null;
};
/** @description IP address (v6) */
ipv6: {
/**
* @description Reverse DNS PTR entry for the IPv6 address of this Load Balancer
* @example lb1.example.com
*/
dns_ptr?: string | null;
/**
* @description IP address (v6) of this Load Balancer
* @example 2001:db8::1
*/
ip?: string | null;
};
};
/** @description List of services that belong to this Load Balancer */
services: ({
/**
* @description Port the Load Balancer will balance to
* @example 80
*/
destination_port: number;
/**
* LoadBalancerServiceHealthCheck
* @description Service health check
*/
health_check: {
/** @description Additional configuration for protocol http */
http?: {
/**
* @description Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent.
* @example example.com
*/
domain: string | null;
/**
* @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead.
* @example /
*/
path: string;
/**
* @description String that must be contained in HTTP response in order to pass the health check
* @example {"status": "ok"}
*/
response?: string;
/**
* @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones.
* @default [
* "2??",
* "3??"
* ]
* @example [
* "2??",
* "3??"
* ]
*/
status_codes?: string[];
/**
* @description Use HTTPS for health check
* @example false
*/
tls?: boolean;
};
/**
* @description Time interval in seconds health checks are performed
* @example 15
*/
interval: number;
/**
* @description Port the health check will be performed on
* @example 4711
*/
port: number;
/**
* @description Type of the health check
* @example http
* @enum {string}
*/
protocol: "tcp" | "http";
/**
* @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again
* @example 3
*/
retries: number;
/**
* @description Time in seconds after an attempt is considered a timeout
* @example 10
*/
timeout: number;
};
/**
* LoadBalancerServiceHTTP
* @description Configuration option for protocols http and https
*/
http?: {
/**
* @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`.
* @example [
* 897
* ]
*/
certificates?: number[];
/**
* @description Lifetime of the cookie used for sticky sessions (in seconds).
* @default 300
* @example 300
*/
cookie_lifetime?: number;
/**
* @description Name of the cookie used for sticky sessions.
* @default HCLBSTICKY
* @example HCLBSTICKY
*/
cookie_name?: string;
/**
* @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`.
* @default false
* @example true
*/
redirect_http?: boolean;
/**
* @description Use sticky sessions. Only available if `protocol` is `http` or `https`.
* @default false
* @example true
*/
sticky_sessions?: boolean;
};
/**
* @description Port the Load Balancer listens on
* @example 443
*/
listen_port: number;
/**
* @description Protocol of the Load Balancer
* @example https
* @enum {string}
*/
protocol: "tcp" | "http" | "https";
/**
* @description Is Proxyprotocol enabled or not
* @example false
*/
proxyprotocol: boolean;
})[];
/** @description List of targets that belong to this Load Balancer */
targets: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetIP
* @description IP targets where the traffic should be routed to. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only present for target type "ip".
*/
ip?: {
/**
* @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a Subnetwork type vswitch.
* @example 203.0.113.1
*/
ip: string;
};
/**
* LoadBalancerTargetLabelSelector
* @description Label selector used to determine targets. Only present for target type "label_selector".
*/
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/** @description List of resolved label selector target Servers. Only present for type "label_selector". */
targets?: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/**
* @description Type of the resource. Here always "server".
* @example server
*/
type?: string;
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
/**
* @description Type of the resource
* @enum {string}
*/
type: "server" | "label_selector" | "ip";
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
};
};
};
};
};
};
};
"/load_balancers/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/load_balancers/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}": {
/**
* Get a Load Balancer
* @description Gets a specific Load Balancer object.
*/
get: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
responses: {
/** @description The `load_balancer` key contains the Load Balancer */
200: {
content: {
"application/json": {
load_balancer: {
/** @description Algorithm of the Load Balancer */
algorithm: {
/**
* @description Type of the algorithm
* @enum {string}
*/
type: "round_robin" | "least_connections";
};
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* Format: int64
* @description Free Traffic for the current billing period in bytes
* @example 10000
*/
included_traffic: number;
/**
* Format: int64
* @description Inbound Traffic for the current billing period in bytes
*/
ingoing_traffic: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
load_balancer_type: {
/**
* @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Load Balancer type
* @example LB11
*/
description: string;
/**
* Format: int64
* @description ID of the Load Balancer type
* @example 1
*/
id: number;
/**
* Format: int64
* @description Number of SSL Certificates that can be assigned to a single Load Balancer
* @example 10
*/
max_assigned_certificates: number;
/**
* Format: int64
* @description Number of maximum simultaneous open connections
* @example 20000
*/
max_connections: number;
/**
* Format: int64
* @description Number of services a Load Balancer of this type can have
* @example 5
*/
max_services: number;
/**
* Format: int64
* @description Number of targets a single Load Balancer can have
* @example 25
*/
max_targets: number;
/**
* @description Unique identifier of the Load Balancer type
* @example lb11
*/
name: string;
/** @description Prices in different network zones */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Resource in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Resource in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
};
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* Format: int64
* @description Outbound Traffic for the current billing period in bytes
*/
outgoing_traffic: number | null;
/** @description Private networks information */
private_net: {
/**
* @description IP address (v4) of this Load Balancer in this Network
* @example 10.0.0.2
*/
ip?: string;
/**
* Format: int64
* @description ID of the Network
* @example 4711
*/
network?: number;
}[];
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/** @description Public network information */
public_net: {
/** @description Public Interface enabled or not */
enabled: boolean;
/** @description IP address (v4) */
ipv4: {
/**
* @description Reverse DNS PTR entry for the IPv4 address of this Load Balancer
* @example lb1.example.com
*/
dns_ptr?: string | null;
/**
* @description IP address (v4) of this Load Balancer
* @example 1.2.3.4
*/
ip?: string | null;
};
/** @description IP address (v6) */
ipv6: {
/**
* @description Reverse DNS PTR entry for the IPv6 address of this Load Balancer
* @example lb1.example.com
*/
dns_ptr?: string | null;
/**
* @description IP address (v6) of this Load Balancer
* @example 2001:db8::1
*/
ip?: string | null;
};
};
/** @description List of services that belong to this Load Balancer */
services: ({
/**
* @description Port the Load Balancer will balance to
* @example 80
*/
destination_port: number;
/**
* LoadBalancerServiceHealthCheck
* @description Service health check
*/
health_check: {
/** @description Additional configuration for protocol http */
http?: {
/**
* @description Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent.
* @example example.com
*/
domain: string | null;
/**
* @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead.
* @example /
*/
path: string;
/**
* @description String that must be contained in HTTP response in order to pass the health check
* @example {"status": "ok"}
*/
response?: string;
/**
* @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones.
* @default [
* "2??",
* "3??"
* ]
* @example [
* "2??",
* "3??"
* ]
*/
status_codes?: string[];
/**
* @description Use HTTPS for health check
* @example false
*/
tls?: boolean;
};
/**
* @description Time interval in seconds health checks are performed
* @example 15
*/
interval: number;
/**
* @description Port the health check will be performed on
* @example 4711
*/
port: number;
/**
* @description Type of the health check
* @example http
* @enum {string}
*/
protocol: "tcp" | "http";
/**
* @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again
* @example 3
*/
retries: number;
/**
* @description Time in seconds after an attempt is considered a timeout
* @example 10
*/
timeout: number;
};
/**
* LoadBalancerServiceHTTP
* @description Configuration option for protocols http and https
*/
http?: {
/**
* @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`.
* @example [
* 897
* ]
*/
certificates?: number[];
/**
* @description Lifetime of the cookie used for sticky sessions (in seconds).
* @default 300
* @example 300
*/
cookie_lifetime?: number;
/**
* @description Name of the cookie used for sticky sessions.
* @default HCLBSTICKY
* @example HCLBSTICKY
*/
cookie_name?: string;
/**
* @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`.
* @default false
* @example true
*/
redirect_http?: boolean;
/**
* @description Use sticky sessions. Only available if `protocol` is `http` or `https`.
* @default false
* @example true
*/
sticky_sessions?: boolean;
};
/**
* @description Port the Load Balancer listens on
* @example 443
*/
listen_port: number;
/**
* @description Protocol of the Load Balancer
* @example https
* @enum {string}
*/
protocol: "tcp" | "http" | "https";
/**
* @description Is Proxyprotocol enabled or not
* @example false
*/
proxyprotocol: boolean;
})[];
/** @description List of targets that belong to this Load Balancer */
targets: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetIP
* @description IP targets where the traffic should be routed to. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only present for target type "ip".
*/
ip?: {
/**
* @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a Subnetwork type vswitch.
* @example 203.0.113.1
*/
ip: string;
};
/**
* LoadBalancerTargetLabelSelector
* @description Label selector used to determine targets. Only present for target type "label_selector".
*/
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/** @description List of resolved label selector target Servers. Only present for type "label_selector". */
targets?: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/**
* @description Type of the resource. Here always "server".
* @example server
*/
type?: string;
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
/**
* @description Type of the resource
* @enum {string}
*/
type: "server" | "label_selector" | "ip";
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
};
};
};
};
};
};
/**
* Update a Load Balancer
* @description Updates a Load Balancer. You can update a Load Balancers name and a Load Balancers labels.
*
* Note that when updating labels, the Load Balancers current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*
* Note: if the Load Balancer object changes during the request, the response will be a conflict error.
*/
put: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description New Load Balancer name
* @example new-name
*/
name?: string;
};
};
};
responses: {
/** @description The `load_balancer` key contains the updated Load Balancer */
200: {
content: {
"application/json": {
load_balancer: {
/** @description Algorithm of the Load Balancer */
algorithm: {
/**
* @description Type of the algorithm
* @enum {string}
*/
type: "round_robin" | "least_connections";
};
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* Format: int64
* @description Free Traffic for the current billing period in bytes
* @example 10000
*/
included_traffic: number;
/**
* Format: int64
* @description Inbound Traffic for the current billing period in bytes
*/
ingoing_traffic: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
load_balancer_type: {
/**
* @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Load Balancer type
* @example LB11
*/
description: string;
/**
* Format: int64
* @description ID of the Load Balancer type
* @example 1
*/
id: number;
/**
* Format: int64
* @description Number of SSL Certificates that can be assigned to a single Load Balancer
* @example 10
*/
max_assigned_certificates: number;
/**
* Format: int64
* @description Number of maximum simultaneous open connections
* @example 20000
*/
max_connections: number;
/**
* Format: int64
* @description Number of services a Load Balancer of this type can have
* @example 5
*/
max_services: number;
/**
* Format: int64
* @description Number of targets a single Load Balancer can have
* @example 25
*/
max_targets: number;
/**
* @description Unique identifier of the Load Balancer type
* @example lb11
*/
name: string;
/** @description Prices in different network zones */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Resource in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Resource in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
};
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* Format: int64
* @description Outbound Traffic for the current billing period in bytes
*/
outgoing_traffic: number | null;
/** @description Private networks information */
private_net: {
/**
* @description IP address (v4) of this Load Balancer in this Network
* @example 10.0.0.2
*/
ip?: string;
/**
* Format: int64
* @description ID of the Network
* @example 4711
*/
network?: number;
}[];
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/** @description Public network information */
public_net: {
/** @description Public Interface enabled or not */
enabled: boolean;
/** @description IP address (v4) */
ipv4: {
/**
* @description Reverse DNS PTR entry for the IPv4 address of this Load Balancer
* @example lb1.example.com
*/
dns_ptr?: string | null;
/**
* @description IP address (v4) of this Load Balancer
* @example 1.2.3.4
*/
ip?: string | null;
};
/** @description IP address (v6) */
ipv6: {
/**
* @description Reverse DNS PTR entry for the IPv6 address of this Load Balancer
* @example lb1.example.com
*/
dns_ptr?: string | null;
/**
* @description IP address (v6) of this Load Balancer
* @example 2001:db8::1
*/
ip?: string | null;
};
};
/** @description List of services that belong to this Load Balancer */
services: ({
/**
* @description Port the Load Balancer will balance to
* @example 80
*/
destination_port: number;
/**
* LoadBalancerServiceHealthCheck
* @description Service health check
*/
health_check: {
/** @description Additional configuration for protocol http */
http?: {
/**
* @description Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent.
* @example example.com
*/
domain: string | null;
/**
* @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead.
* @example /
*/
path: string;
/**
* @description String that must be contained in HTTP response in order to pass the health check
* @example {"status": "ok"}
*/
response?: string;
/**
* @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones.
* @default [
* "2??",
* "3??"
* ]
* @example [
* "2??",
* "3??"
* ]
*/
status_codes?: string[];
/**
* @description Use HTTPS for health check
* @example false
*/
tls?: boolean;
};
/**
* @description Time interval in seconds health checks are performed
* @example 15
*/
interval: number;
/**
* @description Port the health check will be performed on
* @example 4711
*/
port: number;
/**
* @description Type of the health check
* @example http
* @enum {string}
*/
protocol: "tcp" | "http";
/**
* @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again
* @example 3
*/
retries: number;
/**
* @description Time in seconds after an attempt is considered a timeout
* @example 10
*/
timeout: number;
};
/**
* LoadBalancerServiceHTTP
* @description Configuration option for protocols http and https
*/
http?: {
/**
* @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`.
* @example [
* 897
* ]
*/
certificates?: number[];
/**
* @description Lifetime of the cookie used for sticky sessions (in seconds).
* @default 300
* @example 300
*/
cookie_lifetime?: number;
/**
* @description Name of the cookie used for sticky sessions.
* @default HCLBSTICKY
* @example HCLBSTICKY
*/
cookie_name?: string;
/**
* @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`.
* @default false
* @example true
*/
redirect_http?: boolean;
/**
* @description Use sticky sessions. Only available if `protocol` is `http` or `https`.
* @default false
* @example true
*/
sticky_sessions?: boolean;
};
/**
* @description Port the Load Balancer listens on
* @example 443
*/
listen_port: number;
/**
* @description Protocol of the Load Balancer
* @example https
* @enum {string}
*/
protocol: "tcp" | "http" | "https";
/**
* @description Is Proxyprotocol enabled or not
* @example false
*/
proxyprotocol: boolean;
})[];
/** @description List of targets that belong to this Load Balancer */
targets: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetIP
* @description IP targets where the traffic should be routed to. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only present for target type "ip".
*/
ip?: {
/**
* @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a Subnetwork type vswitch.
* @example 203.0.113.1
*/
ip: string;
};
/**
* LoadBalancerTargetLabelSelector
* @description Label selector used to determine targets. Only present for target type "label_selector".
*/
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/** @description List of resolved label selector target Servers. Only present for type "label_selector". */
targets?: ({
/**
* LoadBalancerTargetHealthStatus
* @description List of health statuses of the services on this target. Only present for target types "server" and "ip".
*/
health_status?: ({
/** @example 443 */
listen_port?: number;
/**
* @example healthy
* @enum {string}
*/
status?: "healthy" | "unhealthy" | "unknown";
})[];
/**
* LoadBalancerTargetServer
* @description Server where the traffic should be routed to. Only present for target type "server".
*/
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/**
* @description Type of the resource. Here always "server".
* @example server
*/
type?: string;
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
/**
* @description Type of the resource
* @enum {string}
*/
type: "server" | "label_selector" | "ip";
/**
* LoadBalancerTargetUsePrivateIP
* @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector".
* @default false
*/
use_private_ip?: boolean;
})[];
};
};
};
};
};
};
/**
* Delete a Load Balancer
* @description Deletes a Load Balancer.
*/
delete: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
responses: {
/** @description Load Balancer deleted */
204: {
content: never;
};
};
};
};
"/load_balancers/{id}/actions": {
/**
* Get all Actions for a Load Balancer
* @description Returns all Action objects for a Load Balancer. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/add_service": {
/**
* Add Service
* @description Adds a service to a Load Balancer.
*
* #### Call specific error codes
*
* | Code | Description |
* |----------------------------|---------------------------------------------------------|
* | `source_port_already_used` | The source port you are trying to add is already in use |
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Port the Load Balancer will balance to
* @example 80
*/
destination_port: number;
/**
* LoadBalancerServiceHealthCheck
* @description Service health check
*/
health_check: {
/** @description Additional configuration for protocol http */
http?: {
/**
* @description Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent.
* @example example.com
*/
domain: string | null;
/**
* @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead.
* @example /
*/
path: string;
/**
* @description String that must be contained in HTTP response in order to pass the health check
* @example {"status": "ok"}
*/
response?: string;
/**
* @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones.
* @default [
* "2??",
* "3??"
* ]
* @example [
* "2??",
* "3??"
* ]
*/
status_codes?: string[];
/**
* @description Use HTTPS for health check
* @example false
*/
tls?: boolean;
};
/**
* @description Time interval in seconds health checks are performed
* @example 15
*/
interval: number;
/**
* @description Port the health check will be performed on
* @example 4711
*/
port: number;
/**
* @description Type of the health check
* @example http
* @enum {string}
*/
protocol: "tcp" | "http";
/**
* @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again
* @example 3
*/
retries: number;
/**
* @description Time in seconds after an attempt is considered a timeout
* @example 10
*/
timeout: number;
};
/**
* LoadBalancerServiceHTTP
* @description Configuration option for protocols http and https
*/
http?: {
/**
* @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`.
* @example [
* 897
* ]
*/
certificates?: number[];
/**
* @description Lifetime of the cookie used for sticky sessions (in seconds).
* @default 300
* @example 300
*/
cookie_lifetime?: number;
/**
* @description Name of the cookie used for sticky sessions.
* @default HCLBSTICKY
* @example HCLBSTICKY
*/
cookie_name?: string;
/**
* @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`.
* @default false
* @example true
*/
redirect_http?: boolean;
/**
* @description Use sticky sessions. Only available if `protocol` is `http` or `https`.
* @default false
* @example true
*/
sticky_sessions?: boolean;
};
/**
* @description Port the Load Balancer listens on
* @example 443
*/
listen_port: number;
/**
* @description Protocol of the Load Balancer
* @example https
* @enum {string}
*/
protocol: "tcp" | "http" | "https";
/**
* @description Is Proxyprotocol enabled or not
* @example false
*/
proxyprotocol: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `add_service` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/add_target": {
/**
* Add Target
* @description Adds a target to a Load Balancer.
*
* #### Call specific error codes
*
* | Code | Description |
* |-----------------------------------------|-------------------------------------------------------------------------------------------------------|
* | `cloud_resource_ip_not_allowed` | The IP you are trying to add as a target belongs to a Hetzner Cloud resource |
* | `ip_not_owned` | The IP you are trying to add as a target is not owned by the Project owner |
* | `load_balancer_not_attached_to_network` | The Load Balancer is not attached to a network |
* | `robot_unavailable` | Robot was not available. The caller may retry the operation after a short delay. |
* | `server_not_attached_to_network` | The server you are trying to add as a target is not attached to the same network as the Load Balancer |
* | `target_already_defined` | The Load Balancer target you are trying to define is already defined |
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* LoadBalancerTargetIP
* @description IP targets where the traffic should be routed to. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only present for target type "ip".
*/
ip?: {
/**
* @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a Subnetwork type vswitch.
* @example 203.0.113.1
*/
ip: string;
};
/** @description Configuration for label selector targets, required if type is `label_selector` */
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/** @description Configuration for type Server, required if type is `server` */
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/**
* @description Type of the resource
* @enum {string}
*/
type: "server" | "label_selector" | "ip";
/**
* @description Use the private network IP instead of the public IP of the Server, requires the Server and Load Balancer to be in the same network.
* @default false
* @example true
*/
use_private_ip?: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `add_target` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/attach_to_network": {
/**
* Attach a Load Balancer to a Network
* @description Attach a Load Balancer to a Network.
*
* **Call specific error codes**
*
* | Code | Description |
* |----------------------------------|-----------------------------------------------------------------------|
* | `load_balancer_already_attached` | The Load Balancer is already attached to a network |
* | `ip_not_available` | The provided Network IP is not available |
* | `no_subnet_available` | No Subnet or IP is available for the Load Balancer within the network |
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description IP to request to be assigned to this Load Balancer; if you do not provide this then you will be auto assigned an IP address
* @example 10.0.1.1
*/
ip?: string;
/**
* Format: int64
* @description ID of an existing network to attach the Load Balancer to
* @example 4711
*/
network: number;
};
};
};
responses: {
/** @description The `action` key contains the `attach_to_network` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/change_algorithm": {
/**
* Change Algorithm
* @description Change the algorithm that determines to which target new requests are sent.
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Algorithm of the Load Balancer
* @enum {string}
*/
type: "round_robin" | "least_connections";
};
};
};
responses: {
/** @description The `action` key contains the `change_algorithm` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/change_dns_ptr": {
/**
* Change reverse DNS entry for this Load Balancer
* @description Changes the hostname that will appear when getting the hostname belonging to the public IPs (IPv4 and IPv6) of this Load Balancer.
*
* Floating IPs assigned to the Server are not affected by this.
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
/** @description Select the IP address for which to change the DNS entry by passing `ip`. It can be either IPv4 or IPv6. The target hostname is set by passing `dns_ptr`. */
requestBody?: {
content: {
"application/json": {
/**
* @description Hostname to set as a reverse DNS PTR entry
* @example lb1.example.com
*/
dns_ptr: string | null;
/**
* @description Public IP address for which the reverse DNS entry should be set
* @example 1.2.3.4
*/
ip: string;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/change_protection": {
/**
* Change Load Balancer Protection
* @description Changes the protection configuration of a Load Balancer.
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description If true, prevents the Load Balancer from being deleted
* @example true
*/
delete?: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `change_protection` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/change_type": {
/**
* Change the Type of a Load Balancer
* @description Changes the type (Max Services, Max Targets and Max Connections) of a Load Balancer.
*
* **Call specific error codes**
*
* | Code | Description |
* |------------------------------|-----------------------------------------------------------------|
* | `invalid_load_balancer_type` | The Load Balancer type does not fit for the given Load Balancer |
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description ID or name of Load Balancer type the Load Balancer should migrate to
* @example lb21
*/
load_balancer_type: string;
};
};
};
responses: {
/** @description The `action` key contains the `change_load_balancer_type` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/delete_service": {
/**
* Delete Service
* @description Delete a service of a Load Balancer.
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* Format: int64
* @description The listen port of the service you want to delete
* @example 4711
*/
listen_port: number;
};
};
};
responses: {
/** @description The `action` key contains the `delete_service` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/detach_from_network": {
/**
* Detach a Load Balancer from a Network
* @description Detaches a Load Balancer from a network.
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* Format: int64
* @description ID of an existing network to detach the Load Balancer from
* @example 4711
*/
network: number;
};
};
};
responses: {
/** @description The `action` key contains the `detach_from_network` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/disable_public_interface": {
/**
* Disable the public interface of a Load Balancer
* @description Disable the public interface of a Load Balancer. The Load Balancer will be not accessible from the internet via its public IPs.
*
* #### Call specific error codes
*
* | Code | Description |
* |-------------------------------------------|--------------------------------------------------------------------------------|
* | `load_balancer_not_attached_to_network` | The Load Balancer is not attached to a network |
* | `targets_without_use_private_ip` | The Load Balancer has targets that use the public IP instead of the private IP |
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
responses: {
/** @description The `action` key contains the `disable_public_interface` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/enable_public_interface": {
/**
* Enable the public interface of a Load Balancer
* @description Enable the public interface of a Load Balancer. The Load Balancer will be accessible from the internet via its public IPs.
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
responses: {
/** @description The `action` key contains the `enable_public_interface` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/remove_target": {
/**
* Remove Target
* @description Removes a target from a Load Balancer.
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* LoadBalancerTargetIP
* @description IP targets where the traffic should be routed to. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only present for target type "ip".
*/
ip?: {
/**
* @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a Subnetwork type vswitch.
* @example 203.0.113.1
*/
ip: string;
};
/** @description Configuration for label selector targets, required if type is `label_selector` */
label_selector?: {
/**
* @description Label selector
* @example env=prod
*/
selector: string;
};
/** @description Configuration for type Server, required if type is `server` */
server?: {
/**
* Format: int64
* @description ID of the Server
* @example 80
*/
id: number;
};
/**
* @description Type of the resource
* @enum {string}
*/
type: "server" | "label_selector" | "ip";
};
};
};
responses: {
/** @description The `action` key contains the `remove_target` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/update_service": {
/**
* Update Service
* @description Updates a Load Balancer Service.
*
* #### Call specific error codes
*
* | Code | Description |
* |----------------------------|---------------------------------------------------------|
* | `source_port_already_used` | The source port you are trying to add is already in use |
*/
post: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Port the Load Balancer will balance to
* @example 80
*/
destination_port?: number;
/**
* UpdateLoadBalancerServiceHealthCheck
* @description Service health check
*/
health_check?: {
/** @description Additional configuration for protocol http */
http?: {
/**
* @description Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent.
* @example example.com
*/
domain?: string | null;
/**
* @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead.
* @example /
*/
path?: string;
/**
* @description String that must be contained in HTTP response in order to pass the health check
* @example {"status": "ok"}
*/
response?: string;
/**
* @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones.
* @default [
* "2??",
* "3??"
* ]
* @example [
* "2??",
* "3??"
* ]
*/
status_codes?: string[];
/**
* @description Use HTTPS for health check
* @example false
*/
tls?: boolean;
};
/**
* @description Time interval in seconds health checks are performed
* @example 15
*/
interval?: number;
/**
* @description Port the health check will be performed on
* @example 4711
*/
port?: number;
/**
* @description Type of the health check
* @example http
* @enum {string}
*/
protocol?: "tcp" | "http";
/**
* @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again
* @example 3
*/
retries?: number;
/**
* @description Time in seconds after an attempt is considered a timeout
* @example 10
*/
timeout?: number;
};
/**
* LoadBalancerServiceHTTP
* @description Configuration option for protocols http and https
*/
http?: {
/**
* @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is "http"
* @example [
* 897
* ]
*/
certificates?: number[];
/**
* @description Lifetime of the cookie used for sticky sessions (in seconds)
* @example 300
*/
cookie_lifetime?: number;
/**
* @description Name of the cookie used for sticky sessions
* @example HCLBSTICKY
*/
cookie_name?: string;
/**
* @description Redirect HTTP requests to HTTPS. Only available if protocol is "https".
* @default false
* @example true
*/
redirect_http?: boolean;
/**
* @description Use sticky sessions. Only available if protocol is "http" or "https".
* @default false
* @example true
*/
sticky_sessions?: boolean;
};
/**
* @description Port the Load Balancer listens on
* @example 443
*/
listen_port: number;
/**
* @description Protocol of the Load Balancer
* @example https
* @enum {string}
*/
protocol?: "tcp" | "http" | "https";
/**
* @description Is Proxyprotocol enabled or not
* @example false
*/
proxyprotocol?: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `update_service` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/actions/{action_id}": {
/**
* Get an Action for a Load Balancer
* @description Returns a specific Action for a Load Balancer.
*/
get: {
parameters: {
path: {
/** @description ID of the Load Balancer */
id: number;
/** @description ID of the Action */
action_id: number;
};
};
responses: {
/** @description The `action` key contains the Load Balancer Action */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/load_balancers/{id}/metrics": {
/**
* Get Metrics for a LoadBalancer
* @description You must specify the type of metric to get: `open_connections`, `connections_per_second`, `requests_per_second` or `bandwidth`. You can also specify more than one type by comma separation, e.g. `requests_per_second,bandwidth`.
*
* Depending on the type you will get different time series data:
*
* |Type | Timeseries | Unit | Description |
* |---- |------------|------|-------------|
* | open_connections | open_connections | number | Open connections |
* | connections_per_second | connections_per_second | connections/s | Connections per second |
* | requests_per_second | requests_per_second | requests/s | Requests per second |
* | bandwidth | bandwidth.in | bytes/s | Ingress bandwidth |
* || bandwidth.out | bytes/s | Egress bandwidth |
*
* Metrics are available for the last 30 days only.
*
* If you do not provide the step argument we will automatically adjust it so that 200 samples are returned.
*
* We limit the number of samples to a maximum of 500 and will adjust the step parameter accordingly.
*/
get: {
parameters: {
query: {
/** @description Type of metrics to get */
type: "open_connections" | "connections_per_second" | "requests_per_second" | "bandwidth";
/** @description Start of period to get Metrics for (in ISO-8601 format) */
start: string;
/** @description End of period to get Metrics for (in ISO-8601 format) */
end: string;
/** @description Resolution of results in seconds */
step?: string;
};
path: {
/** @description ID of the Load Balancer */
id: number;
};
};
responses: {
/** @description The `metrics` key in the reply contains a metrics object with this structure */
200: {
content: {
"application/json": {
metrics: {
/**
* @description End of period of metrics reported (in ISO-8601 format)
* @example 2017-01-01T23:00:00+00:00
*/
end: string;
/**
* @description Start of period of metrics reported (in ISO-8601 format)
* @example 2017-01-01T00:00:00+00:00
*/
start: string;
/**
* @description Resolution of results in seconds.
* @example 60
*/
step: number;
/**
* @description Hash with timeseries information, containing the name of timeseries as key
* @example {
* "name_of_timeseries": {
* "values": [
* [
* 1435781470.622,
* "42"
* ],
* [
* 1435781471.622,
* "43"
* ]
* ]
* }
* }
*/
time_series: {
[key: string]: {
/** @description Metrics Timestamps with values */
values: ((number | string)[])[];
};
};
};
};
};
};
};
};
};
"/locations": {
/**
* Get all Locations
* @description Returns all Location objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter Locations by their name. The response will only contain the Location matching the specified name. */
name?: string;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `locations` key in the reply contains an array of Location objects with this structure */
200: {
content: {
"application/json": {
locations: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
}[];
meta: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/locations/{id}": {
/**
* Get a Location
* @description Returns a specific Location object.
*/
get: {
parameters: {
path: {
/** @description ID of Location */
id: number;
};
};
responses: {
/** @description The `location` key in the reply contains a Location object with this structure */
200: {
content: {
"application/json": {
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
};
};
};
};
};
};
"/networks": {
/**
* Get all Networks
* @description Gets all existing networks that you have available.
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter networks by their name. The response will only contain the networks matching the specified name. */
name?: string;
/** @description Can be used to filter networks by labels. The response will only contain networks with a matching label selector pattern. */
label_selector?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `networks` key contains a list of networks */
200: {
content: {
"application/json": {
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
networks: ({
/**
* @description Point in time when the Network was created (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
created: string;
/**
* @description Indicates if the routes from this network should be exposed to the vSwitch connection.
* @example false
*/
expose_routes_to_vswitch: boolean;
/**
* Format: int64
* @description ID of the Network
* @example 4711
*/
id: number;
/**
* @description IPv4 prefix of the whole Network
* @example 10.0.0.0/16
*/
ip_range: string;
/** @description User-defined labels (key-value pairs) */
labels: Record<string, never>;
/**
* @description Array of IDs of Load Balancers attached to this Network
* @example [
* 42
* ]
*/
load_balancers?: number[];
/**
* @description Name of the Network
* @example mynet
*/
name: string;
/** @description Protection configuration for the Network */
protection: {
/**
* @description If true, prevents the Network from being deleted
* @example false
*/
delete: boolean;
};
/** @description Array of routes set in this Network */
routes: {
/**
* @description Destination network or host of this route. Must not overlap with an existing ip_range in any subnets or with any destinations in other routes or with the first IP of the networks ip_range or with 172.31.1.1. Must be one of the private IPv4 ranges of RFC1918.
* @example 10.100.1.0/24
*/
destination: string;
/**
* @description Gateway for the route. Cannot be the first IP of the networks ip_range and also cannot be 172.31.1.1 as this IP is being used as a gateway for the public network interface of Servers.
* @example 10.0.1.1
*/
gateway: string;
}[];
/**
* @description Array of IDs of Servers attached to this Network
* @example [
* 42
* ]
*/
servers: number[];
/** @description Array subnets allocated in this Network */
subnets: ({
/**
* @description Gateway for Servers attached to this subnet. For subnets of type Server this is always the first IP of the network IP range.
* @example 10.0.0.1
*/
gateway: string;
/**
* @description Range to allocate IPs from. Must be a Subnet of the ip_range of the parent network object and must not overlap with any other subnets or with any destinations in routes. Minimum Network size is /30. We suggest that you pick a bigger Network with a /24 netmask.
* @example 10.0.1.0/24
*/
ip_range?: string;
/**
* @description Name of Network zone. The Location object contains the `network_zone` property each Location belongs to.
* @example eu-central
*/
network_zone: string;
/**
* @description Type of Subnetwork
* @enum {string}
*/
type: "cloud" | "server" | "vswitch";
/**
* Format: int64
* @description ID of the robot vSwitch if the subnet is of type vswitch.
* @example 1000
*/
vswitch_id?: number | null;
})[];
})[];
};
};
};
};
};
/**
* Create a Network
* @description Creates a network with the specified `ip_range`.
*
* You may specify one or more `subnets`. You can also add more Subnets later by using the [add subnet action](https://docs.hetzner.cloud/#network-actions-add-a-subnet-to-a-network). If you do not specify an `ip_range` in the subnet we will automatically pick the first available /24 range for you.
*
* You may specify one or more routes in `routes`. You can also add more routes later by using the [add route action](https://docs.hetzner.cloud/#network-actions-add-a-route-to-a-network).
*/
post: {
requestBody?: {
content: {
"application/json": {
/**
* @description Indicates if the routes from this network should be exposed to the vSwitch connection. The exposing only takes effect if a vSwitch connection is active.
* @example false
*/
expose_routes_to_vswitch?: boolean;
/**
* @description IP range of the whole network which must span all included subnets. Must be one of the private IPv4 ranges of RFC1918. Minimum network size is /24. We highly recommend that you pick a larger network with a /16 netmask.
* @example 10.0.0.0/16
*/
ip_range: string;
/** @description User-defined labels (key-value pairs) */
labels?: {
/**
* @description New label
* @example value
*/
labelkey?: string;
};
/**
* @description Name of the network
* @example mynet
*/
name: string;
/** @description Array of routes set in this network. The destination of the route must be one of the private IPv4 ranges of RFC1918. The gateway must be a subnet/IP of the ip_range of the network object. The destination must not overlap with an existing ip_range in any subnets or with any destinations in other routes or with the first IP of the networks ip_range or with 172.31.1.1. The gateway cannot be the first IP of the networks ip_range and also cannot be 172.31.1.1. */
routes?: {
/**
* @description Destination network or host of this route. Must not overlap with an existing ip_range in any subnets or with any destinations in other routes or with the first IP of the networks ip_range or with 172.31.1.1. Must be one of the private IPv4 ranges of RFC1918.
* @example 10.100.1.0/24
*/
destination: string;
/**
* @description Gateway for the route. Cannot be the first IP of the networks ip_range and also cannot be 172.31.1.1 as this IP is being used as a gateway for the public network interface of Servers.
* @example 10.0.1.1
*/
gateway: string;
}[];
/** @description Array of subnets allocated. */
subnets?: ({
/**
* @description Range to allocate IPs from. Must be a Subnet of the ip_range of the parent network object and must not overlap with any other subnets or with any destinations in routes. Minimum Network size is /30. We suggest that you pick a bigger Network with a /24 netmask.
* @example 10.0.1.0/24
*/
ip_range?: string;
/**
* @description Name of Network zone. The Location object contains the `network_zone` property each Location belongs to.
* @example eu-central
*/
network_zone: string;
/**
* @description Type of Subnetwork
* @enum {string}
*/
type: "cloud" | "server" | "vswitch";
/**
* Format: int64
* @description ID of the robot vSwitch. Must be supplied if the subnet is of type vswitch.
* @example 1000
*/
vswitch_id?: number;
})[];
};
};
};
responses: {
/** @description The `network` key contains the network that was just created */
201: {
content: {
"application/json": {
network?: {
/**
* @description Point in time when the Network was created (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
created: string;
/**
* @description Indicates if the routes from this network should be exposed to the vSwitch connection.
* @example false
*/
expose_routes_to_vswitch: boolean;
/**
* Format: int64
* @description ID of the Network
* @example 4711
*/
id: number;
/**
* @description IPv4 prefix of the whole Network
* @example 10.0.0.0/16
*/
ip_range: string;
/** @description User-defined labels (key-value pairs) */
labels: Record<string, never>;
/**
* @description Array of IDs of Load Balancers attached to this Network
* @example [
* 42
* ]
*/
load_balancers?: number[];
/**
* @description Name of the Network
* @example mynet
*/
name: string;
/** @description Protection configuration for the Network */
protection: {
/**
* @description If true, prevents the Network from being deleted
* @example false
*/
delete: boolean;
};
/** @description Array of routes set in this Network */
routes: {
/**
* @description Destination network or host of this route. Must not overlap with an existing ip_range in any subnets or with any destinations in other routes or with the first IP of the networks ip_range or with 172.31.1.1. Must be one of the private IPv4 ranges of RFC1918.
* @example 10.100.1.0/24
*/
destination: string;
/**
* @description Gateway for the route. Cannot be the first IP of the networks ip_range and also cannot be 172.31.1.1 as this IP is being used as a gateway for the public network interface of Servers.
* @example 10.0.1.1
*/
gateway: string;
}[];
/**
* @description Array of IDs of Servers attached to this Network
* @example [
* 42
* ]
*/
servers: number[];
/** @description Array subnets allocated in this Network */
subnets: ({
/**
* @description Gateway for Servers attached to this subnet. For subnets of type Server this is always the first IP of the network IP range.
* @example 10.0.0.1
*/
gateway: string;
/**
* @description Range to allocate IPs from. Must be a Subnet of the ip_range of the parent network object and must not overlap with any other subnets or with any destinations in routes. Minimum Network size is /30. We suggest that you pick a bigger Network with a /24 netmask.
* @example 10.0.1.0/24
*/
ip_range?: string;
/**
* @description Name of Network zone. The Location object contains the `network_zone` property each Location belongs to.
* @example eu-central
*/
network_zone: string;
/**
* @description Type of Subnetwork
* @enum {string}
*/
type: "cloud" | "server" | "vswitch";
/**
* Format: int64
* @description ID of the robot vSwitch if the subnet is of type vswitch.
* @example 1000
*/
vswitch_id?: number | null;
})[];
};
};
};
};
};
};
};
"/networks/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/networks/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Resource */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/networks/{id}": {
/**
* Get a Network
* @description Gets a specific network object.
*/
get: {
parameters: {
path: {
/** @description ID of the network */
id: number;
};
};
responses: {
/** @description The `network` key contains the network */
200: {
content: {
"application/json": {
network?: {
/**
* @description Point in time when the Network was created (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
created: string;
/**
* @description Indicates if the routes from this network should be exposed to the vSwitch connection.
* @example false
*/
expose_routes_to_vswitch: boolean;
/**
* Format: int64
* @description ID of the Network
* @example 4711
*/
id: number;
/**
* @description IPv4 prefix of the whole Network
* @example 10.0.0.0/16
*/
ip_range: string;
/** @description User-defined labels (key-value pairs) */
labels: Record<string, never>;
/**
* @description Array of IDs of Load Balancers attached to this Network
* @example [
* 42
* ]
*/
load_balancers?: number[];
/**
* @description Name of the Network
* @example mynet
*/
name: string;
/** @description Protection configuration for the Network */
protection: {
/**
* @description If true, prevents the Network from being deleted
* @example false
*/
delete: boolean;
};
/** @description Array of routes set in this Network */
routes: {
/**
* @description Destination network or host of this route. Must not overlap with an existing ip_range in any subnets or with any destinations in other routes or with the first IP of the networks ip_range or with 172.31.1.1. Must be one of the private IPv4 ranges of RFC1918.
* @example 10.100.1.0/24
*/
destination: string;
/**
* @description Gateway for the route. Cannot be the first IP of the networks ip_range and also cannot be 172.31.1.1 as this IP is being used as a gateway for the public network interface of Servers.
* @example 10.0.1.1
*/
gateway: string;
}[];
/**
* @description Array of IDs of Servers attached to this Network
* @example [
* 42
* ]
*/
servers: number[];
/** @description Array subnets allocated in this Network */
subnets: ({
/**
* @description Gateway for Servers attached to this subnet. For subnets of type Server this is always the first IP of the network IP range.
* @example 10.0.0.1
*/
gateway: string;
/**
* @description Range to allocate IPs from. Must be a Subnet of the ip_range of the parent network object and must not overlap with any other subnets or with any destinations in routes. Minimum Network size is /30. We suggest that you pick a bigger Network with a /24 netmask.
* @example 10.0.1.0/24
*/
ip_range?: string;
/**
* @description Name of Network zone. The Location object contains the `network_zone` property each Location belongs to.
* @example eu-central
*/
network_zone: string;
/**
* @description Type of Subnetwork
* @enum {string}
*/
type: "cloud" | "server" | "vswitch";
/**
* Format: int64
* @description ID of the robot vSwitch if the subnet is of type vswitch.
* @example 1000
*/
vswitch_id?: number | null;
})[];
};
};
};
};
};
};
/**
* Update a Network
* @description Updates the network properties.
*
* Note that when updating labels, the networks current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*
* Note: if the network object changes during the request, the response will be a conflict error.
*/
put: {
parameters: {
path: {
/** @description ID of the network */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Indicates if the routes from this network should be exposed to the vSwitch connection. The exposing only takes effect if a vSwitch connection is active.
* @example false
*/
expose_routes_to_vswitch?: boolean;
/** @description User-defined labels (key-value pairs) */
labels?: {
/** @example value */
labelkey?: string;
};
/**
* @description New network name
* @example new-name
*/
name?: string;
};
};
};
responses: {
/** @description The `network` key contains the updated network */
200: {
content: {
"application/json": {
network?: {
/**
* @description Point in time when the Network was created (in ISO-8601 format)
* @example 2016-01-30T23:50:00+00:00
*/
created: string;
/**
* @description Indicates if the routes from this network should be exposed to the vSwitch connection.
* @example false
*/
expose_routes_to_vswitch: boolean;
/**
* Format: int64
* @description ID of the Network
* @example 4711
*/
id: number;
/**
* @description IPv4 prefix of the whole Network
* @example 10.0.0.0/16
*/
ip_range: string;
/** @description User-defined labels (key-value pairs) */
labels: Record<string, never>;
/**
* @description Array of IDs of Load Balancers attached to this Network
* @example [
* 42
* ]
*/
load_balancers?: number[];
/**
* @description Name of the Network
* @example mynet
*/
name: string;
/** @description Protection configuration for the Network */
protection: {
/**
* @description If true, prevents the Network from being deleted
* @example false
*/
delete: boolean;
};
/** @description Array of routes set in this Network */
routes: {
/**
* @description Destination network or host of this route. Must not overlap with an existing ip_range in any subnets or with any destinations in other routes or with the first IP of the networks ip_range or with 172.31.1.1. Must be one of the private IPv4 ranges of RFC1918.
* @example 10.100.1.0/24
*/
destination: string;
/**
* @description Gateway for the route. Cannot be the first IP of the networks ip_range and also cannot be 172.31.1.1 as this IP is being used as a gateway for the public network interface of Servers.
* @example 10.0.1.1
*/
gateway: string;
}[];
/**
* @description Array of IDs of Servers attached to this Network
* @example [
* 42
* ]
*/
servers: number[];
/** @description Array subnets allocated in this Network */
subnets: ({
/**
* @description Gateway for Servers attached to this subnet. For subnets of type Server this is always the first IP of the network IP range.
* @example 10.0.0.1
*/
gateway: string;
/**
* @description Range to allocate IPs from. Must be a Subnet of the ip_range of the parent network object and must not overlap with any other subnets or with any destinations in routes. Minimum Network size is /30. We suggest that you pick a bigger Network with a /24 netmask.
* @example 10.0.1.0/24
*/
ip_range?: string;
/**
* @description Name of Network zone. The Location object contains the `network_zone` property each Location belongs to.
* @example eu-central
*/
network_zone: string;
/**
* @description Type of Subnetwork
* @enum {string}
*/
type: "cloud" | "server" | "vswitch";
/**
* Format: int64
* @description ID of the robot vSwitch if the subnet is of type vswitch.
* @example 1000
*/
vswitch_id?: number | null;
})[];
};
};
};
};
};
};
/**
* Delete a Network
* @description Deletes a network. If there are Servers attached they will be detached in the background.
*
* Note: if the network object changes during the request, the response will be a conflict error.
*/
delete: {
parameters: {
path: {
/** @description ID of the network */
id: number;
};
};
responses: {
/** @description Network deleted */
204: {
content: never;
};
};
};
};
"/networks/{id}/actions": {
/**
* Get all Actions for a Network
* @description Returns all Action objects for a Network. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
path: {
/** @description ID of the Network */
id: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/networks/{id}/actions/add_route": {
/**
* Add a route to a Network
* @description Adds a route entry to a Network.
*
* Note: if the Network object changes during the request, the response will be a conflict error.
*/
post: {
parameters: {
path: {
/** @description ID of the Network */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Destination network or host of this route. Must not overlap with an existing ip_range in any subnets or with any destinations in other routes or with the first IP of the networks ip_range or with 172.31.1.1. Must be one of the private IPv4 ranges of RFC1918.
* @example 10.100.1.0/24
*/
destination: string;
/**
* @description Gateway for the route. Cannot be the first IP of the networks ip_range, an IP behind a vSwitch or 172.31.1.1, as this IP is being used as a gateway for the public network interface of Servers.
* @example 10.0.1.1
*/
gateway: string;
};
};
};
responses: {
/** @description The `action` key contains the `add_route` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/networks/{id}/actions/add_subnet": {
/**
* Add a subnet to a Network
* @description Adds a new subnet object to the Network. If you do not specify an `ip_range` for the subnet we will automatically pick the first available /24 range for you if possible.
*
* Note: if the parent Network object changes during the request, the response will be a conflict error.
*/
post: {
parameters: {
path: {
/** @description ID of the Network */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Range to allocate IPs from. Must be a Subnet of the ip_range of the parent network object and must not overlap with any other subnets or with any destinations in routes. If the Subnet is of type vSwitch, it also can not overlap with any gateway in routes. Minimum Network size is /30. We suggest that you pick a bigger Network with a /24 netmask.
* @example 10.0.1.0/24
*/
ip_range?: string;
/**
* @description Name of Network zone. The Location object contains the `network_zone` property each Location belongs to.
* @example eu-central
*/
network_zone: string;
/**
* @description Type of Subnetwork
* @enum {string}
*/
type: "cloud" | "server" | "vswitch";
/**
* Format: int64
* @description ID of the robot vSwitch. Must be supplied if the subnet is of type vswitch.
* @example 1000
*/
vswitch_id?: number;
};
};
};
responses: {
/** @description The `action` key contains the `add_subnet` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/networks/{id}/actions/change_ip_range": {
/**
* Change IP range of a Network
* @description Changes the IP range of a Network. IP ranges can only be extended and never shrunk. You can only add IPs at the end of an existing IP range. This means that the IP part of your existing range must stay the same and you can only change its netmask.
*
* For example if you have a range `10.0.0.0/16` you want to extend then your new range must also start with the IP `10.0.0.0`. Your CIDR netmask `/16` may change to a number that is smaller than `16` thereby increasing the IP range. So valid entries would be `10.0.0.0/15`, `10.0.0.0/14`, `10.0.0.0/13` and so on.
*
* After changing the IP range you will have to adjust the routes on your connected Servers by either rebooting them or manually changing the routes to your private Network interface.
*
* Note: if the Network object changes during the request, the response will be a conflict error.
*/
post: {
parameters: {
path: {
/** @description ID of the Network */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description The new prefix for the whole Network
* @example 10.0.0.0/12
*/
ip_range: string;
};
};
};
responses: {
/** @description The `action` key contains the `change_ip_range` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/networks/{id}/actions/change_protection": {
/**
* Change Network Protection
* @description Changes the protection configuration of a Network.
*
* Note: if the Network object changes during the request, the response will be a conflict error.
*/
post: {
parameters: {
path: {
/** @description ID of the Network */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description If true, prevents the Network from being deleted
* @example true
*/
delete?: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `change_protection` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/networks/{id}/actions/delete_route": {
/**
* Delete a route from a Network
* @description Delete a route entry from a Network.
*
* Note: if the Network object changes during the request, the response will be a conflict error.
*/
post: {
parameters: {
path: {
/** @description ID of the Network */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Destination network or host of this route. Must not overlap with an existing ip_range in any subnets or with any destinations in other routes or with the first IP of the networks ip_range or with 172.31.1.1. Must be one of the private IPv4 ranges of RFC1918.
* @example 10.100.1.0/24
*/
destination: string;
/**
* @description Gateway for the route. Cannot be the first IP of the networks ip_range, an IP behind a vSwitch or 172.31.1.1, as this IP is being used as a gateway for the public network interface of Servers.
* @example 10.0.1.1
*/
gateway: string;
};
};
};
responses: {
/** @description The `action` key contains the `delete_route` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/networks/{id}/actions/delete_subnet": {
/**
* Delete a subnet from a Network
* @description Deletes a single subnet entry from a Network. You cannot delete subnets which still have Servers attached. If you have Servers attached you first need to detach all Servers that use IPs from this subnet before you can delete the subnet.
*
* Note: if the Network object changes during the request, the response will be a conflict error.
*/
post: {
parameters: {
path: {
/** @description ID of the Network */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description IP range of subnet to delete
* @example 10.0.1.0/24
*/
ip_range: string;
};
};
};
responses: {
/** @description The `action` key contains the `delete_subnet` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/networks/{id}/actions/{action_id}": {
/**
* Get an Action for a Network
* @description Returns a specific Action for a Network.
*/
get: {
parameters: {
path: {
/** @description ID of the Network */
id: number;
/** @description ID of the Action */
action_id: number;
};
};
responses: {
/** @description The `action` key contains the Network Action */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/placement_groups": {
/**
* Get all PlacementGroups
* @description Returns all PlacementGroup objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/** @description Can be used multiple times. The response will only contain PlacementGroups matching the type. */
type?: "spread";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `placement_groups` key contains an array of PlacementGroup objects */
200: {
content: {
"application/json": {
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
placement_groups: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Array of IDs of Servers that are part of this Placement Group
* @example [
* 42
* ]
*/
servers: number[];
/**
* @description Type of the Placement Group
* @example spread
* @enum {string}
*/
type: "spread";
}[];
};
};
};
};
};
/**
* Create a PlacementGroup
* @description Creates a new PlacementGroup.
*/
post: {
requestBody?: {
content: {
"application/json": {
/** @description User-defined labels (key-value pairs) */
labels?: Record<string, never>;
/**
* @description Name of the PlacementGroup
* @example my Placement Group
*/
name: string;
/**
* @description Define the Placement Group Type.
* @example spread
* @enum {string}
*/
type: "spread";
};
};
};
responses: {
/** @description The `PlacementGroup` key contains the PlacementGroup that was just created. */
201: {
content: {
"application/json": {
/** NullableAction */
action?: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
}) | null;
/** PlacementGroup */
placement_group: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Array of IDs of Servers that are part of this Placement Group
* @example [
* 42
* ]
*/
servers: number[];
/**
* @description Type of the Placement Group
* @example spread
* @enum {string}
*/
type: "spread";
};
};
};
};
};
};
};
"/placement_groups/{id}": {
/**
* Get a PlacementGroup
* @description Gets a specific PlacementGroup object.
*/
get: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
responses: {
/** @description The `placement_group` key contains a PlacementGroup object */
200: {
content: {
"application/json": {
/** PlacementGroup */
placement_group: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Array of IDs of Servers that are part of this Placement Group
* @example [
* 42
* ]
*/
servers: number[];
/**
* @description Type of the Placement Group
* @example spread
* @enum {string}
*/
type: "spread";
};
};
};
};
};
};
/**
* Update a PlacementGroup
* @description Updates the PlacementGroup properties.
*
* Note that when updating labels, the PlacementGroups current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*
* Note: if the PlacementGroup object changes during the request, the response will be a conflict error.
*/
put: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description New PlacementGroup name
* @example my Placement Group
*/
name?: string;
};
};
};
responses: {
/** @description The `certificate` key contains the PlacementGroup that was just updated */
200: {
content: {
"application/json": {
/** PlacementGroup */
placement_group: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Array of IDs of Servers that are part of this Placement Group
* @example [
* 42
* ]
*/
servers: number[];
/**
* @description Type of the Placement Group
* @example spread
* @enum {string}
*/
type: "spread";
};
};
};
};
};
};
/**
* Delete a PlacementGroup
* @description Deletes a PlacementGroup.
*/
delete: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
responses: {
/** @description PlacementGroup deleted */
204: {
content: never;
};
};
};
};
"/pricing": {
/**
* Get all prices
* @description Returns prices for all resources available on the platform. VAT and currency of the Project owner are used for calculations.
*
* Both net and gross prices are included in the response.
*/
get: {
responses: {
/** @description The `pricing` key in the reply contains an pricing object with this structure */
200: {
content: {
"application/json": {
pricing: {
/**
* @description Currency the returned prices are expressed in, coded according to ISO 4217
* @example EUR
*/
currency: string;
/** @description The cost of one Floating IP per month */
floating_ip: {
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
};
/** @description Costs of Floating IPs types per Location and type */
floating_ips: ({
/** @description Floating IP type costs per Location */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Monthly costs for a Floating IP type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
/**
* @description The type of the Floating IP
* @example ipv4
* @enum {string}
*/
type: "ipv4" | "ipv6";
})[];
/** @description The cost of Image per GB/month */
image: {
price_per_gb_month: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
};
/** @description Costs of Load Balancer types per Location and type */
load_balancer_types: {
/**
* Format: int64
* @description ID of the Load Balancer type the price is for
* @example 1
*/
id: number;
/**
* @description Name of the Load Balancer type the price is for
* @example lb11
*/
name: string;
/** @description Load Balancer type costs per Location */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Load Balancer type in this network zone */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Load Balancer type in this network zone */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
}[];
/** @description Costs of Primary IPs types per Location */
primary_ips: ({
/** @description Primary IP type costs per Location */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Primary IP type in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Primary IP type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
/**
* @description The type of the Primary IP
* @example ipv4
* @enum {string}
*/
type: "ipv4" | "ipv6";
})[];
/** @description Will increase base Server costs by specific percentage */
server_backup: {
/**
* Format: decimal
* @description Percentage by how much the base price will increase
* @example 20.0000000000
*/
percentage: string;
};
/** @description Costs of Server types per Location and type */
server_types: {
/**
* Format: int64
* @description ID of the Server type the price is for
* @example 4
*/
id: number;
/**
* @description Name of the Server type the price is for
* @example cx11
*/
name: string;
/** @description Server type costs per Location */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Server type in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Server type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
}[];
/** @description The cost of additional traffic per TB */
traffic: {
price_per_tb: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
};
/**
* Format: decimal
* @description The VAT rate used for calculating prices with VAT
* @example 19.000000
*/
vat_rate: string;
/** @description The cost of Volume per GB/month */
volume: {
price_per_gb_month: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
};
};
};
};
};
};
};
};
"/primary_ips": {
/**
* Get all Primary IPs
* @description Returns all Primary IP objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/**
* @description Can be used to filter resources by their ip. The response will only contain the resources matching the specified ip.
* @example 127.0.0.1
*/
ip?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
/** @description Can be used multiple times. Choices id id:asc id:desc created created:asc created:desc */
sort?: "id" | "id:asc" | "id:desc" | "created" | "created:asc" | "created:desc";
};
};
responses: {
/** @description The `primary_ips` key contains an array of Primary IP objects */
200: {
content: {
"application/json": {
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
primary_ips: ({
/**
* Format: int64
* @description ID of the resource the Primary IP is assigned to, null if it is not assigned at all
* @example 17
*/
assignee_id: number | null;
/**
* @description Resource type the Primary IP can be assigned to
* @enum {string}
*/
assignee_type: "server";
/**
* @description Delete this Primary IP when the resource it is assigned to is deleted
* @example true
*/
auto_delete: boolean;
/**
* @description Whether the IP is blocked
* @example false
*/
blocked: boolean;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Datacenter this Primary IP is located at */
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
/** @description Array of reverse DNS entries */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv4 or IPv6 address
* @example 131.232.99.1
*/
ip: string;
}[];
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description IP address
* @example 131.232.99.1
*/
ip: string;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Type of the Primary IP
* @enum {string}
*/
type: "ipv4" | "ipv6";
})[];
};
};
};
};
};
/**
* Create a Primary IP
* @description Creates a new Primary IP, optionally assigned to a Server.
*
* If you want to create a Primary IP that is not assigned to a Server, you need to provide the `datacenter` key instead of `assignee_id`. This can be either the ID or the name of the Datacenter this Primary IP shall be created in.
*
* Note that a Primary IP can only be assigned to a Server in the same Datacenter later on.
*
* #### Call specific error codes
*
* | Code | Description |
* |------------------------------ |-------------------------------------------------------------- |
* | `server_not_stopped` | The specified server is running, but needs to be powered off |
* | `server_has_ipv4` | The server already has an ipv4 address |
* | `server_has_ipv6` | The server already has an ipv6 address |
*/
post: {
/** @description The `type` argument is required while `datacenter` and `assignee_id` are mutually exclusive. */
requestBody?: {
content: {
"application/json": {
/**
* Format: int64
* @description ID of the resource the Primary IP should be assigned to. Omitted if it should not be assigned.
* @example 17
*/
assignee_id?: number;
/**
* @description Resource type the Primary IP can be assigned to
* @example server
* @enum {string}
*/
assignee_type: "server";
/**
* @description Delete the Primary IP when the Server it is assigned to is deleted.
* @default false
* @example false
*/
auto_delete?: boolean;
/**
* @description ID or name of Datacenter the Primary IP will be bound to. Needs to be omitted if `assignee_id` is passed.
* @example fsn1-dc8
*/
datacenter?: string;
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/** @example my-ip */
name: string;
/**
* @description Primary IP type
* @enum {string}
*/
type: "ipv4" | "ipv6";
};
};
};
responses: {
/** @description The `primary_ip` key contains the Primary IP that was just created */
201: {
content: {
"application/json": {
/** Action */
action?: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
/** PrimaryIP */
primary_ip: {
/**
* Format: int64
* @description ID of the resource the Primary IP is assigned to, null if it is not assigned at all
* @example 17
*/
assignee_id: number | null;
/**
* @description Resource type the Primary IP can be assigned to
* @enum {string}
*/
assignee_type: "server";
/**
* @description Delete this Primary IP when the resource it is assigned to is deleted
* @example true
*/
auto_delete: boolean;
/**
* @description Whether the IP is blocked
* @example false
*/
blocked: boolean;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Datacenter this Primary IP is located at */
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
/** @description Array of reverse DNS entries */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv4 or IPv6 address
* @example 131.232.99.1
*/
ip: string;
}[];
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description IP address
* @example 131.232.99.1
*/
ip: string;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Type of the Primary IP
* @enum {string}
*/
type: "ipv4" | "ipv6";
};
};
};
};
};
};
};
"/primary_ips/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/primary_ips/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/primary_ips/{id}": {
/**
* Get a Primary IP
* @description Returns a specific Primary IP object.
*/
get: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
responses: {
/** @description The `primary_ip` key contains a Primary IP object */
200: {
content: {
"application/json": {
/** PrimaryIP */
primary_ip: {
/**
* Format: int64
* @description ID of the resource the Primary IP is assigned to, null if it is not assigned at all
* @example 17
*/
assignee_id: number | null;
/**
* @description Resource type the Primary IP can be assigned to
* @enum {string}
*/
assignee_type: "server";
/**
* @description Delete this Primary IP when the resource it is assigned to is deleted
* @example true
*/
auto_delete: boolean;
/**
* @description Whether the IP is blocked
* @example false
*/
blocked: boolean;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Datacenter this Primary IP is located at */
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
/** @description Array of reverse DNS entries */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv4 or IPv6 address
* @example 131.232.99.1
*/
ip: string;
}[];
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description IP address
* @example 131.232.99.1
*/
ip: string;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Type of the Primary IP
* @enum {string}
*/
type: "ipv4" | "ipv6";
};
};
};
};
};
};
/**
* Update a Primary IP
* @description Updates the Primary IP.
*
* Note that when updating labels, the Primary IP's current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*
* If the Primary IP object changes during the request, the response will be a conflict error.
*/
put: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Delete this Primary IP when the resource it is assigned to is deleted
* @example true
*/
auto_delete?: boolean;
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description New unique name to set
* @example my-ip
*/
name?: string;
};
};
};
responses: {
/** @description The `primary_ip` key contains the Primary IP that was just updated */
200: {
content: {
"application/json": {
/** PrimaryIP */
primary_ip: {
/**
* Format: int64
* @description ID of the resource the Primary IP is assigned to, null if it is not assigned at all
* @example 17
*/
assignee_id: number | null;
/**
* @description Resource type the Primary IP can be assigned to
* @enum {string}
*/
assignee_type: "server";
/**
* @description Delete this Primary IP when the resource it is assigned to is deleted
* @example true
*/
auto_delete: boolean;
/**
* @description Whether the IP is blocked
* @example false
*/
blocked: boolean;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Datacenter this Primary IP is located at */
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
/** @description Array of reverse DNS entries */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv4 or IPv6 address
* @example 131.232.99.1
*/
ip: string;
}[];
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description IP address
* @example 131.232.99.1
*/
ip: string;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Type of the Primary IP
* @enum {string}
*/
type: "ipv4" | "ipv6";
};
};
};
};
};
};
/**
* Delete a Primary IP
* @description Deletes a Primary IP.
*
* The Primary IP may be assigned to a Server. In this case it is unassigned automatically. The Server must be powered off (status `off`) in order for this operation to succeed.
*/
delete: {
parameters: {
path: {
/** @description ID of the resource */
id: number;
};
};
responses: {
/** @description Primary IP deleted */
204: {
content: never;
};
};
};
};
"/primary_ips/{id}/actions/assign": {
/**
* Assign a Primary IP to a resource
* @description Assigns a Primary IP to a Server.
*
* A Server can only have one Primary IP of type `ipv4` and one of type `ipv6` assigned. If you need more IPs use Floating IPs.
*
* The Server must be powered off (status `off`) in order for this operation to succeed.
*
* #### Call specific error codes
*
* | Code | Description |
* |------------------------------ |-------------------------------------------------------------- |
* | `server_not_stopped` | The server is running, but needs to be powered off |
* | `primary_ip_already_assigned` | Primary ip is already assigned to a different server |
* | `server_has_ipv4` | The server already has an ipv4 address |
* | `server_has_ipv6` | The server already has an ipv6 address |
*/
post: {
parameters: {
path: {
/** @description ID of the Primary IP */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* Format: int64
* @description ID of a resource of type `assignee_type`
* @example 4711
*/
assignee_id: number;
/**
* @description Type of resource assigning the Primary IP to
* @example server
* @enum {string}
*/
assignee_type: "server";
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/primary_ips/{id}/actions/change_dns_ptr": {
/**
* Change reverse DNS entry for a Primary IP
* @description Changes the hostname that will appear when getting the hostname belonging to this Primary IP.
*/
post: {
parameters: {
path: {
/** @description ID of the Primary IP */
id: number;
};
};
/**
* @description Select the IP address for which to change the DNS entry by passing `ip`. For a Primary IP of type `ipv4` this must exactly match the IP address of the Primary IP. For a Primary IP of type `ipv6` this must be a single IP within the IPv6 /64 range that belongs to this Primary IP. You can add up to 100 IPv6 reverse DNS entries.
*
* The target hostname is set by passing `dns_ptr`.
*/
requestBody?: {
content: {
"application/json": {
/**
* @description Hostname to set as a reverse DNS PTR entry, will reset to original default value if `null`
* @example server02.example.com
*/
dns_ptr: string | null;
/**
* @description IP address for which to set the reverse DNS entry
* @example 1.2.3.4
*/
ip: string;
};
};
};
responses: {
/** @description The `action` key contains the `change_dns_ptr` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/primary_ips/{id}/actions/change_protection": {
/**
* Change Primary IP Protection
* @description Changes the protection configuration of a Primary IP.
*
* A Primary IP can only be delete protected if its `auto_delete` property is set to `false`.
*/
post: {
parameters: {
path: {
/** @description ID of the Primary IP */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description If true, prevents the Primary IP from being deleted
* @example true
*/
delete?: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `change_protection` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/primary_ips/{id}/actions/unassign": {
/**
* Unassign a Primary IP from a resource
* @description Unassigns a Primary IP from a Server.
*
* The Server must be powered off (status `off`) in order for this operation to succeed.
*
* Note that only Servers that have at least one network interface (public or private) attached can be powered on.
*
* #### Call specific error codes
*
* | Code | Description |
* |---------------------------------- |-------------------------------------------------------------- |
* | `server_not_stopped` | The server is running, but needs to be powered off |
* | `server_is_load_balancer_target` | The server ipv4 address is a loadbalancer target |
*/
post: {
parameters: {
path: {
/** @description ID of the Primary IP */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/server_types": {
/**
* Get all Server Types
* @description Gets all Server type objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter Server types by their name. The response will only contain the Server type matching the specified name. */
name?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `server_types` key in the reply contains an array of Server type objects with this structure */
200: {
content: {
"application/json": {
server_types: ({
/**
* @description Type of cpu architecture
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* @description Number of cpu cores a Server of this type will have
* @example 1
*/
cores: number;
/**
* @description Type of cpu
* @enum {string}
*/
cpu_type: "shared" | "dedicated";
/**
* @description This field is deprecated. Use the deprecation object instead
* @example false
*/
deprecated: boolean;
/**
* DeprecationInfo
* @description Describes if, when & how the resources was deprecated. If this field is
* set to `null` the resource is not deprecated. If it has a value, it is
* considered deprecated.
*/
deprecation?: {
/**
* Format: iso-8601
* @description Date of when the deprecation was announced.
*
* @example 2023-06-01T00:00:00+00:00
*/
announced: string;
/**
* Format: iso-8601
* @description After the time in this field, the resource will not be available
* from the general listing endpoint of the resource type, and it
* can not be used in new resources. For example, if this is an
* image, you can not create new servers with this image after the
* mentioned date.
*
* @example 2023-09-01T00:00:00+00:00
*/
unavailable_after: string;
} | null;
/**
* @description Description of the Server type
* @example CX11
*/
description: string;
/**
* @description Disk size a Server of this type will have in GB
* @example 24
*/
disk: number;
/**
* Format: int64
* @description ID of the Server type
* @example 1
*/
id: number;
/**
* Format: int64
* @description Free traffic per month in bytes
* @example 654321
*/
included_traffic: number;
/**
* @description Memory a Server of this type will have in GB
* @example 1
*/
memory: number;
/**
* @description Unique identifier of the Server type
* @example cx11
*/
name: string;
/** @description Prices in different Locations */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Server type in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Server type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
/**
* @description Type of Server boot drive. Local has higher speed. Network has better availability.
* @enum {string}
*/
storage_type: "local" | "network";
})[];
};
};
};
};
};
};
"/server_types/{id}": {
/**
* Get a Server Type
* @description Gets a specific Server type object.
*/
get: {
parameters: {
path: {
/** @description ID of Server Type */
id: number;
};
};
responses: {
/** @description The `server_type` key in the reply contains a Server type object with this structure */
200: {
content: {
"application/json": {
server_type: {
/**
* @description Type of cpu architecture
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* @description Number of cpu cores a Server of this type will have
* @example 1
*/
cores: number;
/**
* @description Type of cpu
* @enum {string}
*/
cpu_type: "shared" | "dedicated";
/**
* @description This field is deprecated. Use the deprecation object instead
* @example false
*/
deprecated: boolean;
/**
* DeprecationInfo
* @description Describes if, when & how the resources was deprecated. If this field is
* set to `null` the resource is not deprecated. If it has a value, it is
* considered deprecated.
*/
deprecation?: {
/**
* Format: iso-8601
* @description Date of when the deprecation was announced.
*
* @example 2023-06-01T00:00:00+00:00
*/
announced: string;
/**
* Format: iso-8601
* @description After the time in this field, the resource will not be available
* from the general listing endpoint of the resource type, and it
* can not be used in new resources. For example, if this is an
* image, you can not create new servers with this image after the
* mentioned date.
*
* @example 2023-09-01T00:00:00+00:00
*/
unavailable_after: string;
} | null;
/**
* @description Description of the Server type
* @example CX11
*/
description: string;
/**
* @description Disk size a Server of this type will have in GB
* @example 24
*/
disk: number;
/**
* Format: int64
* @description ID of the Server type
* @example 1
*/
id: number;
/**
* Format: int64
* @description Free traffic per month in bytes
* @example 654321
*/
included_traffic: number;
/**
* @description Memory a Server of this type will have in GB
* @example 1
*/
memory: number;
/**
* @description Unique identifier of the Server type
* @example cx11
*/
name: string;
/** @description Prices in different Locations */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Server type in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Server type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
/**
* @description Type of Server boot drive. Local has higher speed. Network has better availability.
* @enum {string}
*/
storage_type: "local" | "network";
};
};
};
};
};
};
};
"/servers": {
/**
* Get all Servers
* @description Returns all existing Server objects
*/
get: {
parameters: {
query?: {
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
/** @description Can be used multiple times. The response will only contain Server matching the status */
status?: "initializing" | "starting" | "running" | "stopping" | "off" | "deleting" | "rebuilding" | "migrating" | "unknown";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description A paged array of servers */
200: {
headers: {
/** @description A link to the next page of responses */
"x-next"?: string;
};
content: {
"application/json": {
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
servers: ({
/**
* @description Time window (UTC) in which the backup will run, or null if the backups are not enabled
* @example 22-02
*/
backup_window: string | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Datacenter this Resource is located at */
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description Image the server is based on. */
image: ({
/**
* @description Type of cpu architecture this image is compatible with.
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* Format: int64
* @description ID of Server the Image is bound to. Only set for Images of type `backup`.
* @example null
*/
bound_to: number | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Information about the Server the Image was created from */
created_from: {
/**
* Format: int64
* @description ID of the Server the Image was created from
* @example 1
*/
id: number;
/**
* @description Server name at the time the Image was created
* @example Server
*/
name: string;
} | null;
/**
* @description Point in time where the Image was deleted (in ISO-8601 format)
* @example null
*/
deleted: string | null;
/**
* @description Point in time when the Image is considered to be deprecated (in ISO-8601 format)
* @example 2018-02-28T00:00:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Image
* @example Ubuntu 20.04 Standard 64 bit
*/
description: string;
/**
* @description Size of the disk contained in the Image in GB
* @example 10
*/
disk_size: number;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image.
* @example 2.3
*/
image_size: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Unique identifier of the Image. This value is only set for system Images.
* @example ubuntu-20.04
*/
name: string | null;
/**
* @description Flavor of operating system contained in the Image
* @example ubuntu
* @enum {string}
*/
os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
/**
* @description Operating system version
* @example 20.04
*/
os_version: string | null;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Indicates that rapid deploy of the Image is available
* @example false
*/
rapid_deploy?: boolean;
/**
* @description Whether the Image can be used or if it's still being created or unavailable
* @enum {string}
*/
status: "available" | "creating" | "unavailable";
/**
* @description Type of the Image
* @example snapshot
* @enum {string}
*/
type: "system" | "app" | "snapshot" | "backup" | "temporary";
}) | null;
/**
* Format: int64
* @description Free Traffic for the current billing period in bytes
* @example 654321
*/
included_traffic: number | null;
/**
* Format: int64
* @description Inbound Traffic for the current billing period in bytes
* @example 123456
*/
ingoing_traffic: number | null;
/** @description ISO Image that is attached to this Server. Null if no ISO is attached. */
iso: ({
/**
* @description Type of cpu architecture this iso is compatible with. Null indicates no restriction on the architecture (wildcard).
* @example x86
* @enum {string|null}
*/
architecture: "x86" | "arm" | null;
/**
* DeprecationInfo
* @description Describes if, when & how the resources was deprecated. If this field is
* set to `null` the resource is not deprecated. If it has a value, it is
* considered deprecated.
*/
deprecation: {
/**
* Format: iso-8601
* @description Date of when the deprecation was announced.
*
* @example 2023-06-01T00:00:00+00:00
*/
announced: string;
/**
* Format: iso-8601
* @description After the time in this field, the resource will not be available
* from the general listing endpoint of the resource type, and it
* can not be used in new resources. For example, if this is an
* image, you can not create new servers with this image after the
* mentioned date.
*
* @example 2023-09-01T00:00:00+00:00
*/
unavailable_after: string;
} | null;
/**
* @description Description of the ISO
* @example FreeBSD 11.0 x64
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Unique identifier of the ISO. Only set for public ISOs
* @example FreeBSD-11.0-RELEASE-amd64-dvd1
*/
name: string | null;
/**
* @description Type of the ISO
* @enum {string|null}
*/
type: "public" | "private" | null;
}) | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/** @description Load Balancer IDs assigned to the server. */
load_balancers?: number[];
/**
* @description True if Server has been locked and is not available to user
* @example false
*/
locked: boolean;
/**
* @description Name of the Server (must be unique per Project and a valid hostname as per RFC 1123)
* @example my-resource
*/
name: string;
/**
* Format: int64
* @description Outbound Traffic for the current billing period in bytes
* @example 123456
*/
outgoing_traffic: number | null;
/**
* PlacementGroupNullable
* @description The placement group the server is assigned to.
*/
placement_group?: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Array of IDs of Servers that are part of this Placement Group
* @example [
* 42
* ]
*/
servers: number[];
/**
* @description Type of the Placement Group
* @example spread
* @enum {string}
*/
type: "spread";
} | null;
/**
* @description Size of the primary Disk
* @example 50
*/
primary_disk_size: number;
/** @description Private networks information */
private_net: {
/** @description Additional IP addresses of the server on the network. */
alias_ips?: string[];
/**
* @description The server IP address on the network.
* @example 10.0.0.2
*/
ip?: string;
/**
* @description The server MAC address on the network.
* @example 86:00:ff:2a:7d:e1
*/
mac_address?: string;
/**
* Format: int64
* @description The Network ID the server is attached to.
* @example 4711
*/
network?: number;
}[];
/** @description Protection configuration for the Server */
protection: {
/**
* @description If true, prevents the Server from being deleted
* @example false
*/
delete: boolean;
/**
* @description If true, prevents the Server from being rebuilt
* @example false
*/
rebuild: boolean;
};
/** @description Public network information. The Server's IPv4 address can be found in `public_net->ipv4->ip` */
public_net: {
/** @description Firewalls applied to the public network interface of this Server */
firewalls?: ({
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description Status of the Firewall on the Server
* @example applied
* @enum {string}
*/
status?: "applied" | "pending";
})[];
/**
* @description IDs of Floating IPs assigned to this Server
* @example [
* 478
* ]
*/
floating_ips: number[];
/** @description IP address (v4) and its reverse DNS entry of this Server */
ipv4: {
/**
* @description If the IP is blocked by our anti abuse dept
* @example false
*/
blocked: boolean;
/**
* @description Reverse DNS PTR entry for the IPv4 addresses of this Server
* @example server01.example.com
*/
dns_ptr: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description IP address (v4) of this Server
* @example 1.2.3.4
*/
ip: string;
} | null;
/** @description IPv6 network assigned to this Server and its reverse DNS entry */
ipv6: ({
/**
* @description If the IP is blocked by our anti abuse dept
* @example false
*/
blocked: boolean;
/** @description Reverse DNS PTR entries for the IPv6 addresses of this Server */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv6 address of this Server for which the reverse DNS entry has been set up
* @example 2001:db8::1
*/
ip: string;
}[] | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description IP address (v6) of this Server
* @example 2001:db8::/64
*/
ip: string;
}) | null;
};
/**
* @description True if rescue mode is enabled. Server will then boot into rescue system on next reboot
* @example false
*/
rescue_enabled: boolean;
/** @description Type of Server - determines how much ram, disk and cpu a Server has */
server_type: {
/**
* Format: int64
* @description Number of cpu cores a Server of this type will have
* @example 1
*/
cores: number;
/**
* @description Type of cpu
* @enum {string}
*/
cpu_type: "shared" | "dedicated";
/**
* @description True if Server type is deprecated
* @example false
*/
deprecated: boolean;
/**
* @description Description of the Server type
* @example CX11
*/
description: string;
/**
* @description Disk size a Server of this type will have in GB
* @example 25
*/
disk: number;
/**
* Format: int64
* @description ID of the Server type
* @example 1
*/
id: number;
/**
* @description Memory a Server of this type will have in GB
* @example 1
*/
memory: number;
/**
* @description Unique identifier of the Server type
* @example cx11
*/
name: string;
/** @description Prices in different Locations */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Server type in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Server type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
/**
* @description Type of Server boot drive. Local has higher speed. Network has better availability.
* @enum {string}
*/
storage_type: "local" | "network";
};
/**
* @description Status of the Server
* @enum {string}
*/
status: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown";
/** @description IDs of Volumes assigned to this Server */
volumes?: number[];
})[];
};
};
};
};
};
/**
* Create a Server
* @description Creates a new Server. Returns preliminary information about the Server as well as an Action that covers progress of creation.
*/
post: {
/**
* @description Please note that Server names must be unique per Project and valid hostnames as per RFC 1123 (i.e. may only contain letters, digits, periods, and dashes).
*
* For `server_type` you can either use the ID as listed in `/server_types` or its name.
*
* For `image` you can either use the ID as listed in `/images` or its name.
*
* If you want to create the Server in a Location, you must set `location` to the ID or name as listed in `/locations`. This is the recommended way. You can be even more specific by setting `datacenter` to the ID or name as listed in `/datacenters`. However we only recommend this if you want to assign a specific Primary IP to the Server which is located in the specified Datacenter.
*
* Some properties like `start_after_create` or `automount` will trigger Actions after the Server is created. Those Actions are listed in the `next_actions` field in the response.
*
* For accessing your Server we strongly recommend to use SSH keys by passing the respective key IDs in `ssh_keys`. If you do not specify any `ssh_keys` we will generate a root password for you and return it in the response.
*
* Please note that provided user-data is stored in our systems. While we take measures to protect it we highly recommend that you dont use it to store passwords or other sensitive information.
*
* #### Call specific error codes
*
* | Code | Description |
* |----------------------------------|------------------------------------------------------------|
* | `placement_error` | An error during the placement occurred |
* | `primary_ip_assigned` | The specified Primary IP is already assigned to a server |
* | `primary_ip_datacenter_mismatch` | The specified Primary IP is in a different datacenter |
* | `primary_ip_version_mismatch` | The specified Primary IP has the wrong IP Version |
*/
requestBody?: {
content: {
"application/json": {
/**
* @description Auto-mount Volumes after attach
* @example false
*/
automount?: boolean;
/**
* @description ID or name of Datacenter to create Server in (must not be used together with location)
* @example nbg1-dc3
*/
datacenter?: string;
/**
* @description Firewalls which should be applied on the Server's public network interface at creation time
* @example [
* {
* "firewall": 38
* }
* ]
*/
firewalls?: {
/**
* Format: int64
* @description ID of the Firewall
*/
firewall: number;
}[];
/**
* @description ID or name of the Image the Server is created from
* @example ubuntu-20.04
*/
image: string;
/** @description User-defined labels (key-value pairs) */
labels?: Record<string, never>;
/**
* @description ID or name of Location to create Server in (must not be used together with datacenter)
* @example nbg1
*/
location?: string;
/**
* @description Name of the Server to create (must be unique per Project and a valid hostname as per RFC 1123)
* @example my-server
*/
name: string;
/**
* @description Network IDs which should be attached to the Server private network interface at the creation time
* @example [
* 456
* ]
*/
networks?: number[];
/**
* Format: int64
* @description ID of the Placement Group the server should be in
* @example 1
*/
placement_group?: number;
/** @description Public Network options */
public_net?: {
/**
* @description Attach an IPv4 on the public NIC. If false, no IPv4 address will be attached.
* @default true
*/
enable_ipv4?: boolean;
/**
* @description Attach an IPv6 on the public NIC. If false, no IPv6 address will be attached.
* @default true
*/
enable_ipv6?: boolean;
/** @description ID of the ipv4 Primary IP to use. If omitted and enable_ipv4 is true, a new ipv4 Primary IP will automatically be created. */
ipv4?: number | null;
/** @description ID of the ipv6 Primary IP to use. If omitted and enable_ipv6 is true, a new ipv6 Primary IP will automatically be created. */
ipv6?: number | null;
};
/**
* @description ID or name of the Server type this Server should be created with
* @example cx11
*/
server_type: string;
/**
* @description SSH key IDs (`integer`) or names (`string`) which should be injected into the Server at creation time
* @example [
* "my-ssh-key"
* ]
*/
ssh_keys?: string[];
/**
* @description Start Server right after creation.
* @default true
* @example true
*/
start_after_create?: boolean;
/**
* @description Cloud-Init user data to use during Server creation. This field is limited to 32KiB.
* @example #cloud-config
* runcmd:
* - [touch, /root/cloud-init-worked]
*/
user_data?: string;
/**
* @description Volume IDs which should be attached to the Server at the creation time. Volumes must be in the same Location.
* @example [
* 123
* ]
*/
volumes?: number[];
};
};
};
responses: {
/** @description The `server` key in the reply contains a Server object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
next_actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
/**
* @description Root password when no SSH keys have been specified
* @example YItygq1v3GYjjMomLaKc
*/
root_password: string | null;
server: {
/**
* @description Time window (UTC) in which the backup will run, or null if the backups are not enabled
* @example 22-02
*/
backup_window: string | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Datacenter this Resource is located at */
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description Image the server is based on. */
image: ({
/**
* @description Type of cpu architecture this image is compatible with.
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* Format: int64
* @description ID of Server the Image is bound to. Only set for Images of type `backup`.
* @example null
*/
bound_to: number | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Information about the Server the Image was created from */
created_from: {
/**
* Format: int64
* @description ID of the Server the Image was created from
* @example 1
*/
id: number;
/**
* @description Server name at the time the Image was created
* @example Server
*/
name: string;
} | null;
/**
* @description Point in time where the Image was deleted (in ISO-8601 format)
* @example null
*/
deleted: string | null;
/**
* @description Point in time when the Image is considered to be deprecated (in ISO-8601 format)
* @example 2018-02-28T00:00:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Image
* @example Ubuntu 20.04 Standard 64 bit
*/
description: string;
/**
* @description Size of the disk contained in the Image in GB
* @example 10
*/
disk_size: number;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image.
* @example 2.3
*/
image_size: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Unique identifier of the Image. This value is only set for system Images.
* @example ubuntu-20.04
*/
name: string | null;
/**
* @description Flavor of operating system contained in the Image
* @example ubuntu
* @enum {string}
*/
os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
/**
* @description Operating system version
* @example 20.04
*/
os_version: string | null;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Indicates that rapid deploy of the Image is available
* @example false
*/
rapid_deploy?: boolean;
/**
* @description Whether the Image can be used or if it's still being created or unavailable
* @enum {string}
*/
status: "available" | "creating" | "unavailable";
/**
* @description Type of the Image
* @example snapshot
* @enum {string}
*/
type: "system" | "app" | "snapshot" | "backup" | "temporary";
}) | null;
/**
* Format: int64
* @description Free Traffic for the current billing period in bytes
* @example 654321
*/
included_traffic: number | null;
/**
* Format: int64
* @description Inbound Traffic for the current billing period in bytes
* @example 123456
*/
ingoing_traffic: number | null;
/** @description ISO Image that is attached to this Server. Null if no ISO is attached. */
iso: ({
/**
* @description Type of cpu architecture this iso is compatible with. Null indicates no restriction on the architecture (wildcard).
* @example x86
* @enum {string|null}
*/
architecture: "x86" | "arm" | null;
/**
* DeprecationInfo
* @description Describes if, when & how the resources was deprecated. If this field is
* set to `null` the resource is not deprecated. If it has a value, it is
* considered deprecated.
*/
deprecation: {
/**
* Format: iso-8601
* @description Date of when the deprecation was announced.
*
* @example 2023-06-01T00:00:00+00:00
*/
announced: string;
/**
* Format: iso-8601
* @description After the time in this field, the resource will not be available
* from the general listing endpoint of the resource type, and it
* can not be used in new resources. For example, if this is an
* image, you can not create new servers with this image after the
* mentioned date.
*
* @example 2023-09-01T00:00:00+00:00
*/
unavailable_after: string;
} | null;
/**
* @description Description of the ISO
* @example FreeBSD 11.0 x64
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Unique identifier of the ISO. Only set for public ISOs
* @example FreeBSD-11.0-RELEASE-amd64-dvd1
*/
name: string | null;
/**
* @description Type of the ISO
* @enum {string|null}
*/
type: "public" | "private" | null;
}) | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/** @description Load Balancer IDs assigned to the server. */
load_balancers?: number[];
/**
* @description True if Server has been locked and is not available to user
* @example false
*/
locked: boolean;
/**
* @description Name of the Server (must be unique per Project and a valid hostname as per RFC 1123)
* @example my-resource
*/
name: string;
/**
* Format: int64
* @description Outbound Traffic for the current billing period in bytes
* @example 123456
*/
outgoing_traffic: number | null;
/**
* PlacementGroupNullable
* @description The placement group the server is assigned to.
*/
placement_group?: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Array of IDs of Servers that are part of this Placement Group
* @example [
* 42
* ]
*/
servers: number[];
/**
* @description Type of the Placement Group
* @example spread
* @enum {string}
*/
type: "spread";
} | null;
/**
* @description Size of the primary Disk
* @example 50
*/
primary_disk_size: number;
/** @description Private networks information */
private_net: {
/** @description Additional IP addresses of the server on the network. */
alias_ips?: string[];
/**
* @description The server IP address on the network.
* @example 10.0.0.2
*/
ip?: string;
/**
* @description The server MAC address on the network.
* @example 86:00:ff:2a:7d:e1
*/
mac_address?: string;
/**
* Format: int64
* @description The Network ID the server is attached to.
* @example 4711
*/
network?: number;
}[];
/** @description Protection configuration for the Server */
protection: {
/**
* @description If true, prevents the Server from being deleted
* @example false
*/
delete: boolean;
/**
* @description If true, prevents the Server from being rebuilt
* @example false
*/
rebuild: boolean;
};
/** @description Public network information. The Server's IPv4 address can be found in `public_net->ipv4->ip` */
public_net: {
/** @description Firewalls applied to the public network interface of this Server */
firewalls?: ({
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description Status of the Firewall on the Server
* @example applied
* @enum {string}
*/
status?: "applied" | "pending";
})[];
/**
* @description IDs of Floating IPs assigned to this Server
* @example [
* 478
* ]
*/
floating_ips: number[];
/** @description IP address (v4) and its reverse DNS entry of this Server */
ipv4: {
/**
* @description If the IP is blocked by our anti abuse dept
* @example false
*/
blocked: boolean;
/**
* @description Reverse DNS PTR entry for the IPv4 addresses of this Server
* @example server01.example.com
*/
dns_ptr: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description IP address (v4) of this Server
* @example 1.2.3.4
*/
ip: string;
} | null;
/** @description IPv6 network assigned to this Server and its reverse DNS entry */
ipv6: ({
/**
* @description If the IP is blocked by our anti abuse dept
* @example false
*/
blocked: boolean;
/** @description Reverse DNS PTR entries for the IPv6 addresses of this Server */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv6 address of this Server for which the reverse DNS entry has been set up
* @example 2001:db8::1
*/
ip: string;
}[] | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description IP address (v6) of this Server
* @example 2001:db8::/64
*/
ip: string;
}) | null;
};
/**
* @description True if rescue mode is enabled. Server will then boot into rescue system on next reboot
* @example false
*/
rescue_enabled: boolean;
/** @description Type of Server - determines how much ram, disk and cpu a Server has */
server_type: {
/**
* Format: int64
* @description Number of cpu cores a Server of this type will have
* @example 1
*/
cores: number;
/**
* @description Type of cpu
* @enum {string}
*/
cpu_type: "shared" | "dedicated";
/**
* @description True if Server type is deprecated
* @example false
*/
deprecated: boolean;
/**
* @description Description of the Server type
* @example CX11
*/
description: string;
/**
* @description Disk size a Server of this type will have in GB
* @example 25
*/
disk: number;
/**
* Format: int64
* @description ID of the Server type
* @example 1
*/
id: number;
/**
* @description Memory a Server of this type will have in GB
* @example 1
*/
memory: number;
/**
* @description Unique identifier of the Server type
* @example cx11
*/
name: string;
/** @description Prices in different Locations */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Server type in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Server type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
/**
* @description Type of Server boot drive. Local has higher speed. Network has better availability.
* @enum {string}
*/
storage_type: "local" | "network";
};
/**
* @description Status of the Server
* @enum {string}
*/
status: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown";
/** @description IDs of Volumes assigned to this Server */
volumes?: number[];
};
};
};
};
};
};
};
"/servers/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/servers/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}": {
/**
* Get a Server
* @description Returns a specific Server object. The Server must exist inside the Project
*/
get: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `server` key in the reply contains a Server object with this structure */
200: {
content: {
"application/json": {
server?: {
/**
* @description Time window (UTC) in which the backup will run, or null if the backups are not enabled
* @example 22-02
*/
backup_window: string | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Datacenter this Resource is located at */
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description Image the server is based on. */
image: ({
/**
* @description Type of cpu architecture this image is compatible with.
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* Format: int64
* @description ID of Server the Image is bound to. Only set for Images of type `backup`.
* @example null
*/
bound_to: number | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Information about the Server the Image was created from */
created_from: {
/**
* Format: int64
* @description ID of the Server the Image was created from
* @example 1
*/
id: number;
/**
* @description Server name at the time the Image was created
* @example Server
*/
name: string;
} | null;
/**
* @description Point in time where the Image was deleted (in ISO-8601 format)
* @example null
*/
deleted: string | null;
/**
* @description Point in time when the Image is considered to be deprecated (in ISO-8601 format)
* @example 2018-02-28T00:00:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Image
* @example Ubuntu 20.04 Standard 64 bit
*/
description: string;
/**
* @description Size of the disk contained in the Image in GB
* @example 10
*/
disk_size: number;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image.
* @example 2.3
*/
image_size: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Unique identifier of the Image. This value is only set for system Images.
* @example ubuntu-20.04
*/
name: string | null;
/**
* @description Flavor of operating system contained in the Image
* @example ubuntu
* @enum {string}
*/
os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
/**
* @description Operating system version
* @example 20.04
*/
os_version: string | null;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Indicates that rapid deploy of the Image is available
* @example false
*/
rapid_deploy?: boolean;
/**
* @description Whether the Image can be used or if it's still being created or unavailable
* @enum {string}
*/
status: "available" | "creating" | "unavailable";
/**
* @description Type of the Image
* @example snapshot
* @enum {string}
*/
type: "system" | "app" | "snapshot" | "backup" | "temporary";
}) | null;
/**
* Format: int64
* @description Free Traffic for the current billing period in bytes
* @example 654321
*/
included_traffic: number | null;
/**
* Format: int64
* @description Inbound Traffic for the current billing period in bytes
* @example 123456
*/
ingoing_traffic: number | null;
/** @description ISO Image that is attached to this Server. Null if no ISO is attached. */
iso: ({
/**
* @description Type of cpu architecture this iso is compatible with. Null indicates no restriction on the architecture (wildcard).
* @example x86
* @enum {string|null}
*/
architecture: "x86" | "arm" | null;
/**
* DeprecationInfo
* @description Describes if, when & how the resources was deprecated. If this field is
* set to `null` the resource is not deprecated. If it has a value, it is
* considered deprecated.
*/
deprecation: {
/**
* Format: iso-8601
* @description Date of when the deprecation was announced.
*
* @example 2023-06-01T00:00:00+00:00
*/
announced: string;
/**
* Format: iso-8601
* @description After the time in this field, the resource will not be available
* from the general listing endpoint of the resource type, and it
* can not be used in new resources. For example, if this is an
* image, you can not create new servers with this image after the
* mentioned date.
*
* @example 2023-09-01T00:00:00+00:00
*/
unavailable_after: string;
} | null;
/**
* @description Description of the ISO
* @example FreeBSD 11.0 x64
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Unique identifier of the ISO. Only set for public ISOs
* @example FreeBSD-11.0-RELEASE-amd64-dvd1
*/
name: string | null;
/**
* @description Type of the ISO
* @enum {string|null}
*/
type: "public" | "private" | null;
}) | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/** @description Load Balancer IDs assigned to the server. */
load_balancers?: number[];
/**
* @description True if Server has been locked and is not available to user
* @example false
*/
locked: boolean;
/**
* @description Name of the Server (must be unique per Project and a valid hostname as per RFC 1123)
* @example my-resource
*/
name: string;
/**
* Format: int64
* @description Outbound Traffic for the current billing period in bytes
* @example 123456
*/
outgoing_traffic: number | null;
/**
* PlacementGroupNullable
* @description The placement group the server is assigned to.
*/
placement_group?: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Array of IDs of Servers that are part of this Placement Group
* @example [
* 42
* ]
*/
servers: number[];
/**
* @description Type of the Placement Group
* @example spread
* @enum {string}
*/
type: "spread";
} | null;
/**
* @description Size of the primary Disk
* @example 50
*/
primary_disk_size: number;
/** @description Private networks information */
private_net: {
/** @description Additional IP addresses of the server on the network. */
alias_ips?: string[];
/**
* @description The server IP address on the network.
* @example 10.0.0.2
*/
ip?: string;
/**
* @description The server MAC address on the network.
* @example 86:00:ff:2a:7d:e1
*/
mac_address?: string;
/**
* Format: int64
* @description The Network ID the server is attached to.
* @example 4711
*/
network?: number;
}[];
/** @description Protection configuration for the Server */
protection: {
/**
* @description If true, prevents the Server from being deleted
* @example false
*/
delete: boolean;
/**
* @description If true, prevents the Server from being rebuilt
* @example false
*/
rebuild: boolean;
};
/** @description Public network information. The Server's IPv4 address can be found in `public_net->ipv4->ip` */
public_net: {
/** @description Firewalls applied to the public network interface of this Server */
firewalls?: ({
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description Status of the Firewall on the Server
* @example applied
* @enum {string}
*/
status?: "applied" | "pending";
})[];
/**
* @description IDs of Floating IPs assigned to this Server
* @example [
* 478
* ]
*/
floating_ips: number[];
/** @description IP address (v4) and its reverse DNS entry of this Server */
ipv4: {
/**
* @description If the IP is blocked by our anti abuse dept
* @example false
*/
blocked: boolean;
/**
* @description Reverse DNS PTR entry for the IPv4 addresses of this Server
* @example server01.example.com
*/
dns_ptr: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description IP address (v4) of this Server
* @example 1.2.3.4
*/
ip: string;
} | null;
/** @description IPv6 network assigned to this Server and its reverse DNS entry */
ipv6: ({
/**
* @description If the IP is blocked by our anti abuse dept
* @example false
*/
blocked: boolean;
/** @description Reverse DNS PTR entries for the IPv6 addresses of this Server */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv6 address of this Server for which the reverse DNS entry has been set up
* @example 2001:db8::1
*/
ip: string;
}[] | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description IP address (v6) of this Server
* @example 2001:db8::/64
*/
ip: string;
}) | null;
};
/**
* @description True if rescue mode is enabled. Server will then boot into rescue system on next reboot
* @example false
*/
rescue_enabled: boolean;
/** @description Type of Server - determines how much ram, disk and cpu a Server has */
server_type: {
/**
* Format: int64
* @description Number of cpu cores a Server of this type will have
* @example 1
*/
cores: number;
/**
* @description Type of cpu
* @enum {string}
*/
cpu_type: "shared" | "dedicated";
/**
* @description True if Server type is deprecated
* @example false
*/
deprecated: boolean;
/**
* @description Description of the Server type
* @example CX11
*/
description: string;
/**
* @description Disk size a Server of this type will have in GB
* @example 25
*/
disk: number;
/**
* Format: int64
* @description ID of the Server type
* @example 1
*/
id: number;
/**
* @description Memory a Server of this type will have in GB
* @example 1
*/
memory: number;
/**
* @description Unique identifier of the Server type
* @example cx11
*/
name: string;
/** @description Prices in different Locations */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Server type in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Server type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
/**
* @description Type of Server boot drive. Local has higher speed. Network has better availability.
* @enum {string}
*/
storage_type: "local" | "network";
};
/**
* @description Status of the Server
* @enum {string}
*/
status: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown";
/** @description IDs of Volumes assigned to this Server */
volumes?: number[];
};
};
};
};
};
};
/**
* Update a Server
* @description Updates a Server. You can update a Servers name and a Servers labels.
* Please note that Server names must be unique per Project and valid hostnames as per RFC 1123 (i.e. may only contain letters, digits, periods, and dashes).
* Also note that when updating labels, the Servers current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*/
put: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description New name to set
* @example my-server
*/
name?: string;
};
};
};
responses: {
/** @description The `server` key in the reply contains the updated Server */
200: {
content: {
"application/json": {
server?: {
/**
* @description Time window (UTC) in which the backup will run, or null if the backups are not enabled
* @example 22-02
*/
backup_window: string | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Datacenter this Resource is located at */
datacenter: {
/**
* @description Description of the Datacenter
* @example Falkenstein DC Park 8
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description The location of the datacenter. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Unique identifier of the Datacenter
* @example fsn1-dc8
*/
name: string;
/** @description The Server types the Datacenter can handle */
server_types: {
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available: number[];
/**
* @description IDs of Server types that are supported and for which the Datacenter has enough resources left
* @example [
* 1,
* 2,
* 3
* ]
*/
available_for_migration: number[];
/**
* @description IDs of Server types that are supported in the Datacenter
* @example [
* 1,
* 2,
* 3
* ]
*/
supported: number[];
};
};
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description Image the server is based on. */
image: ({
/**
* @description Type of cpu architecture this image is compatible with.
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* Format: int64
* @description ID of Server the Image is bound to. Only set for Images of type `backup`.
* @example null
*/
bound_to: number | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Information about the Server the Image was created from */
created_from: {
/**
* Format: int64
* @description ID of the Server the Image was created from
* @example 1
*/
id: number;
/**
* @description Server name at the time the Image was created
* @example Server
*/
name: string;
} | null;
/**
* @description Point in time where the Image was deleted (in ISO-8601 format)
* @example null
*/
deleted: string | null;
/**
* @description Point in time when the Image is considered to be deprecated (in ISO-8601 format)
* @example 2018-02-28T00:00:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Image
* @example Ubuntu 20.04 Standard 64 bit
*/
description: string;
/**
* @description Size of the disk contained in the Image in GB
* @example 10
*/
disk_size: number;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image.
* @example 2.3
*/
image_size: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Unique identifier of the Image. This value is only set for system Images.
* @example ubuntu-20.04
*/
name: string | null;
/**
* @description Flavor of operating system contained in the Image
* @example ubuntu
* @enum {string}
*/
os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
/**
* @description Operating system version
* @example 20.04
*/
os_version: string | null;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Indicates that rapid deploy of the Image is available
* @example false
*/
rapid_deploy?: boolean;
/**
* @description Whether the Image can be used or if it's still being created or unavailable
* @enum {string}
*/
status: "available" | "creating" | "unavailable";
/**
* @description Type of the Image
* @example snapshot
* @enum {string}
*/
type: "system" | "app" | "snapshot" | "backup" | "temporary";
}) | null;
/**
* Format: int64
* @description Free Traffic for the current billing period in bytes
* @example 654321
*/
included_traffic: number | null;
/**
* Format: int64
* @description Inbound Traffic for the current billing period in bytes
* @example 123456
*/
ingoing_traffic: number | null;
/** @description ISO Image that is attached to this Server. Null if no ISO is attached. */
iso: ({
/**
* @description Type of cpu architecture this iso is compatible with. Null indicates no restriction on the architecture (wildcard).
* @example x86
* @enum {string|null}
*/
architecture: "x86" | "arm" | null;
/**
* DeprecationInfo
* @description Describes if, when & how the resources was deprecated. If this field is
* set to `null` the resource is not deprecated. If it has a value, it is
* considered deprecated.
*/
deprecation: {
/**
* Format: iso-8601
* @description Date of when the deprecation was announced.
*
* @example 2023-06-01T00:00:00+00:00
*/
announced: string;
/**
* Format: iso-8601
* @description After the time in this field, the resource will not be available
* from the general listing endpoint of the resource type, and it
* can not be used in new resources. For example, if this is an
* image, you can not create new servers with this image after the
* mentioned date.
*
* @example 2023-09-01T00:00:00+00:00
*/
unavailable_after: string;
} | null;
/**
* @description Description of the ISO
* @example FreeBSD 11.0 x64
*/
description: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Unique identifier of the ISO. Only set for public ISOs
* @example FreeBSD-11.0-RELEASE-amd64-dvd1
*/
name: string | null;
/**
* @description Type of the ISO
* @enum {string|null}
*/
type: "public" | "private" | null;
}) | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/** @description Load Balancer IDs assigned to the server. */
load_balancers?: number[];
/**
* @description True if Server has been locked and is not available to user
* @example false
*/
locked: boolean;
/**
* @description Name of the Server (must be unique per Project and a valid hostname as per RFC 1123)
* @example my-resource
*/
name: string;
/**
* Format: int64
* @description Outbound Traffic for the current billing period in bytes
* @example 123456
*/
outgoing_traffic: number | null;
/**
* PlacementGroupNullable
* @description The placement group the server is assigned to.
*/
placement_group?: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Array of IDs of Servers that are part of this Placement Group
* @example [
* 42
* ]
*/
servers: number[];
/**
* @description Type of the Placement Group
* @example spread
* @enum {string}
*/
type: "spread";
} | null;
/**
* @description Size of the primary Disk
* @example 50
*/
primary_disk_size: number;
/** @description Private networks information */
private_net: {
/** @description Additional IP addresses of the server on the network. */
alias_ips?: string[];
/**
* @description The server IP address on the network.
* @example 10.0.0.2
*/
ip?: string;
/**
* @description The server MAC address on the network.
* @example 86:00:ff:2a:7d:e1
*/
mac_address?: string;
/**
* Format: int64
* @description The Network ID the server is attached to.
* @example 4711
*/
network?: number;
}[];
/** @description Protection configuration for the Server */
protection: {
/**
* @description If true, prevents the Server from being deleted
* @example false
*/
delete: boolean;
/**
* @description If true, prevents the Server from being rebuilt
* @example false
*/
rebuild: boolean;
};
/** @description Public network information. The Server's IPv4 address can be found in `public_net->ipv4->ip` */
public_net: {
/** @description Firewalls applied to the public network interface of this Server */
firewalls?: ({
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description Status of the Firewall on the Server
* @example applied
* @enum {string}
*/
status?: "applied" | "pending";
})[];
/**
* @description IDs of Floating IPs assigned to this Server
* @example [
* 478
* ]
*/
floating_ips: number[];
/** @description IP address (v4) and its reverse DNS entry of this Server */
ipv4: {
/**
* @description If the IP is blocked by our anti abuse dept
* @example false
*/
blocked: boolean;
/**
* @description Reverse DNS PTR entry for the IPv4 addresses of this Server
* @example server01.example.com
*/
dns_ptr: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description IP address (v4) of this Server
* @example 1.2.3.4
*/
ip: string;
} | null;
/** @description IPv6 network assigned to this Server and its reverse DNS entry */
ipv6: ({
/**
* @description If the IP is blocked by our anti abuse dept
* @example false
*/
blocked: boolean;
/** @description Reverse DNS PTR entries for the IPv6 addresses of this Server */
dns_ptr: {
/**
* @description DNS pointer for the specific IP address
* @example server.example.com
*/
dns_ptr: string;
/**
* @description Single IPv6 address of this Server for which the reverse DNS entry has been set up
* @example 2001:db8::1
*/
ip: string;
}[] | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id?: number;
/**
* @description IP address (v6) of this Server
* @example 2001:db8::/64
*/
ip: string;
}) | null;
};
/**
* @description True if rescue mode is enabled. Server will then boot into rescue system on next reboot
* @example false
*/
rescue_enabled: boolean;
/** @description Type of Server - determines how much ram, disk and cpu a Server has */
server_type: {
/**
* Format: int64
* @description Number of cpu cores a Server of this type will have
* @example 1
*/
cores: number;
/**
* @description Type of cpu
* @enum {string}
*/
cpu_type: "shared" | "dedicated";
/**
* @description True if Server type is deprecated
* @example false
*/
deprecated: boolean;
/**
* @description Description of the Server type
* @example CX11
*/
description: string;
/**
* @description Disk size a Server of this type will have in GB
* @example 25
*/
disk: number;
/**
* Format: int64
* @description ID of the Server type
* @example 1
*/
id: number;
/**
* @description Memory a Server of this type will have in GB
* @example 1
*/
memory: number;
/**
* @description Unique identifier of the Server type
* @example cx11
*/
name: string;
/** @description Prices in different Locations */
prices: {
/**
* @description Name of the Location the price is for
* @example fsn1
*/
location: string;
/** @description Hourly costs for a Server type in this Location */
price_hourly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
/** @description Monthly costs for a Server type in this Location */
price_monthly: {
/**
* Format: decimal
* @description Price with VAT added
* @example 1.1900000000000000
*/
gross: string;
/**
* Format: decimal
* @description Price without VAT
* @example 1.0000000000
*/
net: string;
};
}[];
/**
* @description Type of Server boot drive. Local has higher speed. Network has better availability.
* @enum {string}
*/
storage_type: "local" | "network";
};
/**
* @description Status of the Server
* @enum {string}
*/
status: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown";
/** @description IDs of Volumes assigned to this Server */
volumes?: number[];
};
};
};
};
};
};
/**
* Delete a Server
* @description Deletes a Server. This immediately removes the Server from your account, and it is no longer accessible. Any resources attached to the server (like Volumes, Primary IPs, Floating IPs, Firewalls, Placement Groups) are detached while the server is deleted.
*/
delete: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
200: {
content: {
"application/json": {
/** Action */
action?: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions": {
/**
* Get all Actions for a Server
* @description Returns all Action objects for a Server. You can `sort` the results by using the sort URI parameter, and filter them with the `status` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/servers/{id}/actions/add_to_placement_group": {
/**
* Add a Server to a Placement Group
* @description Adds a Server to a Placement Group.
*
* Server must be powered off for this command to succeed.
*
* #### Call specific error codes
*
* | Code | Description |
* |-------------------------------|----------------------------------------------------------------------|
* | `server_not_stopped` | The action requires a stopped server |
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* Format: int64
* @description ID of Placement Group the Server should be added to
* @example 1
*/
placement_group: number;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/attach_iso": {
/**
* Attach an ISO to a Server
* @description Attaches an ISO to a Server. The Server will immediately see it as a new disk. An already attached ISO will automatically be detached before the new ISO is attached.
*
* Servers with attached ISOs have a modified boot order: They will try to boot from the ISO first before falling back to hard disk.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description ID or name of ISO to attach to the Server as listed in GET `/isos`
* @example FreeBSD-11.0-RELEASE-amd64-dvd1
*/
iso: string;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/attach_to_network": {
/**
* Attach a Server to a Network
* @description Attaches a Server to a network. This will complement the fixed public Server interface by adding an additional ethernet interface to the Server which is connected to the specified network.
*
* The Server will get an IP auto assigned from a subnet of type `server` in the same `network_zone`.
*
* Using the `alias_ips` attribute you can also define one or more additional IPs to the Servers. Please note that you will have to configure these IPs by hand on your Server since only the primary IP will be given out by DHCP.
*
* **Call specific error codes**
*
* | Code | Description |
* |----------------------------------|-----------------------------------------------------------------------|
* | `server_already_attached` | The server is already attached to the network |
* | `ip_not_available` | The provided Network IP is not available |
* | `no_subnet_available` | No Subnet or IP is available for the Server within the network |
* | `networks_overlap` | The network IP range overlaps with one of the server networks |
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Additional IPs to be assigned to this Server
* @example [
* "10.0.1.2"
* ]
*/
alias_ips?: string[];
/**
* @description IP to request to be assigned to this Server; if you do not provide this then you will be auto assigned an IP address
* @example 10.0.1.1
*/
ip?: string;
/**
* Format: int64
* @description ID of an existing network to attach the Server to
* @example 4711
*/
network: number;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/change_alias_ips": {
/**
* Change alias IPs of a Network
* @description Changes the alias IPs of an already attached Network. Note that the existing aliases for the specified Network will be replaced with these provided in the request body. So if you want to add an alias IP, you have to provide the existing ones from the Network plus the new alias IP in the request body.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description New alias IPs to set for this Server
* @example [
* "10.0.1.2"
* ]
*/
alias_ips: string[];
/**
* Format: int64
* @description ID of an existing Network already attached to the Server
* @example 4711
*/
network: number;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/change_dns_ptr": {
/**
* Change reverse DNS entry for this Server
* @description Changes the hostname that will appear when getting the hostname belonging to the primary IPs (IPv4 and IPv6) of this Server.
*
* Floating IPs assigned to the Server are not affected by this.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
/** @description Select the IP address for which to change the DNS entry by passing `ip`. It can be either IPv4 or IPv6. The target hostname is set by passing `dns_ptr`. */
requestBody?: {
content: {
"application/json": {
/**
* @description Hostname to set as a reverse DNS PTR entry, reset to original value if `null`
* @example server01.example.com
*/
dns_ptr: string | null;
/**
* @description Primary IP address for which the reverse DNS entry should be set
* @example 1.2.3.4
*/
ip: string;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/change_protection": {
/**
* Change Server Protection
* @description Changes the protection configuration of the Server.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description If true, prevents the Server from being deleted (currently delete and rebuild attribute needs to have the same value)
* @example true
*/
delete?: boolean;
/**
* @description If true, prevents the Server from being rebuilt (currently delete and rebuild attribute needs to have the same value)
* @example true
*/
rebuild?: boolean;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/change_type": {
/**
* Change the Type of a Server
* @description Changes the type (Cores, RAM and disk sizes) of a Server.
*
* Server must be powered off for this command to succeed.
*
* This copies the content of its disk, and starts it again.
*
* You can only migrate to Server types with the same `storage_type` and equal or bigger disks. Shrinking disks is not possible as it might destroy data.
*
* If the disk gets upgraded, the Server type can not be downgraded any more. If you plan to downgrade the Server type, set `upgrade_disk` to `false`.
*
* #### Call specific error codes
*
* | Code | Description |
* |-------------------------------|----------------------------------------------------------------------|
* | `invalid_server_type` | The server type does not fit for the given server or is deprecated |
* | `server_not_stopped` | The action requires a stopped server |
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description ID or name of Server type the Server should migrate to
* @example cx11
*/
server_type: string;
/**
* @description If false, do not upgrade the disk (this allows downgrading the Server type later)
* @example true
*/
upgrade_disk: boolean;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/create_image": {
/**
* Create Image from a Server
* @description Creates an Image (snapshot) from a Server by copying the contents of its disks. This creates a snapshot of the current state of the disk and copies it into an Image. If the Server is currently running you must make sure that its disk content is consistent. Otherwise, the created Image may not be readable.
*
* To make sure disk content is consistent, we recommend to shut down the Server prior to creating an Image.
*
* You can either create a `backup` Image that is bound to the Server and therefore will be deleted when the Server is deleted, or you can create an `snapshot` Image which is completely independent of the Server it was created from and will survive Server deletion. Backup Images are only available when the backup option is enabled for the Server. Snapshot Images are billed on a per GB basis.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Description of the Image, will be auto-generated if not set
* @example my image
*/
description?: string;
/** @description User-defined labels (key-value pairs) */
labels?: {
/**
* @description New label
* @example value
*/
labelkey?: string;
};
/**
* @description Type of Image to create.
* @default snapshot
* @example snapshot
* @enum {string}
*/
type?: "snapshot" | "backup";
};
};
};
responses: {
/**
* @description The `image` key in the reply contains an the created Image, which is an object with this structure
*
* The `action` key in the reply contains an Action object with this structure
*/
201: {
content: {
"application/json": {
/** Action */
action?: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
image?: {
/**
* @description Type of cpu architecture this image is compatible with.
* @example x86
* @enum {string}
*/
architecture: "x86" | "arm";
/**
* Format: int64
* @description ID of Server the Image is bound to. Only set for Images of type `backup`.
* @example null
*/
bound_to: number | null;
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/** @description Information about the Server the Image was created from */
created_from: {
/**
* Format: int64
* @description ID of the Server the Image was created from
* @example 1
*/
id: number;
/**
* @description Server name at the time the Image was created
* @example Server
*/
name: string;
} | null;
/**
* @description Point in time where the Image was deleted (in ISO-8601 format)
* @example null
*/
deleted: string | null;
/**
* @description Point in time when the Image is considered to be deprecated (in ISO-8601 format)
* @example 2018-02-28T00:00:00+00:00
*/
deprecated: string | null;
/**
* @description Description of the Image
* @example Ubuntu 20.04 Standard 64 bit
*/
description: string;
/**
* @description Size of the disk contained in the Image in GB
* @example 10
*/
disk_size: number;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image.
* @example 2.3
*/
image_size: number | null;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Unique identifier of the Image. This value is only set for system Images.
* @example ubuntu-20.04
*/
name: string | null;
/**
* @description Flavor of operating system contained in the Image
* @example ubuntu
* @enum {string}
*/
os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
/**
* @description Operating system version
* @example 20.04
*/
os_version: string | null;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* @description Indicates that rapid deploy of the Image is available
* @example false
*/
rapid_deploy?: boolean;
/**
* @description Whether the Image can be used or if it's still being created or unavailable
* @enum {string}
*/
status: "available" | "creating" | "unavailable";
/**
* @description Type of the Image
* @example snapshot
* @enum {string}
*/
type: "system" | "app" | "snapshot" | "backup" | "temporary";
};
};
};
};
};
};
};
"/servers/{id}/actions/detach_from_network": {
/**
* Detach a Server from a Network
* @description Detaches a Server from a network. The interface for this network will vanish.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* Format: int64
* @description ID of an existing network to detach the Server from
* @example 4711
*/
network: number;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/detach_iso": {
/**
* Detach an ISO from a Server
* @description Detaches an ISO from a Server. In case no ISO Image is attached to the Server, the status of the returned Action is immediately set to `success`
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/disable_backup": {
/**
* Disable Backups for a Server
* @description Disables the automatic backup option and deletes all existing Backups for a Server. No more additional charges for backups will be made.
*
* Caution: This immediately removes all existing backups for the Server!
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/disable_rescue": {
/**
* Disable Rescue Mode for a Server
* @description Disables the Hetzner Rescue System for a Server. This makes a Server start from its disks on next reboot.
*
* Rescue Mode is automatically disabled when you first boot into it or if you do not use it for 60 minutes.
*
* Disabling rescue mode will not reboot your Server you will have to do this yourself.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/enable_backup": {
/**
* Enable and Configure Backups for a Server
* @description Enables and configures the automatic daily backup option for the Server. Enabling automatic backups will increase the price of the Server by 20%. In return, you will get seven slots where Images of type backup can be stored.
*
* Backups are automatically created daily.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/enable_rescue": {
/**
* Enable Rescue Mode for a Server
* @description Enable the Hetzner Rescue System for this Server. The next time a Server with enabled rescue mode boots it will start a special minimal Linux distribution designed for repair and reinstall.
*
* In case a Server cannot boot on its own you can use this to access a Servers disks.
*
* Rescue Mode is automatically disabled when you first boot into it or if you do not use it for 60 minutes.
*
* Enabling rescue mode will not [reboot](https://docs.hetzner.cloud/#server-actions-soft-reboot-a-server) your Server — you will have to do this yourself.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Array of SSH key IDs which should be injected into the rescue system.
* @example [
* 2323
* ]
*/
ssh_keys?: number[];
/**
* @description Type of rescue system to boot.
* @default linux64
* @enum {string}
*/
type?: "linux64";
};
};
};
responses: {
/**
* @description The `root_password` key in the reply contains the root password that can be used to access the booted rescue system.
*
* The `action` key in the reply contains an Action object with this structure
*/
201: {
content: {
"application/json": {
/** Action */
action?: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
/**
* @description Password that will be set for this Server once the Action succeeds
* @example zCWbFhnu950dUTko5f40
*/
root_password?: string;
};
};
};
};
};
};
"/servers/{id}/actions/poweroff": {
/**
* Power off a Server
* @description Cuts power to the Server. This forcefully stops it without giving the Server operating system time to gracefully stop. May lead to data loss, equivalent to pulling the power cord. Power off should only be used when shutdown does not work.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/poweron": {
/**
* Power on a Server
* @description Starts a Server by turning its power on.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/reboot": {
/**
* Soft-reboot a Server
* @description Reboots a Server gracefully by sending an ACPI request. The Server operating system must support ACPI and react to the request, otherwise the Server will not reboot.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/rebuild": {
/**
* Rebuild a Server from an Image
* @description Rebuilds a Server overwriting its disk with the content of an Image, thereby **destroying all data** on the target Server
*
* The Image can either be one you have created earlier (`backup` or `snapshot` Image) or it can be a completely fresh `system` Image provided by us. You can get a list of all available Images with `GET /images`.
*
* Your Server will automatically be powered off before the rebuild command executes.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
/** @description To select which Image to rebuild from you can either pass an ID or a name as the `image` argument. Passing a name only works for `system` Images since the other Image types do not have a name set. */
requestBody?: {
content: {
"application/json": {
/**
* @description ID or name of Image to rebuilt from.
* @example ubuntu-20.04
*/
image: string;
};
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action?: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
/** @description New root password when not using SSH keys */
root_password?: string | null;
};
};
};
};
};
};
"/servers/{id}/actions/remove_from_placement_group": {
/**
* Remove from Placement Group
* @description Removes a Server from a Placement Group.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/request_console": {
/**
* Request Console for a Server
* @description Requests credentials for remote access via VNC over websocket to keyboard, monitor, and mouse for a Server. The provided URL is valid for 1 minute, after this period a new url needs to be created to connect to the Server. How long the connection is open after the initial connect is not subject to this timeout.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
/**
* @description VNC password to use for this connection (this password only works in combination with a wss_url with valid token)
* @example 9MQaTg2VAGI0FIpc10k3UpRXcHj2wQ6x
*/
password: string;
/**
* @description URL of websocket proxy to use; this includes a token which is valid for a limited time only
* @example wss://console.hetzner.cloud/?server_id=1&token=3db32d15-af2f-459c-8bf8-dee1fd05f49c
*/
wss_url: string;
};
};
};
};
};
};
"/servers/{id}/actions/reset": {
/**
* Reset a Server
* @description Cuts power to a Server and starts it again. This forcefully stops it without giving the Server operating system time to gracefully stop. This may lead to data loss, its equivalent to pulling the power cord and plugging it in again. Reset should only be used when reboot does not work.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/reset_password": {
/**
* Reset root Password of a Server
* @description Resets the root password. Only works for Linux systems that are running the qemu guest agent. Server must be powered on (status `running`) in order for this operation to succeed.
*
* This will generate a new password for this Server and return it.
*
* If this does not succeed you can use the rescue system to netboot the Server and manually change your Server password by hand.
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/**
* @description The `root_password` key in the reply contains the new root password that will be active if the Action succeeds.
*
* The `action` key in the reply contains an Action object with this structure:
*/
201: {
content: {
"application/json": {
/** Action */
action?: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
/**
* @description Password that will be set for this Server once the Action succeeds
* @example zCWbFhnu950dUTko5f40
*/
root_password?: string;
};
};
};
};
};
};
"/servers/{id}/actions/shutdown": {
/**
* Shutdown a Server
* @description Shuts down a Server gracefully by sending an ACPI shutdown request. The Server operating system must support ACPI
* and react to the request, otherwise the Server will not shut down. Please note that the `action` status in this case
* only reflects whether the action was sent to the server. It does not mean that the server actually shut down
* successfully. If you need to ensure that the server is off, use the `poweroff` action
*/
post: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `action` key in the reply contains an Action object with this structure */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/actions/{action_id}": {
/**
* Get an Action for a Server
* @description Returns a specific Action object for a Server.
*/
get: {
parameters: {
path: {
/** @description ID of the Server */
id: number;
/** @description ID of the Action */
action_id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/servers/{id}/metrics": {
/**
* Get Metrics for a Server
* @description Get Metrics for specified Server.
*
* You must specify the type of metric to get: cpu, disk or network. You can also specify more than one type by comma separation, e.g. cpu,disk.
*
* Depending on the type you will get different time series data
*
* | Type | Timeseries | Unit | Description |
* |---------|-------------------------|-----------|------------------------------------------------------|
* | cpu | cpu | percent | Percent CPU usage |
* | disk | disk.0.iops.read | iop/s | Number of read IO operations per second |
* | | disk.0.iops.write | iop/s | Number of write IO operations per second |
* | | disk.0.bandwidth.read | bytes/s | Bytes read per second |
* | | disk.0.bandwidth.write | bytes/s | Bytes written per second |
* | network | network.0.pps.in | packets/s | Public Network interface packets per second received |
* | | network.0.pps.out | packets/s | Public Network interface packets per second sent |
* | | network.0.bandwidth.in | bytes/s | Public Network interface bytes/s received |
* | | network.0.bandwidth.out | bytes/s | Public Network interface bytes/s sent |
*
* Metrics are available for the last 30 days only.
*
* If you do not provide the step argument we will automatically adjust it so that a maximum of 200 samples are returned.
*
* We limit the number of samples returned to a maximum of 500 and will adjust the step parameter accordingly.
*/
get: {
parameters: {
query: {
/** @description Type of metrics to get */
type: "cpu" | "disk" | "network";
/** @description Start of period to get Metrics for (in ISO-8601 format) */
start: string;
/** @description End of period to get Metrics for (in ISO-8601 format) */
end: string;
/** @description Resolution of results in seconds */
step?: string;
};
path: {
/** @description ID of the Server */
id: number;
};
};
responses: {
/** @description The `metrics` key in the reply contains a metrics object with this structure */
200: {
content: {
"application/json": {
metrics: {
/**
* @description End of period of metrics reported (in ISO-8601 format)
* @example 2017-01-01T23:00:00+00:00
*/
end: string;
/**
* @description Start of period of metrics reported (in ISO-8601 format)
* @example 2017-01-01T00:00:00+00:00
*/
start: string;
/**
* @description Resolution of results in seconds.
* @example 60
*/
step: number;
/**
* @description Hash with timeseries information, containing the name of timeseries as key
* @example {
* "name_of_timeseries": {
* "values": [
* [
* 1435781470.622,
* "42"
* ],
* [
* 1435781471.622,
* "43"
* ]
* ]
* }
* }
*/
time_series: {
[key: string]: {
/** @description Metrics Timestamps with values */
values: ((number | string)[])[];
};
};
};
};
};
};
};
};
};
"/ssh_keys": {
/**
* Get all SSH keys
* @description Returns all SSH key objects.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter SSH keys by their fingerprint. The response will only contain the SSH key matching the specified fingerprint. */
fingerprint?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `ssh_keys` key in the reply contains an array of SSH key objects with this structure */
200: {
content: {
"application/json": {
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
ssh_keys: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Fingerprint of public key
* @example b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f
*/
fingerprint: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Public key
* @example ssh-rsa AAAjjk76kgf...Xt
*/
public_key: string;
}[];
};
};
};
};
};
/**
* Create an SSH key
* @description Creates a new SSH key with the given `name` and `public_key`. Once an SSH key is created, it can be used in other calls such as creating Servers.
*/
post: {
requestBody?: {
content: {
"application/json": {
/** @description User-defined labels (key-value pairs) */
labels?: Record<string, never>;
/**
* @description Name of the SSH key
* @example My ssh key
*/
name: string;
/**
* @description Public key
* @example ssh-rsa AAAjjk76kgf...Xt
*/
public_key: string;
};
};
};
responses: {
/** @description The `ssh_key` key in the reply contains the object that was just created */
201: {
content: {
"application/json": {
ssh_key: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Fingerprint of public key
* @example b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f
*/
fingerprint: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Public key
* @example ssh-rsa AAAjjk76kgf...Xt
*/
public_key: string;
};
};
};
};
};
};
};
"/ssh_keys/{id}": {
/**
* Get a SSH key
* @description Returns a specific SSH key object.
*/
get: {
parameters: {
path: {
/** @description ID of the SSH key */
id: number;
};
};
responses: {
/** @description The `ssh_key` key in the reply contains an SSH key object with this structure */
200: {
content: {
"application/json": {
ssh_key: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Fingerprint of public key
* @example b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f
*/
fingerprint: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Public key
* @example ssh-rsa AAAjjk76kgf...Xt
*/
public_key: string;
};
};
};
};
};
};
/**
* Update an SSH key
* @description Updates an SSH key. You can update an SSH key name and an SSH key labels.
*
* Please note that when updating labels, the SSH key current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*/
put: {
parameters: {
path: {
/** @description ID of the SSH key */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description New name Name to set
* @example My ssh key
*/
name?: string;
};
};
};
responses: {
/** @description The `ssh_key` key in the reply contains the modified SSH key object with the new description */
200: {
content: {
"application/json": {
ssh_key: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Fingerprint of public key
* @example b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f
*/
fingerprint: string;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/**
* @description Public key
* @example ssh-rsa AAAjjk76kgf...Xt
*/
public_key: string;
};
};
};
};
};
};
/**
* Delete an SSH key
* @description Deletes an SSH key. It cannot be used anymore.
*/
delete: {
parameters: {
path: {
/** @description ID of the SSH key */
id: number;
};
};
responses: {
/** @description SSH key deleted */
204: {
content: never;
};
};
};
};
"/volumes": {
/**
* Get all Volumes
* @description Gets all existing Volumes that you have available.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. The response will only contain Volumes matching the status. */
status?: "available" | "creating";
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
/** @description Can be used to filter resources by their name. The response will only contain the resources matching the specified name */
name?: string;
/** @description Can be used to filter resources by labels. The response will only contain resources matching the label selector. */
label_selector?: string;
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `volumes` key contains a list of volumes */
200: {
content: {
"application/json": {
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
volumes: ({
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Filesystem of the Volume if formatted on creation, null if not formatted on creation
* @example xfs
*/
format: string | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Device path on the file system for the Volume
* @example /dev/disk/by-id/scsi-0HC_Volume_4711
*/
linux_device: string;
/** @description Location of the Volume. Volume can only be attached to Servers in the same Location. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* Format: int64
* @description ID of the Server the Volume is attached to, null if it is not attached at all
* @example 12
*/
server: number | null;
/**
* @description Size in GB of the Volume
* @example 42
*/
size: number;
/**
* @description Current status of the Volume
* @example available
* @enum {string}
*/
status: "creating" | "available";
})[];
};
};
};
};
};
/**
* Create a Volume
* @description Creates a new Volume attached to a Server. If you want to create a Volume that is not attached to a Server, you need to provide the `location` key instead of `server`. This can be either the ID or the name of the Location this Volume will be created in. Note that a Volume can be attached to a Server only in the same Location as the Volume itself.
*
* Specifying the Server during Volume creation will automatically attach the Volume to that Server after it has been initialized. In that case, the `next_actions` key in the response is an array which contains a single `attach_volume` action.
*
* The minimum Volume size is 10GB and the maximum size is 10TB (10240GB).
*
* A volumes name can consist of alphanumeric characters, dashes, underscores, and dots, but has to start and end with an alphanumeric character. The total length is limited to 64 characters. Volume names must be unique per Project.
*
* #### Call specific error codes
*
* | Code | Description |
* |-------------------------------------|-----------------------------------------------------|
* | `no_space_left_in_location` | There is no volume space left in the given location |
*/
post: {
requestBody?: {
content: {
/**
* @example {
* "automount": false,
* "format": "xfs",
* "labels": {
* "labelkey": "value"
* },
* "location": "nbg1",
* "name": "test-database",
* "size": 42
* }
*/
"application/json": {
/**
* @description Auto-mount Volume after attach. `server` must be provided.
* @example false
*/
automount?: boolean;
/**
* @description Format Volume after creation. One of: `xfs`, `ext4`
* @example xfs
*/
format?: string;
/**
* @description User-defined labels (key-value pairs)
* @example {
* "labelkey": "value"
* }
*/
labels?: Record<string, never>;
/**
* @description Location to create the Volume in (can be omitted if Server is specified)
* @example nbg1
*/
location?: string;
/**
* @description Name of the volume
* @example databases-storage
*/
name: string;
/**
* Format: int64
* @description Server to which to attach the Volume once it's created (Volume will be created in the same Location as the server)
*/
server?: number;
/**
* @description Size of the Volume in GB
* @example 42
*/
size: number;
};
};
};
responses: {
/**
* @description The `volume` key contains the Volume that was just created
*
* The `action` key contains the Action tracking Volume creation
*/
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
next_actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
volume: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Filesystem of the Volume if formatted on creation, null if not formatted on creation
* @example xfs
*/
format: string | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Device path on the file system for the Volume
* @example /dev/disk/by-id/scsi-0HC_Volume_4711
*/
linux_device: string;
/** @description Location of the Volume. Volume can only be attached to Servers in the same Location. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* Format: int64
* @description ID of the Server the Volume is attached to, null if it is not attached at all
* @example 12
*/
server: number | null;
/**
* @description Size in GB of the Volume
* @example 42
*/
size: number;
/**
* @description Current status of the Volume
* @example available
* @enum {string}
*/
status: "creating" | "available";
};
};
};
};
};
};
};
"/volumes/actions": {
/**
* Get all Actions
* @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times, the response will contain only Actions with specified IDs. */
id?: number;
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/volumes/actions/{id}": {
/**
* Get an Action
* @description Returns a specific Action object.
*/
get: {
parameters: {
path: {
/** @description ID of the Action. */
id: number;
};
};
responses: {
/** @description The `action` key in the reply has this structure */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/volumes/{id}": {
/**
* Get a Volume
* @description Gets a specific Volume object.
*/
get: {
parameters: {
path: {
/** @description ID of the Volume */
id: number;
};
};
responses: {
/** @description The `volume` key contains the volume */
200: {
content: {
"application/json": {
volume: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Filesystem of the Volume if formatted on creation, null if not formatted on creation
* @example xfs
*/
format: string | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Device path on the file system for the Volume
* @example /dev/disk/by-id/scsi-0HC_Volume_4711
*/
linux_device: string;
/** @description Location of the Volume. Volume can only be attached to Servers in the same Location. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* Format: int64
* @description ID of the Server the Volume is attached to, null if it is not attached at all
* @example 12
*/
server: number | null;
/**
* @description Size in GB of the Volume
* @example 42
*/
size: number;
/**
* @description Current status of the Volume
* @example available
* @enum {string}
*/
status: "creating" | "available";
};
};
};
};
};
};
/**
* Update a Volume
* @description Updates the Volume properties.
*
* Note that when updating labels, the volumes current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
*/
put: {
parameters: {
path: {
/** @description ID of the Volume to update */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/** @description User-defined labels (key-value pairs) */
labels?: {
/** @example value */
labelkey?: string;
};
/**
* @description New Volume name
* @example database-storage
*/
name?: string;
};
};
};
responses: {
/** @description The `volume` key contains the updated volume */
200: {
content: {
"application/json": {
volume: {
/**
* @description Point in time when the Resource was created (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
created: string;
/**
* @description Filesystem of the Volume if formatted on creation, null if not formatted on creation
* @example xfs
*/
format: string | null;
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/** @description User-defined labels (key-value pairs) */
labels: {
[key: string]: string;
};
/**
* @description Device path on the file system for the Volume
* @example /dev/disk/by-id/scsi-0HC_Volume_4711
*/
linux_device: string;
/** @description Location of the Volume. Volume can only be attached to Servers in the same Location. */
location: {
/**
* @description City the Location is closest to
* @example Falkenstein
*/
city: string;
/**
* @description ISO 3166-1 alpha-2 code of the country the Location resides in
* @example DE
*/
country: string;
/**
* @description Description of the Location
* @example Falkenstein DC Park 1
*/
description: string;
/**
* Format: int64
* @description ID of the Location
* @example 1
*/
id: number;
/**
* Format: double
* @description Latitude of the city closest to the Location
* @example 50.47612
*/
latitude: number;
/**
* Format: double
* @description Longitude of the city closest to the Location
* @example 12.370071
*/
longitude: number;
/**
* @description Unique identifier of the Location
* @example fsn1
*/
name: string;
/**
* @description Name of network zone this Location resides in
* @example eu-central
*/
network_zone: string;
};
/**
* @description Name of the Resource. Must be unique per Project.
* @example my-resource
*/
name: string;
/** @description Protection configuration for the Resource */
protection: {
/**
* @description If true, prevents the Resource from being deleted
* @example false
*/
delete: boolean;
};
/**
* Format: int64
* @description ID of the Server the Volume is attached to, null if it is not attached at all
* @example 12
*/
server: number | null;
/**
* @description Size in GB of the Volume
* @example 42
*/
size: number;
/**
* @description Current status of the Volume
* @example available
* @enum {string}
*/
status: "creating" | "available";
};
};
};
};
};
};
/**
* Delete a Volume
* @description Deletes a volume. All Volume data is irreversibly destroyed. The Volume must not be attached to a Server and it must not have delete protection enabled.
*/
delete: {
parameters: {
path: {
/** @description ID of the Volume */
id: number;
};
};
responses: {
/** @description Volume deleted */
204: {
content: never;
};
};
};
};
"/volumes/{id}/actions": {
/**
* Get all Actions for a Volume
* @description Returns all Action objects for a Volume. You can `sort` the results by using the sort URI parameter, and filter them with the `status` parameter.
*/
get: {
parameters: {
query?: {
/** @description Can be used multiple times. */
sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
/** @description Can be used multiple times, the response will contain only Actions with specified statuses */
status?: "running" | "success" | "error";
/** @description Page to load. */
page?: number;
/** @description Items to load per page. */
per_page?: number;
};
path: {
/** @description ID of the Volume */
id: number;
};
};
responses: {
/** @description The `actions` key contains a list of Actions */
200: {
content: {
"application/json": {
actions: ({
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
})[];
meta?: {
pagination: {
/**
* Format: int64
* @description ID of the last page available. Can be null if the current page is the last one.
* @example 4
*/
last_page: number | null;
/**
* Format: int64
* @description ID of the next page. Can be null if the current page is the last one.
* @example 4
*/
next_page: number | null;
/**
* Format: int64
* @description Current page number
* @example 3
*/
page: number;
/**
* Format: int64
* @description Maximum number of items shown per page in the response
* @example 25
*/
per_page: number;
/**
* Format: int64
* @description ID of the previous page. Can be null if the current page is the first one.
* @example 2
*/
previous_page: number | null;
/**
* Format: int64
* @description The total number of entries that exist in the database for this query. Nullable if unknown.
* @example 100
*/
total_entries: number | null;
};
};
};
};
};
};
};
};
"/volumes/{id}/actions/attach": {
/**
* Attach Volume to a Server
* @description Attaches a Volume to a Server. Works only if the Server is in the same Location as the Volume.
*/
post: {
parameters: {
path: {
/** @description ID of the Volume */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description Auto-mount the Volume after attaching it
* @example false
*/
automount?: boolean;
/**
* Format: int64
* @description ID of the Server the Volume will be attached to
* @example 43
*/
server: number;
};
};
};
responses: {
/** @description The `action` key contains the `attach_volume` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/volumes/{id}/actions/change_protection": {
/**
* Change Volume Protection
* @description Changes the protection configuration of a Volume.
*/
post: {
parameters: {
path: {
/** @description ID of the Volume */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description If true, prevents the Volume from being deleted
* @example true
*/
delete?: boolean;
};
};
};
responses: {
/** @description The `action` key contains the `change_protection` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/volumes/{id}/actions/detach": {
/**
* Detach Volume
* @description Detaches a Volume from the Server its attached to. You may attach it to a Server again at a later time.
*/
post: {
parameters: {
path: {
/** @description ID of the Volume */
id: number;
};
};
responses: {
/** @description The `action` key contains the `detach_volume` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/volumes/{id}/actions/resize": {
/**
* Resize Volume
* @description Changes the size of a Volume. Note that downsizing a Volume is not possible.
*/
post: {
parameters: {
path: {
/** @description ID of the Volume */
id: number;
};
};
requestBody?: {
content: {
"application/json": {
/**
* @description New Volume size in GB (must be greater than current size)
* @example 50
*/
size: number;
};
};
};
responses: {
/** @description The `action` key contains the `resize_volume` Action */
201: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
"/volumes/{id}/actions/{action_id}": {
/**
* Get an Action for a Volume
* @description Returns a specific Action for a Volume.
*/
get: {
parameters: {
path: {
/** @description ID of the Volume */
id: number;
/** @description ID of the Action */
action_id: number;
};
};
responses: {
/** @description The `action` key contains the Volume Action */
200: {
content: {
"application/json": {
/** Action */
action: {
/**
* @description Command executed in the Action
* @example start_resource
*/
command: string;
/** @description Error message for the Action if error occurred, otherwise null */
error: {
/**
* @description Fixed machine readable code
* @example action_failed
*/
code: string;
/**
* @description Humanized error message
* @example Action failed
*/
message: string;
} | null;
/**
* @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null.
* @example 2016-01-30T23:55:00+00:00
*/
finished: string | null;
/**
* Action ID
* Format: int64
* @description ID of the Action. Limited to 52 bits to ensure compatability with JSON double precision floats.
* @example 42
*/
id: number;
/**
* Format: int32
* @description Progress of Action in percent
* @example 100
*/
progress: number;
/** @description Resources the Action relates to */
resources: {
/**
* Format: int64
* @description ID of the Resource
* @example 42
*/
id: number;
/**
* @description Type of resource referenced
* @example server
*/
type: string;
}[];
/**
* @description Point in time when the Action was started (in ISO-8601 format)
* @example 2016-01-30T23:55:00+00:00
*/
started: string;
/**
* @description Status of the Action
* @enum {string}
*/
status: "success" | "running" | "error";
};
};
};
};
};
};
};
}
export type webhooks = Record<string, never>;
export interface components {
schemas: never;
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
}
export type $defs = Record<string, never>;
export type external = Record<string, never>;
export type operations = Record<string, never>;