KyPanelDocs

API reference

IP Addresses

The server's IP addresses, shared and dedicated.

IP addresses an account can use

GET/api/v1/ips/choices

Who
root, reseller (ACL: create-acct or edit-account)
API tokens
admin token area: server
Operation
ipChoices · ky call ipChoices

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreIPChoice
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

List the server's IP addresses

GET/api/v1/server/ips

Who
root
API tokens
admin token area: server
Operation
adminIPs · ky call adminIPs

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreIPAddress
    shared_idstring
    systemmap of any
    system_errorstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Add IP addresses

POST/api/v1/server/ips

Who
root
API tokens
admin token area: server
Operation
adminAddIPs · ky call adminAddIPs

Request body

FieldType
inputstring
interfacestring
kindstring

Responses

  • 201 Created
    Body
    FieldType
    addedarray of StoreIPAddress
    skippedarray of string
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Remove an IP address

DELETE/api/v1/server/ips/{iid}

Who
root
API tokens
admin token area: server
Operation
adminDeleteIP · ky call adminDeleteIP

Parameters

NameIn
iidpath

Responses

  • 204 Done, no content
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: in-use
  • 500 Internal Server Error: internal

Bind an IP address to the network interface

POST/api/v1/server/ips/{iid}/bind

Who
root
API tokens
admin token area: server
Operation
adminBindIP · ky call adminBindIP

Parameters

NameIn
iidpath

Request body

FieldType
actionstring
dry_runboolean
interfacestring

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: in-use, main-ip
  • 500 Internal Server Error: internal

Make an IP address shared or dedicated

PUT/api/v1/server/ips/{iid}/kind

Who
root
API tokens
admin token area: server
Operation
adminIPKind · ky call adminIPKind

Parameters

NameIn
iidpath

Request body

FieldType
kindstring

Responses

  • 200 OK
    Body
    FieldType
    account_idstring
    accounts alwaysinteger
    address alwaysstring
    created_at alwaysinteger
    family alwaysinteger
    id alwaysstring
    interfacestring
    kind alwaysstring
    nat_publicstring
    prefix_len alwaysinteger
    usernamestring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: in-use
  • 500 Internal Server Error: internal

Choose the shared IP address

PUT/api/v1/server/ips/shared

Who
root
API tokens
admin token area: server
Operation
adminSharedIP · ky call adminSharedIP

Request body

FieldType
ip_idstring

Responses

  • 200 OK
    Body
    FieldType
    addressstring
    shared_idstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal