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 called statusV2. The statusV2 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 new serverStatusV2_in filter for filtering based on the server’s status.

  • The tags_each input argument has been renamed to tag_value. The old tags_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 {
    createdAt
    email
    hostname
    name
  }
}
Response
{
  "data": {
    "account": {
      "createdAt": "2024-11-13T13:43:38.254Z",
      "email": "peter.marlowe@changi.sg",
      "hostname": "petermarlowe",
      "name": "Peter Marlowe"
    }
  }
}

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) {
    hardware {
      cpus {
        count
        name
      }
      hdds {
        count
        storage {
          ...StorageFragment
        }
      }
      rams {
        count
        size
      }
    }
    location {
      name
      region
      short
    }
    name
    uplinkCapacity
  }
}
Variables
{"input": InstantDeliveryServerInput}
Response
{
  "data": {
    "instantDeliveryServer": {
      "hardware": Hardware,
      "location": Location,
      "name": "DP-12345",
      "uplinkCapacity": 40
    }
  }
}

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) {
    currentPageIndex
    entries {
      hardware {
        cpus {
          ...CpuFragment
        }
        hdds {
          ...HddFragment
        }
        rams {
          ...RamFragment
        }
      }
      location {
        name
        region
        short
      }
      name
      uplinkCapacity
    }
    entriesTotalCount
    isFirstPage
    isLastPage
    nextPageIndex
    pageCount
    pageSize
    previousPageIndex
  }
}
Variables
{"input": PaginatedInstantDeliveryServersInput}
Response
{
  "data": {
    "instantDeliveryServers": {
      "currentPageIndex": 1,
      "entries": [InstantDeliveryServer],
      "entriesTotalCount": 1089,
      "isFirstPage": false,
      "isLastPage": false,
      "nextPageIndex": 2,
      "pageCount": 55,
      "pageSize": 50,
      "previousPageIndex": 0
    }
  }
}

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) {
    createdAt
    currency
    dueDate
    invoiceItems {
      amount
      currency
      description
      quantity
      type
      unitPrice
      vatPercent
    }
    invoiceNumber
    invoiceType
    payment {
      method
      paidOn
      status
    }
    period {
      from
      to
    }
    subscription {
      billingCycle {
        quantity
        start
        unit
      }
      createdAt
      currency
      invoices {
        createdAt
        currency
        dueDate
        invoiceItems {
          ...InvoiceItemFragment
        }
        invoiceNumber
        invoiceType
        payment {
          ...PaymentFragment
        }
        period {
          ...PeriodFragment
        }
        subscription {
          ...SubscriptionFragment
        }
        subtotal
        total
        totalVat
      }
      name
      subscriptionItems {
        currency
        description
        price
        subscriptionItemDetail {
          ...SubscriptionItemDetailFragment
        }
        type
      }
      subtotal
      type
    }
    subtotal
    total
    totalVat
  }
}
Variables
{"input": InvoiceInput}
Response
{
  "data": {
    "invoice": {
      "createdAt": "2024-05-13T13:43:38.254Z",
      "currency": "EUR",
      "dueDate": "2024-05-13T13:43:38.254Z",
      "invoiceItems": [InvoiceItem],
      "invoiceNumber": "DP000123",
      "invoiceType": "DRAFT",
      "payment": Payment,
      "period": Period,
      "subscription": Subscription,
      "subtotal": 100,
      "total": 121,
      "totalVat": 21
    }
  }
}

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) {
    currentPageIndex
    entries {
      createdAt
      currency
      dueDate
      invoiceItems {
        amount
        currency
        description
        quantity
        type
        unitPrice
        vatPercent
      }
      invoiceNumber
      invoiceType
      payment {
        method
        paidOn
        status
      }
      period {
        from
        to
      }
      subscription {
        billingCycle {
          ...BillingCycleFragment
        }
        createdAt
        currency
        invoices {
          ...InvoiceFragment
        }
        name
        subscriptionItems {
          ...SubscriptionItemFragment
        }
        subtotal
        type
      }
      subtotal
      total
      totalVat
    }
    entriesTotalCount
    isFirstPage
    isLastPage
    nextPageIndex
    pageCount
    pageSize
    previousPageIndex
  }
}
Variables
{"input": PaginatedInvoicesInput}
Response
{
  "data": {
    "invoices": {
      "currentPageIndex": 1,
      "entries": [Invoice],
      "entriesTotalCount": 1089,
      "isFirstPage": false,
      "isLastPage": false,
      "nextPageIndex": 2,
      "pageCount": 55,
      "pageSize": 50,
      "previousPageIndex": 0
    }
  }
}

reverseDnsRecord

Get a reverse DNS (PTR) record for a given IP

Response

Returns a ReverseDnsRecordResponse!

Arguments
Name Description
input ReverseDnsRecordInput!

Example

