DataPacket GraphQL API
DataPacket API is built using GraphQL, a query language for fetching application data in a uniform way.
- It is a powerful alternative to REST and other API standards.
- The API is defined by a strongly typed GraphQL schema.
The schema is available for introspection at https://api.datapacket.com/v0/graphql.
To use the API, you must create your API token first. There are two types of tokens: read-only and full-access. Head to the Security page of the client panel, click the Add API key
button, and name the new token. Make sure to also copy the token to a safe place, you won't be able to see it again.
DataPacket's GraphQL endpoint is: https://api.datapacket.com/v0/graphql
API Endpoint
https://api.datapacket.com/v0/graphql
Headers
# Your API token generated in the client panel. Must be included in all API calls.
Authorization: Bearer your-api-key
Changelog
July 22, 2024: servers
query changes
Field changes
- The
status
field has been deprecated and replaced with a new field calledstatusV2
. ThestatusV2
field provides a more accurate representation of the server’s production status.
Input argument changes
-
The field changes are also reflected in the input arguments. The
serverStatus_in
filter has been deprecated, and it is recommended to use the newserverStatusV2_in
filter for filtering based on the server’s status. -
The
tags_each
input argument has been renamed totag_value
. The oldtags_each
argument name has been deprecated. -
A new argument called
tag_key
has been introduced to filter based on tag keys.
How to use GraphQL
To get an introduction to GraphQL, you can use the official documentation, or learn with the How to GraphQL tutorials.
GraphQL requests can be sent via HTTP POST or HTTP GET requests. POST
requests sent with the Content-Type
header application/json
must have a POST body in the following JSON format:
{
"query": "...",
"variables": { "myVariable": "someValue", ... }
}
GET
requests must be sent in the following format. The query
and variables
are sent as URL-encoded query parameters in the URL.
https://api.datapacket.com/v0/graphql?query={...}&variables={...}
In either request method (POST or GET), only a query is required. variables
is only required if the query contains GraphQL variables.
There are many GraphQL clients available for different platforms.
The easiest way to start (but not the most convenient) is to use cURL
. For example, you can use the following command to get your account information:
curl -X POST 'https://api.datapacket.com/v0/graphql' \
-H 'Authorization: Bearer your-api-key' \
-H 'Content-Type: application/json' \
-d '{"query":"query account { account { name email } }"}'
Queries and Mutations
GraphQL requests are of two types: queries and mutations.
Queries are read-only and do not change the system's state. Only requested query fields are returned in the response. Fields ending with !
are non-nullable. If the field is not available, the query will fail. The response is a JSON object and the requested data is returned in the data
field.
Mutations are used to change data and must be sent via POST
request.
You can send multiple queries and mutations in a single request. They will be executed in the order they are specified in the request.
Input variables
Use variables to pass arguments to a query or mutation. Define variables in the request body and reference them in the query or mutation. Fields suffixed with !
are required.
For example, the performServerPowerAction
mutation requires the server
and status
fields. To turn the DP-12345
server on, you can use the following query:
curl -X POST 'https://api.datapacket.com/v0/graphql' \
-H 'Authorization: Bearer your-api-key' \
-H 'Content-Type: application/json' \
-d '{
"query":"mutation performServerPowerAction($input: PerformServerPowerActionInput!) { performServerPowerAction(input: $input) { server { name } } }",
"variables": { "input": { "server": { "name": "DP-12345" }, "action": "ON" } }
}'
The logical relation between input parameters for filtering is always AND
. When specifying more than one value for a filter parameter ending with *_in
, the values in the array have the OR
relation.
For example, to get IPMI IP addresses of all your servers in London or Amsterdam with power status ON, you would call the following query:
curl -X POST 'https://api.datapacket.com/v0/graphql' \
-H 'Authorization: Bearer your-api-key' \
-H 'Content-Type: application/json' \
-d '{
"query":"query servers($input: PaginatedServersInput) { servers(input: $input) { entriesTotalCount currentPageIndex entries { name network { ipmi { ip } } } } }",
"variables": { "input": { "pageIndex": 0, "pageSize": 20, "filter": { "location_in": ["London", "Amsterdam"], "powerStatus_in": ["ON"] } } }
}'
Error Handling
Queries and mutations can return errors. If an error occurs, the response will contain an errors
field with a list of errors. Each error has a message
field with a human-readable error message and a code
field with an error code. List of error codes can be found in the Error section.
Errors typically return HTTP status code 200
. Malformed requests will also return an errors
field along with HTTP status code 400
.
GraphQL errors are returned in the following format:
{
"errors": [
{
"message": "Error message",
"extensions": {
"code": "ERROR_CODE"
}
}
]
}
Pagination
All results are paginated. You can specify the number of results per page and the page number using pageSize
and pageIndex
input variables. The maximum number of results per page is 50. The total number of results is returned in the entriesTotalCount
field.
Queries
account
This query provides basic information about your account such as name
, email
, hostname
template and when the account was created.
Response
Returns an Account!
Example
Query
query Account {
account {
name
email
hostname
createdAt
}
}
Response
{
"data": {
"account": {
"name": "Peter Marlowe",
"email": "peter.marlowe@changi.sg",
"hostname": "petermarlowe",
"createdAt": "2024-09-12T11:49:48.719Z"
}
}
}
instantDeliveryServer
Provides information about single in-stock server identified by it's name.
Response
Returns an InstantDeliveryServer!
Arguments
Name | Description |
---|---|
input — InstantDeliveryServerInput!
|
Example
Query
query InstantDeliveryServer($input: InstantDeliveryServerInput!) {
instantDeliveryServer(input: $input) {
name
location {
name
region
short
}
uplinkCapacity
hardware {
cpus {
count
name
}
hdds {
count
storage {
...StorageFragment
}
}
rams {
count
size
}
}
}
}
Variables
{"input": InstantDeliveryServerInput}
Response
{
"data": {
"instantDeliveryServer": {
"name": "DP-12345",
"location": Location,
"uplinkCapacity": 40,
"hardware": Hardware
}
}
}
instantDeliveryServers
List of all in-stock servers available for instant delivery.
You can look up servers by location, region, or hardware configuration.
Response
Returns a PaginatedInstantDeliveryServerResponse!
Arguments
Name | Description |
---|---|
input — PaginatedInstantDeliveryServersInput
|
Example
Query
query InstantDeliveryServers($input: PaginatedInstantDeliveryServersInput) {
instantDeliveryServers(input: $input) {
entriesTotalCount
pageCount
currentPageIndex
pageSize
nextPageIndex
previousPageIndex
isLastPage
isFirstPage
entries {
name
location {
name
region
short
}
uplinkCapacity
hardware {
cpus {
...CpuFragment
}
hdds {
...HddFragment
}
rams {
...RamFragment
}
}
}
}
}
Variables
{"input": PaginatedInstantDeliveryServersInput}
Response
{
"data": {
"instantDeliveryServers": {
"entriesTotalCount": 1089,
"pageCount": 55,
"currentPageIndex": 1,
"pageSize": 50,
"nextPageIndex": 2,
"previousPageIndex": 0,
"isLastPage": false,
"isFirstPage": false,
"entries": [InstantDeliveryServer]
}
}
}
invoice
Invoice query provides information about a single invoice in your account. Use InvoiceInput
to specify invoice number.
Response
Returns an Invoice!
Arguments
Name | Description |
---|---|
input — InvoiceInput!
|
Example
Query
query Invoice($input: InvoiceInput!) {
invoice(input: $input) {
invoiceNumber
subscription {
name
type
subtotal
currency
billingCycle {
unit
quantity
start
}
createdAt
subscriptionItems {
description
price
currency
type
subscriptionItemDetail {
...SubscriptionItemDetailFragment
}
}
invoices {
invoiceNumber
subscription {
...SubscriptionFragment
}
period {
...PeriodFragment
}
payment {
...PaymentFragment
}
invoiceItems {
...InvoiceItemFragment
}
subtotal
total
totalVat
currency
createdAt
dueDate
invoiceType
}
}
period {
from
to
}
payment {
status
paidOn
method
}
invoiceItems {
description
quantity
unitPrice
amount
vatPercent
currency
type
}
subtotal
total
totalVat
currency
createdAt
dueDate
invoiceType
}
}
Variables
{"input": InvoiceInput}
Response
{
"data": {
"invoice": {
"invoiceNumber": "DP000123",
"subscription": Subscription,
"period": Period,
"payment": Payment,
"invoiceItems": [InvoiceItem],
"subtotal": 100,
"total": 121,
"totalVat": 21,
"currency": "USD",
"createdAt": "2024-03-12T11:49:48.719Z",
"dueDate": "2024-03-12T11:49:48.719Z",
"invoiceType": "DRAFT"
}
}
}
invoices
Invoices query provides information about invoices in your account.
Response
Returns a PaginatedInvoiceResponse!
Arguments
Name | Description |
---|---|
input — PaginatedInvoicesInput
|
Example
Query
query Invoices($input: PaginatedInvoicesInput) {
invoices(input: $input) {
entriesTotalCount
pageCount
currentPageIndex
pageSize
nextPageIndex
previousPageIndex
isLastPage
isFirstPage
entries {
invoiceNumber
subscription {
name
type
subtotal
currency
billingCycle {
...BillingCycleFragment
}
createdAt
subscriptionItems {
...SubscriptionItemFragment
}
invoices {
...InvoiceFragment
}
}
period {
from
to
}
payment {
status
paidOn
method
}
invoiceItems {
description
quantity
unitPrice
amount
vatPercent
currency
type
}
subtotal
total
totalVat
currency
createdAt
dueDate
invoiceType
}
}
}
Variables
{"input": PaginatedInvoicesInput}
Response
{
"data": {
"invoices": {
"entriesTotalCount": 1089,
"pageCount": 55,
"currentPageIndex": 1,
"pageSize": 50,
"nextPageIndex": 2,
"previousPageIndex": 0,
"isLastPage": false,
"isFirstPage": false,
"entries": [Invoice]
}
}
}
reverseDnsRecord
Arguments
Name | Description |
---|---|
input — ReverseDnsRecordInput!
|
Example
Query
query ReverseDnsRecord($input: ReverseDnsRecordInput!) {
reverseDnsRecord(input: $input) {
ip {
isPrimary
isBgpPrefix
type
netMask
gateway
network
broadcast
ip
cidr
}
hostname
}
}
Variables
{"input": ReverseDnsRecordInput}
Response
{
"data": {
"reverseDnsRecord": {
"ip": IpAddress,
"hostname": "example.com."
}
}
}
server
Server query provides information about a single server in your account. You can query name and location of the server, its power status, IPMI IP, its network settings and more. Use ServerInput
to specify server's name, alias, IP or IPMI IP.
Response
Returns a Server!
Arguments
Name | Description |
---|---|
input — ServerInput!
|
Example
Query
query Server($input: ServerInput!) {
server(input: $input) {
name
alias
hostname
location {
name
region
short
}
uptime
powerStatus
status
statusV2
network {
ipAddresses {
isPrimary
isBgpPrefix
type
netMask
gateway
network
broadcast
ip
cidr
}
ddosShieldLevel
ipmi {
ip
username
}
hasBgp
uplinkCapacity
}
hardware {
cpus {
count
name
}
hdds {
count
storage {
...StorageFragment
}
}
rams {
count
size
}
}
system {
raid
os {
name
}
}
trafficPlan {
name
}
tags {
key
value
}
billing {
subscriptionItem {
description
price
currency
type
subscriptionItemDetail {
...SubscriptionItemDetailFragment
}
}
}
}
}
Variables
{"input": ServerInput}
Response
{
"data": {
"server": {
"name": "DP-12345",
"alias": "Load Balancer 01",
"hostname": "petermarlowe-45",
"location": "London",
"uptime": 123,
"powerStatus": "ON",
"status": "PROVISIONING",
"statusV2": "WAITING",
"network": Network,
"hardware": Hardware,
"system": System,
"trafficPlan": TrafficPlan,
"tags": [ServerTag],
"billing": Billing
}
}
}
servers
Servers query provides a list of servers in your account.
You can filter by name, location, power status, IPMI IP, IP, alias, etc.
You can also sort results by various attributes.
Response
Returns a PaginatedServerResponse!
Arguments
Name | Description |
---|---|
input — PaginatedServersInput
|
Example
Query
query Servers($input: PaginatedServersInput) {
servers(input: $input) {
entriesTotalCount
pageCount
currentPageIndex
pageSize
nextPageIndex
previousPageIndex
isLastPage
isFirstPage
entries {
name
alias
hostname
location {
name
region
short
}
uptime
powerStatus
status
statusV2
network {
ipAddresses {
...IpAddressFragment
}
ddosShieldLevel
ipmi {
...IpmiFragment
}
hasBgp
uplinkCapacity
}
hardware {
cpus {
...CpuFragment
}
hdds {
...HddFragment
}
rams {
...RamFragment
}
}
system {
raid
os {
...OsFragment
}
}
trafficPlan {
name
}
tags {
key
value
}
billing {
subscriptionItem {
...SubscriptionItemFragment
}
}
}
}
}
Variables
{"input": PaginatedServersInput}
Response
{
"data": {
"servers": {
"entriesTotalCount": 1089,
"pageCount": 55,
"currentPageIndex": 1,
"pageSize": 50,
"nextPageIndex": 2,
"previousPageIndex": 0,
"isLastPage": false,
"isFirstPage": false,
"entries": [Server]
}
}
}
subscription
Subscription query provides basic information about your subscription, including subtotal
, currency
, type
, createdAt
, subscription items, and billing cycle.
Response
Returns a Subscription!
Arguments
Name | Description |
---|---|
input — SubscriptionInput!
|
Example
Query
query Subscription($input: SubscriptionInput!) {
subscription(input: $input) {
name
type
subtotal
currency
billingCycle {
unit
quantity
start
}
createdAt
subscriptionItems {
description
price
currency
type
subscriptionItemDetail {
server {
...ServerFragment
}
trafficPlan {
...TrafficPlanFragment
}
}
}
invoices {
invoiceNumber
subscription {
name
type
subtotal
currency
billingCycle {
...BillingCycleFragment
}
createdAt
subscriptionItems {
...SubscriptionItemFragment
}
invoices {
...InvoiceFragment
}
}
period {
from
to
}
payment {
status
paidOn
method
}
invoiceItems {
description
quantity
unitPrice
amount
vatPercent
currency
type
}
subtotal
total
totalVat
currency
createdAt
dueDate
invoiceType
}
}
}
Variables
{"input": SubscriptionInput}
Response
{
"data": {
"subscription": {
"name": "1",
"type": "PREPAID",
"subtotal": 987.65,
"currency": "USD",
"billingCycle": BillingCycle,
"createdAt": "2024-03-12T11:49:48.719Z",
"subscriptionItems": [SubscriptionItem],
"invoices": [Invoice]
}
}
}
subscriptions
Subscriptions query provides information about subscriptions in your account.
Response
Returns a PaginatedSubscriptionResponse!
Arguments
Name | Description |
---|---|
input — PaginatedSubscriptionsInput
|
Example
Query
query Subscriptions($input: PaginatedSubscriptionsInput) {
subscriptions(input: $input) {
entriesTotalCount
pageCount
currentPageIndex
pageSize
nextPageIndex
previousPageIndex
isLastPage
isFirstPage
entries {
name
type
subtotal
currency
billingCycle {
unit
quantity
start
}
createdAt
subscriptionItems {
description
price
currency
type
subscriptionItemDetail {
...SubscriptionItemDetailFragment
}
}
invoices {
invoiceNumber
subscription {
...SubscriptionFragment
}
period {
...PeriodFragment
}
payment {
...PaymentFragment
}
invoiceItems {
...InvoiceItemFragment
}
subtotal
total
totalVat
currency
createdAt
dueDate
invoiceType
}
}
}
}
Variables
{"input": PaginatedSubscriptionsInput}
Response
{
"data": {
"subscriptions": {
"entriesTotalCount": 1089,
"pageCount": 55,
"currentPageIndex": 1,
"pageSize": 50,
"nextPageIndex": 2,
"previousPageIndex": 0,
"isLastPage": false,
"isFirstPage": false,
"entries": [Subscription]
}
}
}
supportRequest
Arguments
Name | Description |
---|---|
input — SupportRequestInput!
|
Example
Query
query SupportRequest($input: SupportRequestInput!) {
supportRequest(input: $input) {
id
subject
status
createdAt
updatedAt
numberOfReplies
lastReplyAt
fullName
email
category
posts {
id
contents
createdAt
email
fullName
postBy
}
}
}
Variables
{"input": SupportRequestInput}
Response
{
"data": {
"supportRequest": {
"id": 123,
"subject": "RAM upgrade request.",
"status": "OPEN",
"createdAt": "2024-09-12T11:49:48.719Z",
"updatedAt": "2024-03-12T11:49:48.719Z",
"numberOfReplies": 987,
"lastReplyAt": "2024-03-12T11:49:48.719Z",
"fullName": "John Doe",
"email": "example@datapacket.com",
"category": "NEW",
"posts": [Post]
}
}
}
supportRequests
Arguments
Name | Description |
---|---|
input — PaginatedSupportRequestsInput
|
Example
Query
query SupportRequests($input: PaginatedSupportRequestsInput) {
supportRequests(input: $input) {
id
subject
status
createdAt
updatedAt
numberOfReplies
lastReplyAt
fullName
email
category
posts {
id
contents
createdAt
email
fullName
postBy
}
}
}
Variables
{"input": PaginatedSupportRequestsInput}
Response
{
"data": {
"supportRequests": [
{
"id": 123,
"subject": "RAM upgrade request.",
"status": "OPEN",
"createdAt": "2024-09-12T11:49:48.719Z",
"updatedAt": "2024-09-12T11:49:48.719Z",
"numberOfReplies": 123,
"lastReplyAt": "2024-09-12T11:49:48.719Z",
"fullName": "John Doe",
"email": "example@datapacket.com",
"category": "NEW",
"posts": [Post]
}
]
}
}
traffic
Get traffic statistics for a given time period. The statistics are aggregated for all servers in the given time period if no server is specified. If one or more server is specified, the statistics are aggregated for the given servers.
Response
Returns a Traffic!
Arguments
Name | Description |
---|---|
input — TrafficInput!
|
Example
Query
query Traffic($input: TrafficInput!) {
traffic(input: $input) {
aggregated {
statisticsIn {
average
last
p95
sum
maximum
}
statisticsOut {
average
last
p95
sum
maximum
}
}
}
}
Variables
{"input": TrafficInput}
Response
{"data": {"traffic": {"aggregated": AggregatedTraffic}}}
Mutations
changeServerIpmiPassword
This mutation allows you to change IPMI password of a server.
Response
Returns a ChangeServerIpmiPasswordResponse!
Arguments
Name | Description |
---|---|
input — ChangeIpmiPasswordInput!
|
Example
Query
mutation ChangeServerIpmiPassword($input: ChangeIpmiPasswordInput!) {
changeServerIpmiPassword(input: $input) {
server {
name
alias
hostname
location {
name
region
short
}
uptime
powerStatus
status
statusV2
network {
ipAddresses {
...IpAddressFragment
}
ddosShieldLevel
ipmi {
...IpmiFragment
}
hasBgp
uplinkCapacity
}
hardware {
cpus {
...CpuFragment
}
hdds {
...HddFragment
}
rams {
...RamFragment
}
}
system {
raid
os {
...OsFragment
}
}
trafficPlan {
name
}
tags {
key
value
}
billing {
subscriptionItem {
...SubscriptionItemFragment
}
}
}
}
}
Variables
{"input": ChangeIpmiPasswordInput}
Response
{"data": {"changeServerIpmiPassword": {"server": Server}}}
createSupportRequest
Arguments
Name | Description |
---|---|
input — CreateSupportRequestInput!
|
Example
Query
mutation CreateSupportRequest($input: CreateSupportRequestInput!) {
createSupportRequest(input: $input)
}
Variables
{"input": CreateSupportRequestInput}
Response
{"data": {"createSupportRequest": true}}
performServerPowerAction
Perform an IPMI server power action such as power on, power off or reboot. Please note that because IPMI may take a while to respond, this API call is asynchronous. As a result, we cannot guarantee that the requested action will be performed successfully.
Response
Returns a PerformServerPowerActionResponse!
Arguments
Name | Description |
---|---|
input — PerformServerPowerActionInput!
|
Example
Query
mutation PerformServerPowerAction($input: PerformServerPowerActionInput!) {
performServerPowerAction(input: $input) {
server {
name
alias
hostname
location {
name
region
short
}
uptime
powerStatus
status
statusV2
network {
ipAddresses {
...IpAddressFragment
}
ddosShieldLevel
ipmi {
...IpmiFragment
}
hasBgp
uplinkCapacity
}
hardware {
cpus {
...CpuFragment
}
hdds {
...HddFragment
}
rams {
...RamFragment
}
}
system {
raid
os {
...OsFragment
}
}
trafficPlan {
name
}
tags {
key
value
}
billing {
subscriptionItem {
...SubscriptionItemFragment
}
}
}
}
}
Variables
{"input": PerformServerPowerActionInput}
Response
{"data": {"performServerPowerAction": {"server": Server}}}
setReverseDnsRecord
Set a reverse DNS (PTR) record for a given IP. Set hostname to null
to delete the record.
Response
Returns a SetReverseDnsRecordResponse!
Arguments
Name | Description |
---|---|
input — SetReverseDnsRecordInput!
|
Example
Query
mutation SetReverseDnsRecord($input: SetReverseDnsRecordInput!) {
setReverseDnsRecord(input: $input) {
ip {
isPrimary
isBgpPrefix
type
netMask
gateway
network
broadcast
ip
cidr
}
}
}
Variables
{"input": SetReverseDnsRecordInput}
Response
{"data": {"setReverseDnsRecord": {"ip": IpAddress}}}
setServerAlias
Arguments
Name | Description |
---|---|
input — SetServerAliasInput!
|
Example
Query
mutation SetServerAlias($input: SetServerAliasInput!) {
setServerAlias(input: $input) {
server {
name
alias
hostname
location {
name
region
short
}
uptime
powerStatus
status
statusV2
network {
ipAddresses {
...IpAddressFragment
}
ddosShieldLevel
ipmi {
...IpmiFragment
}
hasBgp
uplinkCapacity
}
hardware {
cpus {
...CpuFragment
}
hdds {
...HddFragment
}
rams {
...RamFragment
}
}
system {
raid
os {
...OsFragment
}
}
trafficPlan {
name
}
tags {
key
value
}
billing {
subscriptionItem {
...SubscriptionItemFragment
}
}
}
}
}
Variables
{"input": SetServerAliasInput}
Response
{"data": {"setServerAlias": {"server": Server}}}
setServerBootDevice
Arguments
Name | Description |
---|---|
input — SetServerBootDeviceInput!
|
Example
Query
mutation SetServerBootDevice($input: SetServerBootDeviceInput!) {
setServerBootDevice(input: $input) {
server {
name
alias
hostname
location {
name
region
short
}
uptime
powerStatus
status
statusV2
network {
ipAddresses {
...IpAddressFragment
}
ddosShieldLevel
ipmi {
...IpmiFragment
}
hasBgp
uplinkCapacity
}
hardware {
cpus {
...CpuFragment
}
hdds {
...HddFragment
}
rams {
...RamFragment
}
}
system {
raid
os {
...OsFragment
}
}
trafficPlan {
name
}
tags {
key
value
}
billing {
subscriptionItem {
...SubscriptionItemFragment
}
}
}
}
}
Variables
{"input": SetServerBootDeviceInput}
Response
{"data": {"setServerBootDevice": {"server": Server}}}
setServerPrimaryIp
Arguments
Name | Description |
---|---|
input — SetServerPrimaryIpInput!
|
Example
Query
mutation SetServerPrimaryIp($input: SetServerPrimaryIpInput!) {
setServerPrimaryIp(input: $input) {
server {
name
alias
hostname
location {
name
region
short
}
uptime
powerStatus
status
statusV2
network {
ipAddresses {
...IpAddressFragment
}
ddosShieldLevel
ipmi {
...IpmiFragment
}
hasBgp
uplinkCapacity
}
hardware {
cpus {
...CpuFragment
}
hdds {
...HddFragment
}
rams {
...RamFragment
}
}
system {
raid
os {
...OsFragment
}
}
trafficPlan {
name
}
tags {
key
value
}
billing {
subscriptionItem {
...SubscriptionItemFragment
}
}
}
}
}
Variables
{"input": SetServerPrimaryIpInput}
Response
{"data": {"setServerPrimaryIp": {"server": Server}}}
setServerTag
Update or set a single tag for the server. If the provided value
argument is omitted or null, the tag will be deleted.
Response
Returns a Boolean!
Arguments
Name | Description |
---|---|
input — SetServerTagInput!
|
Example
Query
mutation SetServerTag($input: SetServerTagInput!) {
setServerTag(input: $input)
}
Variables
{"input": SetServerTagInput}
Response
{"data": {"setServerTag": false}}
setServerTags
This mutation sets tags for the server. Tags not provided will be deleted.
Response
Returns a Boolean!
Arguments
Name | Description |
---|---|
input — SetServerTagsInput!
|
Example
Query
mutation SetServerTags($input: SetServerTagsInput!) {
setServerTags(input: $input)
}
Variables
{"input": SetServerTagsInput}
Response
{"data": {"setServerTags": true}}
supportRequestReply
Arguments
Name | Description |
---|---|
input — SupportRequestReplyInput!
|
Example
Query
mutation SupportRequestReply($input: SupportRequestReplyInput!) {
supportRequestReply(input: $input)
}
Variables
{"input": SupportRequestReplyInput}
Response
{"data": {"supportRequestReply": false}}
Type
Account
AggregatedTraffic
Fields
Field Name | Description |
---|---|
statisticsIn — TrafficStatistics
|
Traffic statistics for inbound traffic.
|
statisticsOut — TrafficStatistics
|
Traffic statistics for outbound traffic.
|
Example
{
"statisticsIn": TrafficStatistics,
"statisticsOut": TrafficStatistics
}
Billing
Fields
Field Name | Description |
---|---|
subscriptionItem — SubscriptionItem!
|
Example
{"subscriptionItem": SubscriptionItem}
BillingCycle
Description
Information about subscription billing cycle. Only available for the subscription of the type PREPAID.
Fields
Field Name | Description |
---|---|
unit — BillingIntervalUnit!
|
Currently there are two possible billing interval units:
MONTH or YEAR . |
quantity — Int!
|
The quantity of billed interval units.
|
start — Int!
|
Specifies the numerical day of the month on which the billing cycle starts for the monthly cycle, or the numerical month of the year in which the billing cycle starts for the yearly cycle.
|
Example
{"unit": "MONTH", "quantity": 6, "start": 1}
ChangeServerIpmiPasswordResponse
Fields
Field Name | Description |
---|---|
server — Server!
|
Example
{"server": Server}
Cpu
Hardware
Hdd
InstantDeliveryServer
Example
{
"name": "DP-12345",
"location": Location,
"uplinkCapacity": 40,
"hardware": Hardware
}
Invoice
Fields
Field Name | Description |
---|---|
invoiceNumber — String!
|
The unique invoice number.
|
subscription — Subscription
|
The associated subscription related to the invoice.
|
period — Period!
|
The billing period covered by the invoice.
|
payment — Payment
|
The payment details associated with the invoice.
|
invoiceItems — [InvoiceItem!]!
|
The items included in the invoice.
|
subtotal — Float!
|
The total amount of the invoice, excluding any applicable taxes.
|
total — Float!
|
The total amount of the invoice, including VAT (Value Added Tax).
|
totalVat — Float!
|
The total VAT (Value Added Tax) amount of the invoice.
|
currency — Currency!
|
The currency of the invoice.
|
createdAt — DateTime!
|
The date when the invoice was created.
|
dueDate — DateTime!
|
The due date for the invoice payment.
|
invoiceType — InvoiceType
|
The type of the invoice.
|
Example
{
"invoiceNumber": "DP000123",
"subscription": Subscription,
"period": Period,
"payment": Payment,
"invoiceItems": [InvoiceItem],
"subtotal": 100,
"total": 121,
"totalVat": 21,
"currency": "USD",
"createdAt": "2024-03-12T11:49:48.719Z",
"dueDate": "2024-09-12T11:49:48.719Z",
"invoiceType": "DRAFT"
}
InvoiceItem
Fields
Field Name | Description |
---|---|
description — String!
|
The description of the item on the invoice.
|
quantity — Float!
|
Item quantity.
|
unitPrice — Float!
|
Item unit price.
|
amount — Float!
|
The total price for the item on the invoice, excluding any taxes or fees.
|
vatPercent — Float!
|
The VAT (Value Added Tax) percentage applied to the item.
|
currency — Currency!
|
The currency in which the invoice item is listed.
|
type — InvoiceItemType
|
The type of the invoice item.
|
Example
{
"description": "Item description",
"quantity": 1,
"unitPrice": 100,
"amount": 121,
"vatPercent": 21,
"currency": "USD",
"type": "SERVER"
}
IpAddress
Fields
Field Name | Description |
---|---|
isPrimary — Boolean!
|
True if this IP address is the primary address for the server.
|
isBgpPrefix — Boolean!
|
Whether or not the IP address is a BGP prefix. BGP prefixes are used to route traffic between different networks.
|
type — IpAddressType!
|
The type of IP address.
|
netMask — String
|
The netmask of the IP address. The netmask is used to determine which part of the IP address is the network address and which part is the host address.
|
gateway — String
|
The default gateway for the IP address.
|
network — String
|
The network address of the IP address.
|
broadcast — String
|
The broadcast address of the IP address.
|
ip — String!
|
The IP address itself.
|
cidr — String!
|
The CIDR notation of the IP address. CIDR notation is a more compact way of representing IP addresses and netmasks.
|
Example
{
"isPrimary": true,
"isBgpPrefix": true,
"type": "IPV4",
"netMask": "255.255.255.192",
"gateway": "123.213.231.101",
"network": "123.213.231.100",
"broadcast": "123.213.231.255",
"ip": "123.213.231.132",
"cidr": "123.213.231.132/26"
}
Ipmi
Location
Network
Fields
Field Name | Description |
---|---|
ipAddresses — [IpAddress!]!
|
List of IP addresses assigned to the server.
|
ddosShieldLevel — DdosShieldLevel!
|
DDoS Shield protection setting.
|
ipmi — Ipmi!
|
IPMI (Intelligent Platform Management Interface) information.
|
hasBgp — Boolean
|
Whether the BGP session is estabilished for the server.
|
uplinkCapacity — Int!
|
Overall server uplink capacity in Gbps.
|
Example
{
"ipAddresses": [IpAddress],
"ddosShieldLevel": "VOLUMETRIC",
"ipmi": "10.110.120.130",
"hasBgp": false,
"uplinkCapacity": 40
}
Os
Fields
Field Name | Description |
---|---|
name — String!
|
Name of the operating system.
|
Example
{"name": "Debian 11"}
PaginatedInstantDeliveryServerResponse
Fields
Field Name | Description |
---|---|
entriesTotalCount — Int!
|
Total number of items in the full result set.
|
pageCount — Int!
|
Total number of pages which constitute the full result set.
|
currentPageIndex — Int!
|
Current page index which was returned, the first index is 0.
|
pageSize — Int!
|
Number of items per page.
|
nextPageIndex — Int
|
Index of the next page, when none is available
null . |
previousPageIndex — Int
|
Index of the previous page, first index is 0, if currently on first page, the value will be
null . |
isLastPage — Boolean!
|
Indicates whether this is the last page.
|
isFirstPage — Boolean!
|
Indicates whether this is the first page.
|
entries — [InstantDeliveryServer!]!
|
Resulting paginated items.
|
Example
{
"entriesTotalCount": 1089,
"pageCount": 55,
"currentPageIndex": 1,
"pageSize": 50,
"nextPageIndex": 2,
"previousPageIndex": 0,
"isLastPage": false,
"isFirstPage": false,
"entries": [InstantDeliveryServer]
}
PaginatedInvoiceResponse
Fields
Field Name | Description |
---|---|
entriesTotalCount — Int!
|
Total number of items in the full result set.
|
pageCount — Int!
|
Total number of pages which constitute the full result set.
|
currentPageIndex — Int!
|
Current page index which was returned, the first index is 0.
|
pageSize — Int!
|
Number of items per page.
|
nextPageIndex — Int
|
Index of the next page, when none is available
null . |
previousPageIndex — Int
|
Index of the previous page, first index is 0, if currently on first page, the value will be
null . |
isLastPage — Boolean!
|
Indicates whether this is the last page.
|
isFirstPage — Boolean!
|
Indicates whether this is the first page.
|
entries — [Invoice!]!
|
Resulting paginated items.
|
Example
{
"entriesTotalCount": 1089,
"pageCount": 55,
"currentPageIndex": 1,
"pageSize": 50,
"nextPageIndex": 2,
"previousPageIndex": 0,
"isLastPage": false,
"isFirstPage": false,
"entries": [Invoice]
}
PaginatedServerResponse
Fields
Field Name | Description |
---|---|
entriesTotalCount — Int!
|
Total number of items in the full result set.
|
pageCount — Int!
|
Total number of pages which constitute the full result set.
|
currentPageIndex — Int!
|
Current page index which was returned, the first index is 0.
|
pageSize — Int!
|
Number of items per page.
|
nextPageIndex — Int
|
Index of the next page, when none is available
null . |
previousPageIndex — Int
|
Index of the previous page, first index is 0, if currently on first page, the value will be
null . |
isLastPage — Boolean!
|
Indicates whether this is the last page.
|
isFirstPage — Boolean!
|
Indicates whether this is the first page.
|
entries — [Server!]!
|
Resulting paginated items.
|
Example
{
"entriesTotalCount": 1089,
"pageCount": 55,
"currentPageIndex": 1,
"pageSize": 50,
"nextPageIndex": 2,
"previousPageIndex": 0,
"isLastPage": false,
"isFirstPage": false,
"entries": [Server]
}
PaginatedSubscriptionResponse
Fields
Field Name | Description |
---|---|
entriesTotalCount — Int!
|
Total number of items in the full result set.
|
pageCount — Int!
|
Total number of pages which constitute the full result set.
|
currentPageIndex — Int!
|
Current page index which was returned, the first index is 0.
|
pageSize — Int!
|
Number of items per page.
|
nextPageIndex — Int
|
Index of the next page, when none is available
null . |
previousPageIndex — Int
|
Index of the previous page, first index is 0, if currently on first page, the value will be
null . |
isLastPage — Boolean!
|
Indicates whether this is the last page.
|
isFirstPage — Boolean!
|
Indicates whether this is the first page.
|
entries — [Subscription!]!
|
Resulting paginated items.
|
Example
{
"entriesTotalCount": 1089,
"pageCount": 55,
"currentPageIndex": 1,
"pageSize": 50,
"nextPageIndex": 2,
"previousPageIndex": 0,
"isLastPage": false,
"isFirstPage": false,
"entries": [Subscription]
}
Payment
Description
Information about subscription billing cycle. Only available for the subscription of the type Prepaid.
Fields
Field Name | Description |
---|---|
status — PaymentStatus!
|
Status of the payment.
|
paidOn — DateTime
|
The day on which the payment was made, following the ISO 8601 standard. Null if the payment is not yet made.
|
method — PaymentMethod
|
Provides information about the payment method associated with the payment. Null if the payment is not yet made.
|
Example
{
"status": "PAID",
"paidOn": "2024-03-12T11:49:48.719Z",
"method": "BANK_TRANSFER"
}
PerformServerPowerActionResponse
Fields
Field Name | Description |
---|---|
server — Server!
|
Example
{"server": Server}
Period
Post
Fields
Field Name | Description |
---|---|
id — Int!
|
The integer ID of the post.
|
contents — String!
|
The text contents of the post.
|
createdAt — DateTime!
|
The date the post was created.
|
email — String!
|
The email of the post author.
|
fullName — String!
|
The name of the post author.
|
postBy — SupportRequestPostBy!
|
The author group of the post author, staff or user.
|
Example
{
"id": 987,
"contents": "Server RAM upgrade request, please upgrade the RAM to 1TB.",
"createdAt": "2024-03-12T11:49:48.719Z",
"email": "example@datapacket.com",
"fullName": "John Doe",
"postBy": "USER"
}
Ram
ReverseDnsRecordResponse
Fields
Field Name | Description |
---|---|
ip — IpAddress!
|
IP address of the reverse DNS (PTR) record
|
hostname — String
|
Hostname of the reverse DNS (PTR) record, or
null , when there is no such record. |
Example
{"ip": IpAddress, "hostname": "example.com."}
Server
Fields
Field Name | Description |
---|---|
name — String!
|
Server name is used to uniquely identify each server. Format:
DP-12345 |
alias — String
|
Custom alias for your server. Can be set via setServerAlias or in the client panel.
|
hostname — String
|
|
location — Location!
|
|
uptime — Int!
|
How long your system has been running in days.
|
powerStatus — PowerStatus!
|
|
status — ServerStatus!
|
Use
statusV2 instead. |
statusV2 — ServerStatusV2!
|
|
network — Network!
|
|
hardware — Hardware!
|
|
system — System!
|
|
trafficPlan — TrafficPlan!
|
|
tags — [ServerTag!]!
|
|
billing — Billing!
|
Contains information related to the server subscription, including the price of the server.
|
Example
{
"name": "DP-12345",
"alias": "Load Balancer 01",
"hostname": "petermarlowe-45",
"location": "London",
"uptime": 123,
"powerStatus": "ON",
"status": "PROVISIONING",
"statusV2": "WAITING",
"network": Network,
"hardware": Hardware,
"system": System,
"trafficPlan": TrafficPlan,
"tags": [ServerTag],
"billing": Billing
}
ServerTag
SetReverseDnsRecordResponse
Fields
Field Name | Description |
---|---|
ip — IpAddress!
|
IP address of the reverse DNS (PTR) record
|
Example
{"ip": IpAddress}
SetServerAliasResponse
Fields
Field Name | Description |
---|---|
server — Server!
|
Example
{"server": Server}
SetServerBootDeviceResponse
Fields
Field Name | Description |
---|---|
server — Server!
|
Example
{"server": Server}
SetServerPrimaryIpResponse
Fields
Field Name | Description |
---|---|
server — Server!
|
Example
{"server": Server}
Storage
Fields
Field Name | Description |
---|---|
size — Int!
|
Storage capacity in gigabytes (GB).
|
type — StorageType!
|
Example
{"size": 500, "type": "SSD"}
Subscription
Fields
Field Name | Description |
---|---|
name — String!
|
Unique identifier of the subscription.
|
type — SubscriptionType!
|
The type of subscription. Currently supported:
PREPAID and TRIAL . |
subtotal — Float!
|
The total cost of the subscription items, excluding any applicable taxes.
|
currency — Currency!
|
The currency in which the subscription is priced.
|
billingCycle — BillingCycle
|
Information about subscription billing cycle. Only available for the subscription of the type
PREPAID . |
createdAt — DateTime!
|
The date when the subscription was created.
|
subscriptionItems — [SubscriptionItem!]!
|
The individual items included in the subscription. Only contains recurring items.
|
invoices — [Invoice!]!
|
Invoices associated with the subscription.
|
Example
{
"name": "1",
"type": "PREPAID",
"subtotal": 123.45,
"currency": "USD",
"billingCycle": BillingCycle,
"createdAt": "2024-09-12T11:49:48.719Z",
"subscriptionItems": [SubscriptionItem],
"invoices": [Invoice]
}
SubscriptionItem
Fields
Field Name | Description |
---|---|
description — String
|
A brief description of the subscription item.
|
price — Float!
|
The price of the subscription item excluding any applicable taxes.
|
currency — Currency!
|
The currency in which the subscription item is priced.
|
type — SubscriptionItemType!
|
The type of the subscription item.
|
subscriptionItemDetail — SubscriptionItemDetail!
|
Additional details about the subscription item.
|
Example
{
"description": "Server DP-99999",
"price": 123.45,
"currency": "USD",
"type": "SERVER",
"subscriptionItemDetail": SubscriptionItemDetail
}
SubscriptionItemDetail
Description
Additional details about the subscription item.
Fields
Field Name | Description |
---|---|
server — Server
|
The associated server, if applicable.
|
trafficPlan — TrafficPlan
|
The associated traffic plan, if applicable.
|
Example
{
"server": Server,
"trafficPlan": TrafficPlan
}
SupportRequest
Fields
Field Name | Description |
---|---|
id — Int!
|
The integer ID of the support request.
|
subject — String!
|
The subject of the support request.
|
status — SupportRequestStatus!
|
The status of the support request.
|
createdAt — DateTime!
|
The date the support request was created.
|
updatedAt — DateTime!
|
The date the support request was last updated.
|
numberOfReplies — Int!
|
Number of replies in the request.
|
lastReplyAt — DateTime!
|
The date of the last reply in the request.
|
fullName — String!
|
The name of the support ticket author.
|
email — String!
|
The email of the support request author.
|
category — SupportRequestCategory
|
Category of the support request.
|
posts — [Post!]
|
The messages contained in the support request.
|
Example
{
"id": 987,
"subject": "RAM upgrade request.",
"status": "OPEN",
"createdAt": "2024-03-12T11:49:48.719Z",
"updatedAt": "2024-09-12T11:49:48.719Z",
"numberOfReplies": 123,
"lastReplyAt": "2024-03-12T11:49:48.719Z",
"fullName": "John Doe",
"email": "example@datapacket.com",
"category": "NEW",
"posts": [Post]
}
System
Traffic
Fields
Field Name | Description |
---|---|
aggregated — AggregatedTraffic!
|
Aggregated traffic statistics for selected servers in the given time period.
|
Example
{"aggregated": AggregatedTraffic}
TrafficPlan
Fields
Field Name | Description |
---|---|
name — String
|
Example
{"name": "10 Gbps unmetered"}
TrafficStatistics
Fields
Field Name | Description |
---|---|
average — Float!
|
Average traffic in bits per second.
|
last — Float!
|
Last recorded traffic value in bits per second.
|
p95 — Float!
|
95th percentile traffic value in bits per second.
|
sum — Float!
|
Sum of all traffic values in bits.
|
maximum — Float!
|
Maximum traffic value (peak) in bits.
|
Example
{
"average": 1910853155,
"last": 1791401293,
"p95": 2031241489,
"sum": 165212363832060,
"maximum": 2110948261
}
Input
ChangeIpmiPasswordInput
Description
It is not a security best practice to limit the maximum length of a password, but there are different limits set by individual manufacturers. Therefore, we have to set the maximum length to 16 characters.
Fields
Input Field | Description |
---|---|
server — ServerInput!
|
|
password — String!
|
Minimum 10, maximum 16 characters long, at least one number.
|
Example
{"server": ServerInput, "password": "1234567890abcdef"}
CreateSupportRequestInput
Fields
Input Field | Description |
---|---|
message — String!
|
|
subject — SupportRequestSubject!
|
Subject of the support request.
|
priority — SupportRequestPriority!
|
Priority requested for of the support request.
|
servers — [String!]
|
Unique server identifier. Format:
DP-12345 . |
sources — [String!]
|
Network issues only - Location of the source for the faulty network requests.
|
destinations — [String!]
|
Network issues only - Location of the destination for the faulty network requests.
|
Example
{
"message": "Server cannot connect to Chicago internet exchanges. Please check the network configuration. Further details...",
"subject": "HARDWARE_ISSUE",
"priority": "NORMAL",
"servers": ["DP-12345", "DP-12346"],
"sources": ["Prague", "Chicage"],
"destinations": ["162.151.210.193"]
}
InstantDeliveryServerInput
Fields
Input Field | Description |
---|---|
name — String!
|
Example
{"name": "DP-12345"}
InstantDeliveryServersInput
InvoiceInput
Fields
Input Field | Description |
---|---|
invoiceNumber — String!
|
Unique alpha numeric code identifying invoice.
|
Example
{"invoiceNumber": "DP000123"}
InvoicesInput
Fields
Input Field | Description |
---|---|
invoiceNumber_in — [String!]
|
Array of invoice numbers for filtering.
|
currency_in — [Currency!]
|
Array of supported currencies for filtering.
|
paymentStatus_in — [PaymentStatus!]
|
Array of payment statuses for filtering.
|
Example
{
"invoiceNumber_in": ["DP000123"],
"currency_in": ["USD"],
"paymentStatus_in": ["PAID"]
}
PaginatedInstantDeliveryServersInput
Fields
Input Field | Description |
---|---|
pageIndex — Int
|
First page has pageIndex value
0 . Default = 0 |
pageSize — Int!
|
The maximum number of results per page is
50 . Default = 50 |
filter — InstantDeliveryServersInput
|
Example
{
"pageIndex": 3,
"pageSize": 50,
"filter": InstantDeliveryServersInput
}
PaginatedInvoicesInput
Fields
Input Field | Description |
---|---|
pageIndex — Int
|
First page has pageIndex value
0 . Default = 0 |
pageSize — Int!
|
The maximum number of results per page is
50 . Default = 50 |
filter — InvoicesInput
|
Example
{"pageIndex": 3, "pageSize": 50, "filter": InvoicesInput}
PaginatedServersInput
Fields
Input Field | Description |
---|---|
pageIndex — Int
|
First page has pageIndex value
0 . Default = 0 |
pageSize — Int!
|
The maximum number of results per page is
50 . Default = 50 |
filter — ServersInput
|
Example
{"pageIndex": 3, "pageSize": 50, "filter": ServersInput}
PaginatedSubscriptionsInput
Fields
Input Field | Description |
---|---|
pageIndex — Int
|
First page has pageIndex value
0 . Default = 0 |
pageSize — Int!
|
The maximum number of results per page is
50 . Default = 50 |
filter — SubscriptionsInput
|
Example
{
"pageIndex": 123,
"pageSize": 50,
"filter": SubscriptionsInput
}
PaginatedSupportRequestsInput
Fields
Input Field | Description |
---|---|
pageIndex — Int
|
First page has pageIndex value
0 . Default = 0 |
pageSize — Int!
|
The maximum number of results per page is
50 . Default = 50 |
filter — SupportRequestsInput
|
Example
{
"pageIndex": 123,
"pageSize": 123,
"filter": SupportRequestsInput
}
PerformServerPowerActionInput
Fields
Input Field | Description |
---|---|
action — PowerAction!
|
|
server — ServerInput!
|
Example
{"action": "ON", "server": ServerInput}
ReverseDnsRecordInput
Fields
Input Field | Description |
---|---|
ip — String!
|
IP address for the reverse DNS (PTR) record. Currently only IPv4 addresses are supported.
|
Example
{"ip": "123.213.231.132"}
ServerInput
Fields
Input Field | Description |
---|---|
name — String
|
Unique server identifier. Format:
DP-12345 . |
alias — String
|
Make sure all server aliases are unique, otherwise you will get an error.
|
ip — String
|
One of the IP adresses of the server
|
ipmiIp — String
|
The IPMI IP address
|
tag — ServerTagInput
|
The key-value tag pair which is unique for the server
|
Example
{
"name": "DP-12345",
"alias": "Load Balancer 01",
"ip": "123.213.231.132",
"ipmiIp": "10.110.120.130",
"tag": ServerTagInput
}
ServerTagInput
ServersInput
Fields
Input Field | Description |
---|---|
name_in — [String!]
|
The name of the server.
|
alias_in — [String!]
|
The alias of the server.
|
location_in — [String!]
|
The location of the server.
|
region_in — [String!]
|
The region of the server.
|
serverStatus_in — [ServerStatus!]
|
Use serverStatusV2_in instead.
The status of the server.
|
serverStatusV2_in — [ServerStatusV2!]
|
The status of the server.
|
powerStatus_in — [PowerStatus!]
|
The power status of the server.
|
ip_in — [String!]
|
One of the IP adresses is assigned to the server.
|
ipmiIp_in — [String!]
|
One of the IP adresses is assigned to the server, has to be adressed to IPMI interface.
|
tags_in — [ServerTagInput!]
|
Server has at least one of the tags included here (must match both key and value).
|
tags_each — [ServerTagInput!]
|
Use tag_value condition instead, it's equivalent.
Server has all of the tags included here (must match both key and value).
|
tag_key — [String!]
|
Server has tags listed in this filter.
|
tag_value — [ServerTagInput!]
|
Server has all of the tags included here (must match both key and value).
|
Example
{
"name_in": ["DP-12345"],
"alias_in": ["Load Balancer 01"],
"location_in": ["London"],
"region_in": ["Europe"],
"serverStatus_in": ["PROVISIONING"],
"serverStatusV2_in": ["WAITING"],
"powerStatus_in": ["ON"],
"ip_in": ["123.213.231.132"],
"ipmiIp_in": ["10.110.120.130"],
"tags_in": [ServerTagInput],
"tags_each": [ServerTagInput],
"tag_key": ["env"],
"tag_value": [ServerTagInput]
}
SetReverseDnsRecordInput
Example
{"ip": "123.213.231.132", "hostname": "example.com."}
SetServerAliasInput
Fields
Input Field | Description |
---|---|
alias — String
|
Choose unique value so you can use the alias in
ServerInput . Set to null to remove alias. |
server — ServerInput!
|
Example
{"alias": "Load Balancer 01", "server": ServerInput}
SetServerBootDeviceInput
Fields
Input Field | Description |
---|---|
bootDevice — BootDevice!
|
|
server — ServerInput!
|
Example
{"bootDevice": "DISK", "server": ServerInput}
SetServerPrimaryIpInput
Fields
Input Field | Description |
---|---|
ip — String!
|
|
server — ServerInput!
|
Example
{"ip": "192.168.0.1", "server": ServerInput}
SetServerTagInput
Fields
Input Field | Description |
---|---|
server — ServerInput!
|
The server to set the tag for.
|
key — String!
|
The key of the tag. Can only contain alphanumeric characters, hyphens, underscores and periods. The maximum length is 100 characters.
|
value — String
|
The value of the tag. Maximum length of 150 characters.
|
Example
{
"server": ServerInput,
"key": "env",
"value": "production"
}
SetServerTagsInput
Fields
Input Field | Description |
---|---|
server — ServerInput!
|
The server to set the tags for.
|
tags — [ServerTagInput!]!
|
The tags to set. A server is allowed to have maximum of 10 tags. Note that both key and value are trimmed of whitespace at the start and end.
|
Example
{
"server": ServerInput,
"tags": [ServerTagInput]
}
SubscriptionInput
Fields
Input Field | Description |
---|---|
name — String!
|
Unique alpha numeric code identifying subscription.
|
Example
{"name": "7"}
SubscriptionsInput
Fields
Input Field | Description |
---|---|
name_in — [String!]
|
Array of subscription names for filtering.
|
currency_in — [Currency!]
|
Array of supported currencies for filtering.
|
type_in — [SubscriptionType!]
|
Array of subscription types for filtering.
|
Example
{"name_in": ["7"], "currency_in": ["USD"], "type_in": ["PREPAID"]}
SupportRequestInput
Fields
Input Field | Description |
---|---|
id — Int!
|
The integer ID of the support request.
|
Example
{"id": 987}
SupportRequestReplyInput
SupportRequestsInput
Fields
Input Field | Description |
---|---|
status — SupportRequestStatus
|
Status of the support request.
|
categories_in — [SupportRequestCategory!]
|
Category of the support request.
|
Example
{"status": "OPEN", "categories_in": ["NEW"]}
TrafficInput
Fields
Input Field | Description |
---|---|
from — DateTime!
|
The date from which the traffic should be displayed.
|
to — DateTime!
|
The date to which the traffic should be displayed, must be date after the
to value. |
filter — TrafficServersInput
|
Example
{
"from": "2024-03-12T11:49:48.719Z",
"to": "2024-09-12T11:49:48.719Z",
"filter": TrafficServersInput
}
TrafficServersInput
Example
{
"name_in": ["DP-12345"],
"alias_in": ["Load Balancer 01"],
"location_in": ["London"],
"region_in": ["Europe"],
"ip_in": ["123.213.231.132"],
"ipmiIp_in": ["10.110.120.130"]
}
Enum
BillingIntervalUnit
Description
Specifies the billing interval unit for subscriptions. Currently supported intervals: MONTH
, YEAR
.
Values
Enum Value | Description |
---|---|
|
The billing interval unit for a monthly subscription.
|
|
The billing interval unit for a yearly subscription.
|
Example
"MONTH"
BootDevice
Description
Type of the server boot device.
Values
Enum Value | Description |
---|---|
|
Set boot from BIOS default boot device.
|
|
Set boot from PXE.
|
|
Set boot from BIOS default boot device, request Safe Mode.
|
|
Set boot from diagnostic partition.
|
|
Set boot into BIOS setup.
|
Example
"DISK"
Currency
Description
Supported currencies.
Values
Enum Value | Description |
---|---|
|
United States dollar.
|
|
Pound sterling.
|
|
Euro.
|
Example
"USD"
DdosShieldLevel
Description
Level of protection available for the DDoS Shield.
Values
Enum Value | Description |
---|---|
|
Deployed automatically on our edge routers and detects and filters out DDoS attacks through firewall rules. Efficient against NTP, DNS, Memcached, and other simple amplification attacks.
|
|
Deployed on dedicated anti-DDoS hardware in each data center. It intercepts L4 protocol-based attacks such as TCP SYN floods and filters malicious packets using custom mitigation techniques.
|
|
No DDoS protection.
|
Example
"VOLUMETRIC"
InvoiceItemType
Description
Types of items which can appear on invoice.
Values
Enum Value | Description |
---|---|
|
Regular recurring fee charged for server.
|
|
One time or recurring fee charged for IP address.
|
|
Additional fee which is not covered by other types.
|
|
Discount applied to subscription.
|
|
DDOS protection fee charge.
|
|
Charge for BGP service setup.
|
|
Credit added to subscription to be used in further charges.
|
|
Reccuring price charged for outgoing traffic usage.
|
|
Extra fee, if the traffic usage exceeds the used plan.
|
|
Any other subscription item (not charge) not covered by other types.
|
Example
"SERVER"
InvoiceType
Description
Type of the invoice, the type can change based on further actions.
Values
Enum Value | Description |
---|---|
|
A preliminary payment request, typically issued for services to be rendered in the upcoming billing period. Draft invoices are not intended for tax reporting or compliance purposes.
|
|
An invoice provided to the customer after a service has been provided, used for tax reporting and compliance purposes. Draft invoices are typically converted to tax invoices upon receiving payment for the services rendered.
|
Example
"DRAFT"
IpAddressType
Description
Currently there are two versions of IP addresses in use on the Internet: IPv4 and IPv6.
Values
Enum Value | Description |
---|---|
|
IPv4 address type.
|
|
IPv6 address type.
|
Example
"IPV4"
PaymentMethod
Description
The payment method.
Values
Enum Value | Description |
---|---|
|
Bank transfer.
|
|
Card payment.
|
|
Payment with DP balance.
|
|
PayPal payment.
|
Example
"BANK_TRANSFER"
PaymentStatus
Description
description
Values
Enum Value | Description |
---|---|
|
Payment has been made and received.
|
|
Payment has not been made or received.
|
|
Payment is past due date.
|
Example
"PAID"
PowerAction
Description
IPMI power actions that can be performed on a server. For detailed information, see the IPMI specification.
Values
Enum Value | Description |
---|---|
|
Power on the server.
|
|
Power off the server. WARNING: This command does not initiate a clean shutdown of the operating system prior to powering down the system
|
|
This command will perform a hard reset.
|
|
Initiate a soft-shutdown of OS via ACPI.
|
|
Power cycle involves cutting power to the system for at least one second and then restoring it.
|
Example
"ON"
PowerStatus
Description
Power status of the device.
Values
Enum Value | Description |
---|---|
|
|
|
|
|
Example
"ON"
Raid
Description
RAID stands for redundant array of independent disks. It is a way of storing the same data on multiple hard drives to improve performance and increase data availability.
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
This type of RAID uses striping, which means that data is split across multiple disks and written in parallel. This can improve performance because multiple disks can be accessed at the same time. However, RAID 0 provides no data redundancy, so if one of the disks fails, all data on the array is lost.
|
|
This type of RAID is also known as mirroring. It involves writing the same data to multiple disks, so that if one disk fails, the data can still be accessed from the other disk. This provides improved data availability, but does not improve performance.
|
|
This type of RAID uses striping and parity, which is a method of error checking. Data is striped across multiple disks, and a parity block is also written to each disk. This allows the array to continue functioning even if one of the disks fails, because the missing data can be reconstructed using the parity information. However, writing data to a RAID 5 array can be slower than writing to a single disk.
|
|
This is similar to RAID 5, but it uses double parity, which provides even greater data protection. It can continue functioning even if two disks fail at the same time. However, this comes at the cost of reduced performance.
|
|
This is a combination of RAID 1 and RAID 0. It involves mirroring data across multiple disks, and then striping the mirrored data across even more disks. This provides both improved performance and data availability. However, it requires at least four disks.
|
Example
"OTHER"
ServerStatus
Description
Deprecated in favour of ServerStatusV2.
Information about the server's production status.
Values
Enum Value | Description |
---|---|
|
Use ServerStatusV2.PROVISIONING instead.
Server is being prepared for production. It may include hardware configuration, OS installation, and other tasks.
|
|
Use ServerStatusV2.WAITING instead.
Server is being installed with the OS.
|
|
Use ServerStatusV2.ACTIVE instead.
Server is configured and available for use. Access details were delivered to the customer.
|
|
Use ServerStatusV2.MAINTENANCE instead.
There is a maintenance task in progress such as OS reinstall, hardware replacement or reconfiguration.
|
|
This status is no longer used.
Server is disconnected from the network. This is usually due to unpaid invoices.
|
Example
"PROVISIONING"
ServerStatusV2
Description
Information about the server's production status.
Values
Enum Value | Description |
---|---|
|
Server is waiting for deployment.
|
|
Server is being prepared.
|
|
Server is in maintenance.
|
|
Server is unreachable by our monitoring.
|
|
Server is in production.
|
Example
"WAITING"
StorageType
Description
Type of the storage device.
Values
Enum Value | Description |
---|---|
|
A SSD (Solid State Drive) is a type of storage that uses non-volatile memory to store data. SSDs are faster and more reliable than traditional HDDs, but they are also more expensive.
|
|
An HDD (Hard Disk Drive) is a traditional type of storage that uses spinning disks to store data. HDDs are slower and less reliable than SSDs, but they are also less expensive.
|
|
An NVMe (Non-Volatile Memory Express) is a type of SSD that uses the PCIe interface to connect to the motherboard, rather than the SATA interface used by most SSDs. This allows for faster data transfer speeds.
|
|
A SATADOM (SATA Disk on Module) is a type of SSD that uses the same interface as a traditional HDD, but is much smaller and more durable. It is commonly used in servers that have limited space for storage devices.
|
|
An eMMC (Embedded MultiMediaCard) is a type of SSD that is integrated into a device. They are smaller and less expensive than other types of SSDs, but are also slower and have less storage capacity.
|
Example
"SSD"
SubscriptionItemType
Description
Types of items available for subscription.
Values
Enum Value | Description |
---|---|
|
Regular recurring fee charged for server.
|
|
One time or recurring fee charged for IP address.
|
|
Additional fee which is not covered by other types.
|
|
DDOS protection fee charge.
|
|
Reccuring price charged for outgoing traffic usage.
|
|
Any other subscription item (not charge) not covered by other types.
|
Example
"SERVER"
SubscriptionType
Description
Supported subscription types.
Values
Enum Value | Description |
---|---|
|
Prepaid subscription.
|
|
Trial subscription.
|
Example
"PREPAID"
SupportRequestCategory
Description
Category of the support request.
Values
Enum Value | Description |
---|---|
|
The support request is a new request which has not been assigned category yet.
|
|
The support request is a sales inquiry.
|
|
The support request is a network issue.
|
|
The support request is a technical issue.
|
|
The support request is an abuse report.
|
Example
"NEW"
SupportRequestPostBy
Description
Author group of the post author, staff or user.
Values
Enum Value | Description |
---|---|
|
The post was created by a user.
|
|
The post was created by a DataPacket staff member.
|
Example
"USER"
SupportRequestPriority
Description
Priority requested for of the support request.
Values
Enum Value | Description |
---|---|
|
The support request is to be answered by the following day (within 12-24 hours).
|
|
The support request is to be answered within 2-6 hours.
|
|
The support request is to be answered as soon as possible.
|
Example
"NORMAL"
SupportRequestStatus
Description
Status of the support request.
Values
Enum Value | Description |
---|---|
|
The support request is open.
|
|
The support request is closed and no longer being resolved.
|
Example
"OPEN"
SupportRequestSubject
Description
Subject of the support request.
Values
Enum Value | Description |
---|---|
|
The support request is a hardware issue such as faulty hardware.
|
|
The support request is a hardware issue different from HARDWARE_ISSUE.
|
|
The support request is a network routing issue.
|
|
The support request is a network BGP issue.
|
|
The support request is a network additional IPs issue.
|
|
The support request is a network issue different from NETWORK_ROUTING, NETWORK_BGP, NETWORK_ADDITIONAL_IPS.
|
|
The support request is a sales server order issue.
|
|
The support request is an inquiry about pricing.
|
|
The support request is a sales bandwidth plan issue, such as upgrade or downgrade of server bandwidth plan.
|
|
The support request is a sales issue different from SALES_SERVER_ORDER, SALES_PRICING, SALES_BANDWIDTH_PLAN.
|
|
The support request is a cancellation issue.
|
|
The support request is a sales server upgrade issue, such as RAM or Storage upgrade.
|
Example
"HARDWARE_ISSUE"
Scalar
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
DateTime
Description
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time
format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.This scalar is serialized to a string in ISO 8601 format and parsed from a string in ISO 8601 format.
Example
"2024-09-12T11:49:48.719Z"
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
Error
ErrorCode
Description
List of all possible error codes that can be returned by the API. Error codes are accompanied by an error message. See Error handling section for more information.
Values
Enum Value | Description |
---|---|
|
An error occurred before the GraphQL server could attempt to parse given operation. For example, if the client sends a query with wrong
Content-type , the server would return a BAD_REQUEST error. |
|
Unable to process a request because it failed to validate the data provided in the request against the server's schema. This error typically occurs when the client sends a query or mutation that contains data that is not in the correct format or is missing required fields. For example, if the server's schema specifies that a certain field must be an integer, but the client sends a string value for that field, the server would return a
GRAPHQL_VALIDATION_FAILED error. |
|
Indicates that the server was unable to process a request because the client is not authorized to perform the requested action. This is typically returned when the client has not provided an authentication token or the token is invalid.
|
|
The request is formally valid, but the server can't process it due to internal constraints. For example a password change that doesn't meet the minimum length requirement.
|
|
The server was unable to find the requested resource. For example, if you request a server
DP-999999 , but there is no such server associated with your account, the server would return a NOT_FOUND error. |
|
The server encountered an unexpected condition that prevented it from fulfilling the request. This is a general error code that can be caused by a wide range of issues, such as an unhandled exception or a server-side bug. We are monitoring all issues.
|
|
The reverse DNS management API is currently under maintenance. Please try again in 5 minutes.
|
Example
"BAD_REQUEST"