Service Methods

API for Services

service.cancel()

Cancels a service.

Parameters:name (String) – Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters.
Returns:A dictionary as described in job.status().
Raises :May raise ApiErrorAlreadyInProgress if the service is pending cancellation.

A cancellation invoice may be generated.

SSL Certificates are not supported and can’t be cancelled with this method.

service.info()

Describes the service returning a list of dictionaries.

Parameters:name (String) – Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters.
Returns:A dictionary with the following keys:
name
String: The canonical name of this service. For servers this is also the server name.
status
String: The status of the service as a string e.g. “LIVE”, “ONHOLD”, “CANCELLED”.
nickname
String: The nickname of the service - set by the customer, defaults to “”.
start_date
Date: The start date of the service.
expiry_date
Date: The end date of the service.
renewal_price_amount
Float: The monetary amount for the monthly renewal including VAT.
renewal_price_currency
String: The currency for the renewal, e.g. “GBP”.
renewal_price_vat
Float: The monetary amount for VAT on the monthly renewal.
type
String: The type of this service, e.g. “fullserver”, “miniserver”, etc.
network_zones
List of strings: The names of all the network zones associated to this service (if any). Some services are network zone independent.
data_zone
String: The name of the data zone this service is in (if applicable). Some services that don’t have data at rest are data zone independent and this field will be empty.
service.list()

List all the services for an account.

Parameters:
  • type (String or List, Optional) – Search only for this type of service, by default all services are returned.
  • status (String, Optional) – Status of the service to look for, default ‘LIVE’. Acceptable values: ‘LIVE’, ‘CANCELLED’.
Returns:

a list of dictionaries where each dictionary is as described in service.info().

service.set_nickname()

Updates the service nickname.

Parameters:
  • name (String) – Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters.
  • nickname (String) – New nickname for the service.
Returns:

a dictionary with the following keys:

nickname

String: The new nickname for the service.

This enforces that the nickname must be unique for all the services of the same account.

The nickname must be made up of the characters [A - Z a - z 0 - 9 _ . - ‘]. Any characters not in this range will be deleted. It must be 255 characters or fewer - any extra will be truncated. Any leading or trailing whitespace will be removed.

It must be unique for the services in the account - if not it returns ApiErrorNotUnique.

The nickname set is returned.

Previous topic

Server Status Methods

Next topic

VLAN API Methods

This Page