Query
query ReverseDnsRecord($input: ReverseDnsRecordInput!) {
  reverseDnsRecord(input: $input) {
    hostname
    ip {
      broadcast
      cidr
      gateway
      ip
      isBgpPrefix
      isPrimary
      netMask
      network
      type
    }
  }
}
Variables
{"input": ReverseDnsRecordInput}
Response
{
  "data": {
    "reverseDnsRecord": {
      "hostname": "example.com.",
      "ip": IpAddress
    }
  }
}

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) {
    alias
    billing {
      subscriptionItem {
        currency
        description
        price
        subscriptionItemDetail {
          ...SubscriptionItemDetailFragment
        }
        type
      }
    }
    hardware {
      cpus {
        count
        name
      }
      hdds {
        count
        storage {
          ...StorageFragment
        }
      }
      rams {
        count
        size
      }
    }
    hostname
    location {
      name
      region
      short
    }
    name
    network {
      ddosShieldLevel
      hasBgp
      ipAddresses {
        broadcast
        cidr
        gateway
        ip
        isBgpPrefix
        isPrimary
        netMask
        network
        type
      }
      ipmi {
        ip
        username
      }
      uplinkCapacity
    }
    powerStatus
    status
    statusV2
    system {
      os {
        name
      }
      raid
    }
    tags {
      key
      value
    }
    trafficPlan {
      name
    }
    uptime
  }
}
Variables
{"input": ServerInput}
Response
{
  "data": {
    "server": {
      "alias": "Load Balancer 01",
      "billing": Billing,
      "hardware": Hardware,
      "hostname": "petermarlowe-45",
      "location": "London",
      "name": "DP-12345",
      "network": Network,
      "powerStatus": "OFF",
      "status": "DISCONNECTED",
      "statusV2": "ACTIVE",
      "system": System,
      "tags": [ServerTag],
      "trafficPlan": TrafficPlan,
      "uptime": 123
    }
  }
}

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) {
    currentPageIndex
    entries {
      alias
      billing {
        subscriptionItem {
          ...SubscriptionItemFragment
        }
      }
      hardware {
        cpus {
          ...CpuFragment
        }
        hdds {
          ...HddFragment
        }
        rams {
          ...RamFragment
        }
      }
      hostname
      location {
        name
        region
        short
      }
      name
      network {
        ddosShieldLevel
        hasBgp
        ipAddresses {
          ...IpAddressFragment
        }
        ipmi {
          ...IpmiFragment
        }
        uplinkCapacity
      }
      powerStatus
      status
      statusV2
      system {
        os {
          ...OsFragment
        }
        raid
      }
      tags {
        key
        value
      }
      trafficPlan {
        name
      }
      uptime
    }
    entriesTotalCount
    isFirstPage
    isLastPage
    nextPageIndex
    pageCount
    pageSize
    previousPageIndex
  }
}
Variables
{"input": PaginatedServersInput}
Response
{
  "data": {
    "servers": {
      "currentPageIndex": 1,
      "entries": [Server],
      "entriesTotalCount": 1089,
      "isFirstPage": false,
      "isLastPage": false,
      "nextPageIndex": 2,
      "pageCount": 55,
      "pageSize": 50,
      "previousPageIndex": 0
    }
  }
}

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) {
    billingCycle {
      quantity
      start
      unit
    }
    createdAt
    currency
    invoices {
      createdAt
      currency
      dueDate
      invoiceItems {
        amount
        currency
        description
        quantity
        type
        unitPrice
        vatPercent
      }
      invoiceNumber
      invoiceType
      payment {
        method
        paidOn
        status
      }
      period {
        from
        to
      }
      subscription {
        billingCycle {
          ...BillingCycleFragment
        }
        createdAt
        currency
        invoices {
          ...InvoiceFragment
        }
        name
        subscriptionItems {
          ...SubscriptionItemFragment
        }
        subtotal
        type
      }
      subtotal
      total
      totalVat
    }
    name
    subscriptionItems {
      currency
      description
      price
      subscriptionItemDetail {
        server {
          ...ServerFragment
        }
        trafficPlan {
          ...TrafficPlanFragment
        }
      }
      type
    }
    subtotal
    type
  }
}
Variables
{"input": SubscriptionInput}
Response
{
  "data": {
    "subscription": {
      "billingCycle": BillingCycle,
      "createdAt": "2024-11-13T13:43:38.254Z",
      "currency": "EUR",
      "invoices": [Invoice],
      "name": "abc123",
      "subscriptionItems": [SubscriptionItem],
      "subtotal": 987.65,
      "type": "PREPAID"
    }
  }
}

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) {
    currentPageIndex
    entries {
      billingCycle {
        quantity
        start
        unit
      }
      createdAt
      currency
      invoices {
        createdAt
        currency
        dueDate
        invoiceItems {
          ...InvoiceItemFragment
        }
        invoiceNumber
        invoiceType
        payment {
          ...PaymentFragment
        }
        period {
          ...PeriodFragment
        }
        subscription {
          ...SubscriptionFragment
        }
        subtotal
        total
        totalVat
      }
      name
      subscriptionItems {
        currency
        description
        price
        subscriptionItemDetail {
          ...SubscriptionItemDetailFragment
        }
        type
      }
      subtotal
      type
    }
    entriesTotalCount
    isFirstPage
    isLastPage
    nextPageIndex
    pageCount
    pageSize
    previousPageIndex
  }
}
Variables
{"input": PaginatedSubscriptionsInput}
Response
{
  "data": {
    "subscriptions": {
      "currentPageIndex": 1,
      "entries": [Subscription],
      "entriesTotalCount": 1089,
      "isFirstPage": false,
      "isLastPage": false,
      "nextPageIndex": 2,
      "pageCount": 55,
      "pageSize": 50,
      "previousPageIndex": 0
    }
  }
}

supportRequest

Get information about a single support request.

Response

Returns a SupportRequest!

Arguments
Name Description
input SupportRequestInput!

Example

Query
query SupportRequest($input: SupportRequestInput!) {
  supportRequest(input: $input) {
    category
    createdAt
    email
    fullName
    id
    lastReplyAt
    numberOfReplies
    posts {
      contents
      createdAt
      email
      fullName
      id
      postBy
    }
    status
    subject
    updatedAt
  }
}
Variables
{"input": SupportRequestInput}
Response
{
  "data": {
    "supportRequest": {
      "category": "ABUSE_REPORT",
      "createdAt": "2024-11-13T13:43:38.254Z",
      "email": "example@datapacket.com",
      "fullName": "John Doe",
      "id": 123,
      "lastReplyAt": "2024-11-13T13:43:38.254Z",
      "numberOfReplies": 987,
      "posts": [Post],
      "status": "CLOSED",
      "subject": "RAM upgrade request.",
      "updatedAt": "2024-05-13T13:43:38.254Z"
    }
  }
}

supportRequests

Get a list of support requests.

Response

Returns [SupportRequest!]!

Arguments
Name Description
input PaginatedSupportRequestsInput

Example

Query
query SupportRequests($input: PaginatedSupportRequestsInput) {
  supportRequests(input: $input) {
    category
    createdAt
    email
    fullName
    id
    lastReplyAt
    numberOfReplies
    posts {
      contents
      createdAt
      email
      fullName
      id
      postBy
    }
    status
    subject
    updatedAt
  }
}
Variables
{"input": PaginatedSupportRequestsInput}
Response
{
  "data": {
    "supportRequests": [
      {
        "category": "ABUSE_REPORT",
        "createdAt": "2024-11-13T13:43:38.254Z",
        "email": "example@datapacket.com",
        "fullName": "John Doe",
        "id": 123,
        "lastReplyAt": "2024-11-13T13:43:38.254Z",
        "numberOfReplies": 987,
        "posts": [Post],
        "status": "CLOSED",
        "subject": "RAM upgrade request.",
        "updatedAt": "2024-05-13T13:43:38.254Z"
      }
    ]
  }
}

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
        maximum
        p95
        sum
      }
      statisticsOut {
        average
        last
        maximum
        p95
        sum
      }
    }
  }
}
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 {
      alias
      billing {
        subscriptionItem {
          ...SubscriptionItemFragment
        }
      }
      hardware {
        cpus {
          ...CpuFragment
        }
        hdds {
          ...HddFragment
        }
        rams {
          ...RamFragment
        }
      }
      hostname
      location {
        name
        region
        short
      }
      name
      network {
        ddosShieldLevel
        hasBgp
        ipAddresses {
          ...IpAddressFragment
        }
        ipmi {
          ...IpmiFragment
        }
        uplinkCapacity
      }
      powerStatus
      status
      statusV2
      system {
        os {
          ...OsFragment
        }
        raid
      }
      tags {
        key
        value
      }
      trafficPlan {
        name
      }
      uptime
    }
  }
}
Variables
{"input": ChangeIpmiPasswordInput}
Response
{"data": {"changeServerIpmiPassword": {"server": Server}}}

createSupportRequest

Create a new support request.

Response

Returns a Boolean!

Arguments
Name Description
input CreateSupportRequestInput!

Example

Query
mutation CreateSupportRequest($input: CreateSupportRequestInput!) {
  createSupportRequest(input: $input)
}
Variables
{"input": CreateSupportRequestInput}
Response
{"data": {"createSupportRequest": false}}

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 {
      alias
      billing {
        subscriptionItem {
          ...SubscriptionItemFragment
        }
      }
      hardware {
        cpus {
          ...CpuFragment
        }
        hdds {
          ...HddFragment
        }
        rams {
          ...RamFragment
        }
      }
      hostname
      location {
        name
        region
        short
      }
      name
      network {
        ddosShieldLevel
        hasBgp
        ipAddresses {
          ...IpAddressFragment
        }
        ipmi {
          ...IpmiFragment
        }
        uplinkCapacity
      }
      powerStatus
      status
      statusV2
      system {
        os {
          ...OsFragment
        }
        raid
      }
      tags {
        key
        value
      }
      trafficPlan {
        name
      }
      uptime
    }
  }
}
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 {
      broadcast
      cidr
      gateway
      ip
      isBgpPrefix
      isPrimary
      netMask
      network
      type
    }
  }
}
Variables
{"input": SetReverseDnsRecordInput}
Response
{"data": {"setReverseDnsRecord": {"ip": IpAddress}}}

setServerAlias

Set custom alias for your server.

Response

Returns a SetServerAliasResponse!

Arguments
Name Description
input SetServerAliasInput!

Example

Query
mutation SetServerAlias($input: SetServerAliasInput!) {
  setServerAlias(input: $input) {
    server {
      alias
      billing {
        subscriptionItem {
          ...SubscriptionItemFragment
        }
      }
      hardware {
        cpus {
          ...CpuFragment
        }
        hdds {
          ...HddFragment
        }
        rams {
          ...RamFragment
        }
      }
      hostname
      location {
        name
        region
        short
      }
      name
      network {
        ddosShieldLevel
        hasBgp
        ipAddresses {
          ...IpAddressFragment
        }
        ipmi {
          ...IpmiFragment
        }
        uplinkCapacity
      }
      powerStatus
      status
      statusV2
      system {
        os {
          ...OsFragment
        }
        raid
      }
      tags {
        key
        value
      }
      trafficPlan {
        name
      }
      uptime
    }
  }
}
Variables
{"input": SetServerAliasInput}
Response
{"data": {"setServerAlias": {"server": Server}}}

setServerBootDevice

Sets a boot device for server via IPMI.

Response

Returns a SetServerBootDeviceResponse!

Arguments
Name Description
input SetServerBootDeviceInput!

Example

Query
mutation SetServerBootDevice($input: SetServerBootDeviceInput!) {
  setServerBootDevice(input: $input) {
    server {
      alias
      billing {
        subscriptionItem {
          ...SubscriptionItemFragment
        }
      }
      hardware {
        cpus {
          ...CpuFragment
        }
        hdds {
          ...HddFragment
        }
        rams {
          ...RamFragment
        }
      }
      hostname
      location {
        name
        region
        short
      }
      name
      network {
        ddosShieldLevel
        hasBgp
        ipAddresses {
          ...IpAddressFragment
        }
        ipmi {
          ...IpmiFragment
        }
        uplinkCapacity
      }
      powerStatus
      status
      statusV2
      system {
        os {
          ...OsFragment
        }
        raid
      }
      tags {
        key
        value
      }
      trafficPlan {
        name
      }
      uptime
    }
  }
}
Variables
{"input": SetServerBootDeviceInput}
Response
{"data": {"setServerBootDevice": {"server": Server}}}

setServerPrimaryIp

Set primary IP to your server.

Response

Returns a SetServerPrimaryIpResponse!

Arguments
Name Description
input SetServerPrimaryIpInput!

Example

Query
mutation SetServerPrimaryIp($input: SetServerPrimaryIpInput!) {
  setServerPrimaryIp(input: $input) {
    server {
      alias
      billing {
        subscriptionItem {
          ...SubscriptionItemFragment
        }
      }
      hardware {
        cpus {
          ...CpuFragment
        }
        hdds {
          ...HddFragment
        }
        rams {
          ...RamFragment
        }
      }
      hostname
      location {
        name
        region
        short
      }
      name
      network {
        ddosShieldLevel
        hasBgp
        ipAddresses {
          ...IpAddressFragment
        }
        ipmi {
          ...IpmiFragment
        }
        uplinkCapacity
      }
      powerStatus
      status
      statusV2
      system {
        os {
          ...OsFragment
        }
        raid
      }
      tags {
        key
        value
      }
      trafficPlan {
        name
      }
      uptime
    }
  }
}
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": false}}

supportRequestReply

Create reply to an existing support request.

Response

Returns a Boolean!

Arguments
Name Description
input SupportRequestReplyInput!

Example

Query
mutation SupportRequestReply($input: SupportRequestReplyInput!) {
  supportRequestReply(input: $input)
}
Variables
{"input": SupportRequestReplyInput}
Response
{"data": {"supportRequestReply": false}}

Type

Account

Fields
Field Name Description
createdAt DateTime!
email String!
hostname String
name String
Example
{
  "createdAt": "2024-11-13T13:43:38.254Z",
  "email": "peter.marlowe@changi.sg",
  "hostname": "petermarlowe",
  "name": "Peter Marlowe"
}

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
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.
unit BillingIntervalUnit!
Currently there are two possible billing interval units: MONTH or YEAR.
Example
{"quantity": 6, "start": 1, "unit": "MONTH"}

ChangeServerIpmiPasswordResponse

Fields
Field Name Description
server Server!
Example
{"server": Server}

Cpu

Fields
Field Name Description
count Int!
name String!
Example
{"count": 2, "name": "Intel Silver 4316"}

Hardware

Fields
Field Name Description
cpus [Cpu!]!
hdds [Hdd!]!
rams [Ram!]!
Example
{
  "cpus": [Cpu],
  "hdds": [Hdd],
  "rams": [Ram]
}

Hdd

Fields
Field Name Description
count Int!
Number of storage units.
storage Storage!
Example
{"count": 2, "storage": Storage}

InstantDeliveryServer

Fields
Field Name Description
hardware Hardware!
Current hardware configuration of the server.
location Location!
The location of the server.
name String!
The unique identifier of the server.
uplinkCapacity Int!
Overall server uplink capacity in Gbps.
Example
{
  "hardware": Hardware,
  "location": Location,
  "name": "DP-12345",
  "uplinkCapacity": 40
}

Invoice

Fields
Field Name Description
createdAt DateTime!
The date when the invoice was created.
currency Currency!
The currency of the invoice.
dueDate DateTime!
The due date for the invoice payment.
invoiceItems [InvoiceItem!]!
The items included in the invoice.
invoiceNumber String!
The unique invoice number.
invoiceType InvoiceType
The type of the invoice.
payment Payment
The payment details associated with the invoice.
period Period!
The billing period covered by the invoice.
subscription Subscription
The associated subscription related to 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.
Example
{
  "createdAt": "2024-05-13T13:43:38.254Z",
  "currency": "EUR",
  "dueDate": "2024-05-13T13:43:38.254Z",
  "invoiceItems": [InvoiceItem],
  "invoiceNumber": "DP000123",
  "invoiceType": "DRAFT",
  "payment": Payment,
  "period": Period,
  "subscription": Subscription,
  "subtotal": 100,
  "total": 121,
  "totalVat": 21
}

InvoiceItem

Fields
Field Name Description
amount Float!
The total price for the item on the invoice, excluding any taxes or fees.
currency Currency!
The currency in which the invoice item is listed.
description String!
The description of the item on the invoice.
quantity Float!
Item quantity.
type InvoiceItemType
The type of the invoice item.
unitPrice Float!
Item unit price.
vatPercent Float!
The VAT (Value Added Tax) percentage applied to the item.
Example
{
  "amount": 121,
  "currency": "EUR",
  "description": "Item description",
  "quantity": 1,
  "type": "BGP",
  "unitPrice": 100,
  "vatPercent": 21
}

IpAddress

Fields
Field Name Description
broadcast String
The broadcast address of the IP address.
cidr String!
The CIDR notation of the IP address. CIDR notation is a more compact way of representing IP addresses and netmasks.
gateway String
The default gateway for the IP address.
ip String!
The IP address itself.
isBgpPrefix Boolean!
Whether or not the IP address is a BGP prefix. BGP prefixes are used to route traffic between different networks.
isPrimary Boolean!
True if this IP address is the primary address for the server.
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.
network String
The network address of the IP address.
type IpAddressType!
The type of IP address.
Example
{
  "broadcast": "123.213.231.255",
  "cidr": "123.213.231.132/26",
  "gateway": "123.213.231.101",
  "ip": "123.213.231.132",
  "isBgpPrefix": true,
  "isPrimary": true,
  "netMask": "255.255.255.192",
  "network": "123.213.231.100",
  "type": "IPV4"
}

Ipmi

Fields
Field Name Description
ip String
IPMI IP address.
username String
IPMI username.
Example
{"ip": "10.110.120.130", "username": "admin"}

Location

Fields
Field Name Description
name String!
Location name.
region String!
Location region.
short String!
Location short name.
Example
{"name": "London", "region": "Europe", "short": "LON"}

Network

Fields
Field Name Description
ddosShieldLevel DdosShieldLevel!
DDoS Shield protection setting.
hasBgp Boolean
Whether the BGP session is estabilished for the server.
ipAddresses [IpAddress!]!
List of IP addresses assigned to the server.
ipmi Ipmi!
IPMI (Intelligent Platform Management Interface) information.
uplinkCapacity Int!
Overall server uplink capacity in Gbps.
Example
{
  "ddosShieldLevel": "FULL",
  "hasBgp": false,
  "ipAddresses": [IpAddress],
  "ipmi": "10.110.120.130",
  "uplinkCapacity": 40
}

Os

Fields
Field Name Description
name String!
Name of the operating system.
Example
{"name": "Debian 11"}

PaginatedInstantDeliveryServerResponse

Fields
Field Name Description
currentPageIndex Int!
Current page index which was returned, the first index is 0.
entries [InstantDeliveryServer!]!
Resulting paginated items.
entriesTotalCount Int!
Total number of items in the full result set.
isFirstPage Boolean!
Indicates whether this is the first page.
isLastPage Boolean!
Indicates whether this is the last page.
nextPageIndex Int
Index of the next page, when none is available null.
pageCount Int!
Total number of pages which constitute the full result set.
pageSize Int!
Number of items per page.
previousPageIndex Int
Index of the previous page, first index is 0, if currently on first page, the value will be null.
Example
{
  "currentPageIndex": 1,
  "entries": [InstantDeliveryServer],
  "entriesTotalCount": 1089,
  "isFirstPage": false,
  "isLastPage": false,
  "nextPageIndex": 2,
  "pageCount": 55,
  "pageSize": 50,
  "previousPageIndex": 0
}

PaginatedInvoiceResponse

Fields
Field Name Description
currentPageIndex Int!
Current page index which was returned, the first index is 0.
entries [Invoice!]!
Resulting paginated items.
entriesTotalCount Int!
Total number of items in the full result set.
isFirstPage Boolean!
Indicates whether this is the first page.
isLastPage Boolean!
Indicates whether this is the last page.
nextPageIndex Int
Index of the next page, when none is available null.
pageCount Int!
Total number of pages which constitute the full result set.
pageSize Int!
Number of items per page.
previousPageIndex Int
Index of the previous page, first index is 0, if currently on first page, the value will be null.
Example
{
  "currentPageIndex": 1,
  "entries": [Invoice],
  "entriesTotalCount": 1089,
  "isFirstPage": false,
  "isLastPage": false,
  "nextPageIndex": 2,
  "pageCount": 55,
  "pageSize": 50,
  "previousPageIndex": 0
}

PaginatedServerResponse

Fields
Field Name Description
currentPageIndex Int!
Current page index which was returned, the first index is 0.
entries [Server!]!
Resulting paginated items.
entriesTotalCount Int!
Total number of items in the full result set.
isFirstPage Boolean!
Indicates whether this is the first page.
isLastPage Boolean!
Indicates whether this is the last page.
nextPageIndex Int
Index of the next page, when none is available null.
pageCount Int!
Total number of pages which constitute the full result set.
pageSize Int!
Number of items per page.
previousPageIndex Int
Index of the previous page, first index is 0, if currently on first page, the value will be null.
Example
{
  "currentPageIndex": 1,
  "entries": [Server],
  "entriesTotalCount": 1089,
  "isFirstPage": false,
  "isLastPage": false,
  "nextPageIndex": 2,
  "pageCount": 55,
  "pageSize": 50,
  "previousPageIndex": 0
}

PaginatedSubscriptionResponse

Fields
Field Name Description
currentPageIndex Int!
Current page index which was returned, the first index is 0.
entries [Subscription!]!
Resulting paginated items.
entriesTotalCount Int!
Total number of items in the full result set.
isFirstPage Boolean!
Indicates whether this is the first page.
isLastPage Boolean!
Indicates whether this is the last page.
nextPageIndex Int
Index of the next page, when none is available null.
pageCount Int!
Total number of pages which constitute the full result set.
pageSize Int!
Number of items per page.
previousPageIndex Int
Index of the previous page, first index is 0, if currently on first page, the value will be null.
Example
{
  "currentPageIndex": 1,
  "entries": [Subscription],
  "entriesTotalCount": 1089,
  "isFirstPage": false,
  "isLastPage": false,
  "nextPageIndex": 2,
  "pageCount": 55,
  "pageSize": 50,
  "previousPageIndex": 0
}

Payment

Description

Information about subscription billing cycle. Only available for the subscription of the type Prepaid.

Fields
Field Name Description
method PaymentMethod
Provides information about the payment method associated with the payment. Null if the payment is not yet made.
paidOn DateTime
The day on which the payment was made, following the ISO 8601 standard. Null if the payment is not yet made.
status PaymentStatus!
Status of the payment.
Example
{
  "method": "BANK_TRANSFER",
  "paidOn": "2024-11-13T13:43:38.254Z",
  "status": "NOT_PAID"
}

PerformServerPowerActionResponse

Fields
Field Name Description
server Server!
Example
{"server": Server}

Period

Description

Object representing a period of time.

Fields
Field Name Description
from DateTime!
The starting date of the period.
to DateTime!
The ending date of the period.
Example
{
  "from": "2024-05-13T13:43:38.254Z",
  "to": "2024-11-13T13:43:38.254Z"
}

Post

Fields
Field Name Description
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.
id Int!
The integer ID of the post.
postBy SupportRequestPostBy!
The author group of the post author, staff or user.
Example
{
  "contents": "Server RAM upgrade request, please upgrade the RAM to 1TB.",
  "createdAt": "2024-11-13T13:43:38.254Z",
  "email": "example@datapacket.com",
  "fullName": "John Doe",
  "id": 987,
  "postBy": "STAFF"
}

Ram

Fields
Field Name Description
count Int!
size Int!
RAM size in gigabytes (GB).
Example
{"count": 4, "size": 32}

ReverseDnsRecordResponse

Fields
Field Name Description
hostname String
Hostname of the reverse DNS (PTR) record, or null, when there is no such record.
ip IpAddress!
IP address of the reverse DNS (PTR) record
Example
{"hostname": "example.com.", "ip": IpAddress}

Server

Fields
Field Name Description
alias String
Custom alias for your server. Can be set via setServerAlias or in the client panel.
billing Billing!
Contains information related to the server subscription, including the price of the server.
hardware Hardware!
hostname String
location Location!
name String!
Server name is used to uniquely identify each server. Format: DP-12345
network Network!
powerStatus PowerStatus!
status ServerStatus!
Use statusV2 instead.
statusV2 ServerStatusV2!
system System!
tags [ServerTag!]!
trafficPlan TrafficPlan!
uptime Int!
How long your system has been running in days.
Example
{
  "alias": "Load Balancer 01",
  "billing": Billing,
  "hardware": Hardware,
  "hostname": "petermarlowe-45",
  "location": "London",
  "name": "DP-12345",
  "network": Network,
  "powerStatus": "OFF",
  "status": "DISCONNECTED",
  "statusV2": "ACTIVE",
  "system": System,
  "tags": [ServerTag],
  "trafficPlan": TrafficPlan,
  "uptime": 123
}

ServerTag

Fields
Field Name Description
key String!
value String!
Example
{
  "key": "xyz789",
  "value": "xyz789"
}

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"}

SubscriptionItem

Fields
Field Name Description
currency Currency!
The currency in which the subscription item is priced.
description String
A brief description of the subscription item.
price Float!
The price of the subscription item excluding any applicable taxes.
subscriptionItemDetail SubscriptionItemDetail!
Additional details about the subscription item.
type SubscriptionItemType!
The type of the subscription item.
Example
{
  "currency": "EUR",
  "description": "Server DP-99999",
  "price": 987.65,
  "subscriptionItemDetail": SubscriptionItemDetail,
  "type": "DDOS"
}

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
category SupportRequestCategory
Category of the support request.
createdAt DateTime!
The date the support request was created.
email String!
The email of the support request author.
fullName String!
The name of the support ticket author.
id Int!
The integer ID of the support request.
lastReplyAt DateTime!
The date of the last reply in the request.
numberOfReplies Int!
Number of replies in the request.
posts [Post!]
The messages contained in the support request.
status SupportRequestStatus!
The status of the support request.
subject String!
The subject of the support request.
updatedAt DateTime!
The date the support request was last updated.
Example
{
  "category": "ABUSE_REPORT",
  "createdAt": "2024-05-13T13:43:38.254Z",
  "email": "example@datapacket.com",
  "fullName": "John Doe",
  "id": 123,
  "lastReplyAt": "2024-05-13T13:43:38.254Z",
  "numberOfReplies": 987,
  "posts": [Post],
  "status": "CLOSED",
  "subject": "RAM upgrade request.",
  "updatedAt": "2024-05-13T13:43:38.254Z"
}

System

Fields
Field Name Description
os Os!
raid Raid!
Example
{"os": Os, "raid": "RAID_1"}

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.
maximum Float!
Maximum traffic value (peak) in bits.
p95 Float!
95th percentile traffic value in bits per second.
sum Float!
Sum of all traffic values in bits.
Example
{
  "average": 1910853155,
  "last": 1791401293,
  "maximum": 2110948261,
  "p95": 2031241489,
  "sum": 165212363832060
}

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
password String!
Minimum 10, maximum 16 characters long, at least one number.
server ServerInput!
Example
{"password": "1234567890abcdef", "server": ServerInput}

CreateSupportRequestInput

Fields
Input Field Description
destinations [String!]
Network issues only - Location of the destination for the faulty network requests.
message String!
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.
subject SupportRequestSubject!
Subject of the support request.
Example
{
  "destinations": ["162.151.210.193"],
  "message": "Server cannot connect to Chicago internet exchanges. Please check the network configuration. Further details...",
  "priority": "HIGH",
  "servers": ["DP-12345", "DP-12346"],
  "sources": ["Prague", "Chicage"],
  "subject": "HARDWARE_ISSUE"
}

InstantDeliveryServerInput

Fields
Input Field Description
name String!
Example
{"name": "DP-12345"}

InstantDeliveryServersInput

Fields
Input Field Description
location_in [String!]
name_in [String!]
region_in [String!]
Example
{"location_in": ["London"], "name_in": ["DP-12345"], "region_in": ["Europe"]}

InvoiceInput

Fields
Input Field Description
invoiceNumber String!
Unique alpha numeric code identifying invoice.
Example
{"invoiceNumber": "DP000123"}

InvoicesInput

Fields
Input Field Description
currency_in [Currency!]
Array of supported currencies for filtering.
invoiceNumber_in [String!]
Array of invoice numbers for filtering.
paymentStatus_in [PaymentStatus!]
Array of payment statuses for filtering.
Example
{
  "currency_in": ["EUR"],
  "invoiceNumber_in": ["DP000123"],
  "paymentStatus_in": ["NOT_PAID"]
}

PaginatedInstantDeliveryServersInput

Fields
Input Field Description
filter InstantDeliveryServersInput
pageIndex Int
First page has pageIndex value 0. Default = 0
pageSize Int!
The maximum number of results per page is 50. Default = 50
Example
{
  "filter": InstantDeliveryServersInput,
  "pageIndex": 3,
  "pageSize": 50
}

PaginatedInvoicesInput

Fields
Input Field Description
filter InvoicesInput
pageIndex Int
First page has pageIndex value 0. Default = 0
pageSize Int!
The maximum number of results per page is 50. Default = 50
Example
{"filter": InvoicesInput, "pageIndex": 3, "pageSize": 50}

PaginatedServersInput

Fields
Input Field Description
filter ServersInput
pageIndex Int
First page has pageIndex value 0. Default = 0
pageSize Int!
The maximum number of results per page is 50. Default = 50
Example
{"filter": ServersInput, "pageIndex": 3, "pageSize": 50}

PaginatedSubscriptionsInput

Fields
Input Field Description
filter SubscriptionsInput
pageIndex Int
First page has pageIndex value 0. Default = 0
pageSize Int!
The maximum number of results per page is 50. Default = 50
Example
{
  "filter": SubscriptionsInput,
  "pageIndex": 987,
  "pageSize": 50
}

PaginatedSupportRequestsInput

Fields
Input Field Description
filter SupportRequestsInput
pageIndex Int
First page has pageIndex value 0. Default = 0
pageSize Int!
The maximum number of results per page is 50. Default = 50
Example
{
  "filter": SupportRequestsInput,
  "pageIndex": 987,
  "pageSize": 987
}

PerformServerPowerActionInput

Fields
Input Field Description
action PowerAction!
server ServerInput!
Example
{"action": "CYCLE", "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
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
name String
Unique server identifier. Format: DP-12345.
tag ServerTagInput
The key-value tag pair which is unique for the server
Example
{
  "alias": "Load Balancer 01",
  "ip": "123.213.231.132",
  "ipmiIp": "10.110.120.130",
  "name": "DP-12345",
  "tag": ServerTagInput
}

ServerTagInput

Fields
Input Field Description
key String!
The key of the tag. Can only contain alphanumeric characters, hyphens, underscores and periods. Maximal length is 100 characters.
value String!
The value of the tag. Maximum length of 150 characters.
Example
{"key": "env", "value": "production"}

ServersInput

Fields
Input Field Description
alias_in [String!]
The alias 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.
location_in [String!]
The location of the server.
name_in [String!]
The name of the server.
powerStatus_in [PowerStatus!]
The power status of the server.
region_in [String!]
The region of the server.
serverStatusV2_in [ServerStatusV2!]
The status of the server.
serverStatus_in [ServerStatus!]
Use serverStatusV2_in instead.
The status of the server.
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).
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).
tags_in [ServerTagInput!]
Server has at least one of the tags included here (must match both key and value).
Example
{
  "alias_in": ["Load Balancer 01"],
  "ip_in": ["123.213.231.132"],
  "ipmiIp_in": ["10.110.120.130"],
  "location_in": ["London"],
  "name_in": ["DP-12345"],
  "powerStatus_in": ["OFF"],
  "region_in": ["Europe"],
  "serverStatusV2_in": ["ACTIVE"],
  "serverStatus_in": ["DISCONNECTED"],
  "tag_key": ["env"],
  "tag_value": [ServerTagInput],
  "tags_each": [ServerTagInput],
  "tags_in": [ServerTagInput]
}

SetReverseDnsRecordInput

Fields
Input Field Description
hostname String
Hostname for the PTR record or null to delete the current record. Must end with a dot.
ip String!
IP address for the reverse DNS (PTR) record. Currently only IPv4 addresses are supported.
Example
{"hostname": "example.com.", "ip": "123.213.231.132"}

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": "BIOS", "server": ServerInput}

SetServerPrimaryIpInput

Fields
Input Field Description
ip String!
server ServerInput!
Example
{"ip": "192.168.0.1", "server": ServerInput}

SetServerTagInput

Fields
Input Field Description
key String!
The key of the tag. Can only contain alphanumeric characters, hyphens, underscores and periods. The maximum length is 100 characters.
server ServerInput!
The server to set the tag for.
value String
The value of the tag. Maximum length of 150 characters.
Example
{
  "key": "env",
  "server": ServerInput,
  "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
currency_in [Currency!]
Array of supported currencies for filtering.
name_in [String!]
Array of subscription names for filtering.
type_in [SubscriptionType!]
Array of subscription types for filtering.
Example
{"currency_in": ["EUR"], "name_in": ["7"], "type_in": ["PREPAID"]}

SupportRequestInput

Fields
Input Field Description
id Int!
The integer ID of the support request.
Example
{"id": 123}

SupportRequestReplyInput

Fields
Input Field Description
id Int!
The integer ID of the support request to add message to.
message String!
The text of the message to add to the post.
Example
{"id": 987, "message": "Can you also upgrade the storage to 24 8TB NVMe SSDs?"}

SupportRequestsInput

Fields
Input Field Description
categories_in [SupportRequestCategory!]
Category of the support request.
status SupportRequestStatus
Status of the support request.
Example
{"categories_in": ["ABUSE_REPORT"], "status": "CLOSED"}

TrafficInput

Fields
Input Field Description
filter TrafficServersInput
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.
Example
{
  "filter": TrafficServersInput,
  "from": "2024-05-13T13:43:38.254Z",
  "to": "2024-11-13T13:43:38.254Z"
}

TrafficServersInput

Fields
Input Field Description
alias_in [String!]
ip_in [String!]
ipmiIp_in [String!]
location_in [String!]
name_in [String!]
region_in [String!]
Example
{
  "alias_in": ["Load Balancer 01"],
  "ip_in": ["123.213.231.132"],
  "ipmiIp_in": ["10.110.120.130"],
  "location_in": ["London"],
  "name_in": ["DP-12345"],
  "region_in": ["Europe"]
}

Enum

BillingIntervalUnit

Description

Specifies the billing interval unit for subscriptions. Currently supported intervals: MONTH, YEAR.

Values
Enum Value Description

MONTH

The billing interval unit for a monthly subscription.

YEAR

The billing interval unit for a yearly subscription.
Example
"MONTH"

BootDevice

Description

Type of the server boot device.

Values
Enum Value Description

BIOS

Set boot into BIOS setup.

DIAGNOSTIC

Set boot from diagnostic partition.

DISK

Set boot from BIOS default boot device.

PXE

Set boot from PXE.

SAFE_MODE

Set boot from BIOS default boot device, request Safe Mode.
Example
"BIOS"

Currency

Description

Supported currencies.

Values
Enum Value Description

EUR

Euro.

GBP

Pound sterling.

USD

United States dollar.
Example
"EUR"

DdosShieldLevel

Description

Level of protection available for the DDoS Shield.

Values
Enum Value Description

FULL

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.

OFF

No DDoS protection.

VOLUMETRIC

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.
Example
"FULL"

InvoiceItemType

Description

Types of items which can appear on invoice.

Values
Enum Value Description

BGP

Charge for BGP service setup.

CREDIT

Credit added to subscription to be used in further charges.

DDOS

DDOS protection fee charge.

DISCOUNT

Discount applied to subscription.

FEE

Additional fee which is not covered by other types.

IP

One time or recurring fee charged for IP address.

OTHER

Any other subscription item (not charge) not covered by other types.

SERVER

Regular recurring fee charged for server.

TRAFFIC

Reccuring price charged for outgoing traffic usage.

TRAFFIC_OVERAGE

Extra fee, if the traffic usage exceeds the used plan.
Example
"BGP"

InvoiceType

Description

Type of the invoice, the type can change based on further actions.

Values
Enum Value Description

DRAFT

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.

TAX

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

IPv4 address type.

IPV6

IPv6 address type.
Example
"IPV4"

PaymentMethod

Description

The payment method.

Values
Enum Value Description

BANK_TRANSFER

Bank transfer.

CARD

Card payment.

CREDIT_NOTE

Cancelled via Credit note.

DP_BALANCE

Payment with DP balance.

PAYPAL

PayPal payment.
Example
"BANK_TRANSFER"

PaymentStatus

Description

description

Values
Enum Value Description

NOT_PAID

Payment has not been made or received.

PAID

Payment has been made and received.

PAST_DUE

Payment is past due date.
Example
"NOT_PAID"

PowerAction

Description

IPMI power actions that can be performed on a server. For detailed information, see the IPMI specification.

Values
Enum Value Description

CYCLE

Power cycle involves cutting power to the system for at least one second and then restoring it.

OFF

Power off the server. WARNING: This command does not initiate a clean shutdown of the operating system prior to powering down the system

ON

Power on the server.

RESET

This command will perform a hard reset.

SOFT

Initiate a soft-shutdown of OS via ACPI.
Example
"CYCLE"

PowerStatus

Description

Power status of the device.

Values
Enum Value Description

OFF

ON

UNKNOWN

Example
"OFF"

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

CUSTOM

NONE

OTHER

RAID_0

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.

RAID_1

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.

RAID_5

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.

RAID_6

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.

RAID_10

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
"CUSTOM"

ServerStatus

Description

Deprecated in favour of ServerStatusV2.
Information about the server's production status.

Values
Enum Value Description

DISCONNECTED

This status is no longer used.
Server is disconnected from the network. This is usually due to unpaid invoices.

INSTALLING

Use ServerStatusV2.WAITING instead.
Server is being installed with the OS.

IN_MAINTENANCE

Use ServerStatusV2.MAINTENANCE instead.
There is a maintenance task in progress such as OS reinstall, hardware replacement or reconfiguration.

IN_PRODUCTION

Use ServerStatusV2.ACTIVE instead.
Server is configured and available for use. Access details were delivered to the customer.

PROVISIONING

Use ServerStatusV2.PROVISIONING instead.
Server is being prepared for production. It may include hardware configuration, OS installation, and other tasks.
Example
"DISCONNECTED"

ServerStatusV2

Description

Information about the server's production status.

Values
Enum Value Description

ACTIVE

Server is in production.

MAINTENANCE

Server is in maintenance.

PROVISIONING

Server is being prepared.

UNREACHABLE

Server is unreachable by our monitoring.

WAITING

Server is waiting for deployment.
Example
"ACTIVE"

StorageType

Description

Type of the storage device.

Values
Enum Value Description

EMMC

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.

HDD

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.

NVME

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.

SATADOM

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.

SSD

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.
Example
"EMMC"

SubscriptionItemType

Description

Types of items available for subscription.

Values
Enum Value Description

DDOS

DDOS protection fee charge.

FEE

Additional fee which is not covered by other types.

IP

One time or recurring fee charged for IP address.

OTHER

Any other subscription item (not charge) not covered by other types.

SERVER

Regular recurring fee charged for server.

TRAFFIC

Reccuring price charged for outgoing traffic usage.
Example
"DDOS"

SubscriptionType

Description

Supported subscription types.

Values
Enum Value Description

PREPAID

Prepaid subscription.

TRIAL

Trial subscription.
Example
"PREPAID"

SupportRequestCategory

Description

Category of the support request.

Values
Enum Value Description

ABUSE_REPORT

The support request is an abuse report.

NETWORK_ISSUE

The support request is a network issue.

NEW

The support request is a new request which has not been assigned category yet.

SALES_INQUIRY

The support request is a sales inquiry.

TECHNICAL_ISSUE

The support request is a technical issue.
Example
"ABUSE_REPORT"

SupportRequestPostBy

Description

Author group of the post author, staff or user.

Values
Enum Value Description

STAFF

The post was created by a DataPacket staff member.

USER

The post was created by a user.
Example
"STAFF"

SupportRequestPriority

Description

Priority requested for of the support request.

Values
Enum Value Description

HIGH

The support request is to be answered within 2-6 hours.

NORMAL

The support request is to be answered by the following day (within 12-24 hours).

URGENT

The support request is to be answered as soon as possible.
Example
"HIGH"

SupportRequestStatus

Description

Status of the support request.

Values
Enum Value Description

CLOSED

The support request is closed and no longer being resolved.

OPEN

The support request is open.
Example
"CLOSED"

SupportRequestSubject

Description

Subject of the support request.

Values
Enum Value Description

HARDWARE_ISSUE

The support request is a hardware issue such as faulty hardware.

HARDWARE_OTHER

The support request is a hardware issue different from HARDWARE_ISSUE.

NETWORK_ADDITIONAL_IPS

The support request is a network additional IPs issue.

NETWORK_BGP

The support request is a network BGP issue.

NETWORK_OTHER

The support request is a network issue different from NETWORK_ROUTING, NETWORK_BGP, NETWORK_ADDITIONAL_IPS.

NETWORK_ROUTING

The support request is a network routing issue.

SALES_BANDWIDTH_PLAN

The support request is a sales bandwidth plan issue, such as upgrade or downgrade of server bandwidth plan.

SALES_CANCELLATION

The support request is a cancellation issue.

SALES_OTHER

The support request is a sales issue different from SALES_SERVER_ORDER, SALES_PRICING, SALES_BANDWIDTH_PLAN.

SALES_PRICING

The support request is an inquiry about pricing.

SALES_SERVER_ORDER

The support request is a sales server order issue.

SALES_SERVER_UPGRADE

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.

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-11-13T13:43:38.254Z"

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
123.45

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
"abc123"

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

BAD_REQUEST

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.

GRAPHQL_VALIDATION_FAILED

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.

INTERNAL_SERVER_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.

NOT_AUTHORIZED

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.

NOT_FOUND

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.

REVERSE_DNS_API_NOT_AVAILABLE

The reverse DNS management API is currently under maintenance. Please try again in 5 minutes.

VALIDATION_FAILED

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.
Example
"BAD_REQUEST"